hydra icon indicating copy to clipboard operation
hydra copied to clipboard

feat: search results pagination

Open mohannadzidan opened this issue 9 months ago • 7 comments

This PR will add pagination buttons to search results to show more search results

closes #357, and closes #292

mohannadzidan avatar May 14 '24 09:05 mohannadzidan

Closes #369

henriqueleite42 avatar May 15 '24 18:05 henriqueleite42

Please, always add a screenshot when your PR is releated to UI stuff.

zamitto avatar May 15 '24 21:05 zamitto

new translation keys are required for next_page and last_page

image

mohannadzidan avatar May 16 '24 04:05 mohannadzidan

Could you please add the translation for en at least as it is the default fallback? The others can be added later.

LGTM overall, nice work :)

piradata avatar May 18 '24 03:05 piradata

image

@mohannadzidan u can use it actually

the only problem is that this file uses const { t } = useTranslation("home"); instead of const { t } = useTranslation("catalogue"); 😅

piradata avatar May 18 '24 04:05 piradata

I have updated the code to use next_page, previous_page keys from the catalogue namespace

image

mohannadzidan avatar May 25 '24 12:05 mohannadzidan

@zamitto hey, this feature is ready to merge, can you please review the code?

mohannadzidan avatar May 27 '24 16:05 mohannadzidan

hey @mohannadzidan , need some help here?

piradata avatar Jun 02 '24 02:06 piradata

Hello @piradata and @zamitto

I've implemented the changes requested in the previous review:

  1. Moved pagination inlined styles to home.css for better separation of concerns.
  2. Updated the searchGames function signature for improved clarity and reusability.
  3. Added functionality to disable the "next" button when there are no more results to prevent unexpected behavior.

Please take another look at the code and let me know if everything looks good or if you have any further suggestions. Thanks!

mohannadzidan avatar Jun 02 '24 23:06 mohannadzidan

@zamitto what do you think on this one?

piradata avatar Jun 06 '24 13:06 piradata

@zamitto is this one stil relevant?

piradata avatar Sep 23 '24 15:09 piradata

@zamitto is this one stil relevant?

Not anymore, we moved the search to our api We might eventually add pagination to it But, as now the results are much more relevant and gives what the user is search for, pagination is not a top priority right now

zamitto avatar Sep 23 '24 15:09 zamitto