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

fix(toolbar,openshiftView): issues/400 page reset on filter update #413

Merged
merged 2 commits into from
Sep 9, 2020

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Sep 9, 2020

What's included

  • fix(guestsList): avoid boolean, remove nullish coalescing op
  • fix(toolbar,openshiftView): issues/400 page reset on filter update
    • openshiftView, page reset helper
    • pagination, productId as primary state update
    • paginationHelper, centralize page reset
    • toolbar, apply page reset helper

Notes

  • Queries need to be reworked in the future, having to update multiple components to "reset" paging is not necessarily maintainable
    • A first round is converting the graphCard header into a toolbar component
    • From there the src/redux/common/apiQueries.js can be expanded to
      • include some form of filtering around paging, and
      • possibly worked into the selectors or components directly instead of passing as props from the view
    • Consider centralizing paging reset within inventory itself, the reducer level, or within selectors.
      • Remember the order of components/child components loading against API calls. Resetting paging from the inventory child component "pagination" can potentially cause duplicate API calls as query is "reset" after the inventory API has already been called

How to test

Env check

Steps to reproduce bug, an error should be throw and the GUI displays an error state

Primary toolbar check...
  1. Locate an account with over 10 inventory listings
  2. navigate to the last offset/page with the paging controls
  3. select a filter from the primary toolbar that will reduce the inventory results
OpenShift check...
  1. Locate an account with over 10 inventory listings for the OpenShift product view
  2. navigate to the OpenShift product view
  3. navigate to the last offset/page with the paging controls
  4. select the cores/sockets uom filter located directly above the "graph" display

Proxy run check

  1. update the NPM packages with $ yarn
  2. make sure Docker is running, plus on network, then
  3. $ yarn start:proxy
  4. perform the same steps that are listed in the Env checks, confirm no errors are thrown

Example

...

Updates issue/story

#400

cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Sep 9, 2020
…edHatInsights#413)

* openshiftView, page reset helper
* pagination, productId as primary state update
* paginationHelper, centralize page reset
* toolbar, apply page reset helper
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Sep 9, 2020
…HatInsights#413)

* openshiftView, page reset helper
* pagination, productId as primary state update
* paginationHelper, centralize page reset
* toolbar, apply page reset helper
@cdcabrera cdcabrera merged commit 3d7de84 into RedHatInsights:ci Sep 9, 2020
cdcabrera added a commit that referenced this pull request Sep 9, 2020
* openshiftView, page reset helper
* pagination, productId as primary state update
* paginationHelper, centralize page reset
* toolbar, apply page reset helper
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.

1 participant