Skip to content

3418: Add badges for news source - #4262

Open
steffenkleinle wants to merge 5 commits into
2537-merge-newsfrom
3418-news-badge
Open

3418: Add badges for news source#4262
steffenkleinle wants to merge 5 commits into
2537-merge-newsfrom
3418-news-badge

Conversation

@steffenkleinle

@steffenkleinle steffenkleinle commented Jul 15, 2026

Copy link
Copy Markdown
Member

Short Description

Add badges for news source.

Proposed Changes

Side Effects

N/A

Checklist

Testing

Test the whole news feature on web and native. Test native also offline. Test pagination. Check the labels, apply the filters and navigate to news details.

Resolved Issues

Fixes: #3418


@steffenkleinle
steffenkleinle changed the base branch from main to 2537-news-source-filter July 15, 2026 15:11
@steffenkleinle steffenkleinle linked an issue Jul 15, 2026 that may be closed by this pull request
@steffenkleinle
steffenkleinle marked this pull request as ready for review July 20, 2026 08:33
@steffenkleinle
steffenkleinle force-pushed the 3418-news-badge branch 2 times, most recently from 90aae48 to b5a521a Compare July 20, 2026 09:12

@bahaaTuffaha bahaaTuffaha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

At testumgebung (native and web) when it's set to all it keeps repeating (by infinite scroll) the same items due to duplicate keys:

react-dom-client.development.js:6604 Encountered two children with the same key, `local-19600`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
  • ❓ Are they depend on id for the key? not sure if this just because of the dummy data.
  • Switched to cms but there is no local news for Augsburg (is that expected). also in native when I switch to cms then select augsburg it says unknown error occurred (this could be unrelated to this PR).
  • 🔧 At web: the filter can be set to null if I selected the same toggleButton twice.
  • The tuNews logo got changed:

before:

Image

After:

Image
  • for RTL languages I think we need to flip the Chip with the title:
Image

@lunars97

Copy link
Copy Markdown
Contributor

Thank you for your PR 😻 I noticed, in iOS, filter has a weird shadow between local and national news, see the screenshot:
image

@steffenkleinle
steffenkleinle changed the base branch from 2537-news-source-filter to 2537-merge-news July 24, 2026 10:19
@steffenkleinle

Copy link
Copy Markdown
Member Author

At testumgebung (native and web) when it's set to all it keeps repeating (by infinite scroll) the same items due to duplicate keys:

react-dom-client.development.js:6604 Encountered two children with the same key, `local-19600`. Keys should be unique so that components maintain their identity across updates. Non-unique keys may cause children to be duplicated and/or omitted — the behavior is unsupported and could change in a future version.
* ❓  Are they depend on id for the key? not sure if this just because of the dummy data.

I removed pagination since we are limiting all news to 28 days.

* Switched to cms but there is no local news for Augsburg (is that expected). also in native when I switch to cms then select augsburg it says unknown error occurred (this could be unrelated to this PR).

If nobody ever created local news there (in the last 28 days), yes, its intended. /testumgebung/de works as expected for me.

* 🔧  At web: the filter can be set to null if I selected the same toggleButton twice.

Fixed.

* The tuNews logo got changed:

Yes, it was intended. However, I now moved the logo to the end of the page.

* for RTL languages I think we need to flip the Chip with the title:

Fixed, good catch.

@steffenkleinle

Copy link
Copy Markdown
Member Author

Thank you for your PR 😻 I noticed, in iOS, filter has a weird shadow between local and national news, see the screenshot

I can neither reproduce this in the native nor in the web app on an iOS simulator 🤔

@bahaaTuffaha bahaaTuffaha left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work! ✅

There some questions I have left 👇

  • Would it be better to take full width for mobile screens on web to match native ?
Image

size='small'
value={value}
exclusive
onChange={(_, value) => setValue(value ?? value)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔧 Are these both coming from the parameter ? I think it needs renaming here

titleNumberOfLines={0}
descriptionNumberOfLines={0}
title={
<View style={Styles.titleRow}>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<View style={Styles.titleRow}>
<View style={[Styles.titleRow, { flexDirection: contentDirection(languageCode) }]}>

Comment on lines +63 to +67
<View style={Styles.bottomInfo}>
<Text variant='body2'>
<TimeStamp lastUpdate={newsItem.lastUpdate} showText={false} />
</Text>
<View style={Styles.bottomInfo}>
<Text variant='body2' style={{ paddingVertical: 8 }}>
<TimeStamp lastUpdate={newsItem.lastUpdate} showText={false} />
</Text>
<ReadMoreWrapper language={i18n.language}>
<Text
variant='h6'
onPress={navigateToNews}
style={{
marginTop: 4,
color: theme.colors.primary,
}}>
{t('common:more')}
</Text>
</ReadMoreWrapper>
</View>
</Description>
}
onPress={navigateToNews}
accessibilityLanguage={languageCode}
role='link'
style={{ flexDirection: 'column' }}
/>
</ListItemWrapper>
</View>

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

❓ Do we still need this wrapper (bottomInfo) ?

Comment on lines +23 to +30
const styles = StyleSheet.create({
chip: {
borderRadius: 32,
borderColor,
backgroundColor: theme.colors.background,
alignSelf: 'flex-start',
},
})

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's better to be outside of the component body and use style array for the dynamic ones.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it ok to have another release note? 🤔

@lunars97

lunars97 commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Thank you for your PR 😻 I noticed, in iOS, filter has a weird shadow between local and national news, see the screenshot

I can neither reproduce this in the native nor in the web app on an iOS simulator 🤔

you are right, now it is gone. Probably I checked the parent branch...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add Badge to News Source

3 participants