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

[Orders Page] - Fix Pagination not working #13003

Merged

Conversation

chahmedejaz
Copy link
Collaborator

@chahmedejaz chahmedejaz commented Nov 27, 2024

What? Why?

  • Closes [Orders Page] - Pagination is not working #13002
  • searchController is also being used on the Orders Page along with Products
  • productForm is not accessible on the orders page
  • Hence the code breaks on the Orders page when controller action tries to do the scrollIntoView on the productForm
  • This PR puts the check in the controller to do the scrollIntoView only if the productForm is available

What should we test?

Release notes

Changelog Category (reviewers may add a label for the release notes):

  • User facing changes
  • API changes (V0, V1, DFC or Webhook)
  • Technical changes only
  • Feature toggled

- productForm is not accessible on the orders page
- putting the check to do the scrollIntoView only if the productForm is available
@chahmedejaz chahmedejaz added the bug-s1 The bug is stopping the platform from working, and there is no workaround. Impact of lot of users. label Nov 27, 2024
@chahmedejaz chahmedejaz added the user facing changes Thes pull requests affect the user experience label Nov 27, 2024
@filipefurtad0 filipefurtad0 self-assigned this Nov 27, 2024
@filipefurtad0 filipefurtad0 added pr-staged-fr staging.coopcircuits.fr and removed pr-staged-fr staging.coopcircuits.fr labels Nov 27, 2024
@filipefurtad0
Copy link
Contributor

Thanks so much @chahmedejaz ,

I did an early test on this one, prior to code review. Your PR fixes the issue 💪

Before this PR, clicking on the index 2, on the orders page triggers a console error and does not display the following set of orders:

image

After this PR, it is possible to use page index navigation, before the introduced regression:

image

Re-tested #12962: navigating between different pagination indexes scrolls up the page.

Also had a look on the users page, BOM, and customers page, all using pagination as well. These seem to work as before.

This looks good to go, from a testing perspective 🟢

@dacook dacook self-requested a review November 27, 2024 22:14
Copy link
Member

@dacook dacook 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 fixing this so quickly Ahmed!

It would be best not to have a reference to a specific page element in this generic controller, but this is worth doing for the quick fix.

@dacook dacook merged commit 3a7aed1 into openfoodfoundation:master Nov 27, 2024
58 checks passed
Copy link
Member

@mkllnk mkllnk left a comment

Choose a reason for hiding this comment

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

Great! 🌟

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-s1 The bug is stopping the platform from working, and there is no workaround. Impact of lot of users. user facing changes Thes pull requests affect the user experience
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

[Orders Page] - Pagination is not working
4 participants