Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2520: Show number search results #2976

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

simomps
Copy link
Contributor

@simomps simomps commented Oct 25, 2024

Short description

Show the amount of search results

Proposed changes

  • Add counter in the SearchPage
  • Use searchResultsCount from translation.json

Side effects

None.

Testing

Check css styling

Resolved issues

Fixes: #2520


Copy link
Member

@steffenkleinle steffenkleinle left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, definitely going in the right direction already and working as expected 🎉
I added a few minor comments, please have a look at styled components.
Implementing this for native is still missing, let me know if you feel comfortable addressing this already, otherwise I can also take over.

One additional thing: We tend to add release notes for issues that are user facing to improve our store presence. Could you please add one for this change? Have a look here: https://github.com/digitalfabrik/integreat-app/blob/main/docs/contributing.md#release-notes

JFYI: The fact that the build is failing is not your fault, to avoid this, simply rebase your branch to main or merge main into your branch. Can also be done at a later point though.

@@ -102,6 +102,9 @@ const SearchPage = ({ city, cityCode, languageCode, pathname }: CityRouteProps):
{query.length > 0 && (
<>
<List>
<p style={{ margin: '10px 5px', fontSize: 'small' }}>
Copy link
Member

Choose a reason for hiding this comment

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

🔧 Generally, we use styled-components wherever possible to style our components. Please adjust your PR accordingly. For examples, just search for = styled, e.g. in L20 above.
You can find the docu here: https://styled-components.com/docs/basics#getting-started

@@ -102,6 +102,9 @@ const SearchPage = ({ city, cityCode, languageCode, pathname }: CityRouteProps):
{query.length > 0 && (
<>
<List>
<p style={{ margin: '10px 5px', fontSize: 'small' }}>
{`${t('searchResultsCount', { count: results.length })}`}
Copy link
Member

Choose a reason for hiding this comment

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

🙃 I think this line can be simplified a little,

@simomps simomps marked this pull request as draft November 6, 2024 13:15
@simomps simomps marked this pull request as ready for review November 6, 2024 15:00
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.

Show number of search results
2 participants