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(viewReducer): ent-3644 productGroups for inventory reset #606

Merged
merged 1 commit into from
Mar 19, 2021

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Mar 19, 2021

What's included

  • fix(viewReducer): ent-3644 productGroups for inventory reset
    • routerConfig, productGroups, productIds grouped by viewIds
    • toolbar, viewId to inventory reset
    • toolbarFieldDisplayName, granularity, ranged, uom, apply viewId
    • viewReducer, restructure reset to apply productGroups

Notes

  • It appears we discovered a flaw/bug in how we reset the inventory displays. Originally we didn't have dual column displays so we would generically reset the inventory per view, this encompassed all productIds under a viewId. The dual column display created a scenario where we can't/shouldn't generically reset all inventory states. Now when an inventory reset needs to happen it can no longer be generic, it has to be specific.
  • There are two solutions we've reviewed
    • fix(viewReducer): ent-3644 apply productId to inventory reset #604 Go with what we know works and apply prop drilling for the productId alongside the viewId, or
    • THIS PR Apply a unique solution by retaining the viewId and creating a dictionary for each viewId that relates all possible productIds contained under a viewId enabling us to reset state on those specific productIds. The advantage is it ties into future updates around custom hooks and context

How to test

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. confirm the inventory paging/offset is reset to the initial offset, in this case 0.
    • all products and their facets should be confirmed

Example

...

Updates issue/story

ent-3644

* routerConfig, productGroups, productIds grouped by viewIds
* toolbar, viewId to inventory reset
* toolbarFieldDisplayName, granularity, ranged, uom, apply viewId
* viewReducer, restructure reset to apply productGroups
@cdcabrera cdcabrera merged commit b41c2ff into RedHatInsights:qa Mar 19, 2021
@cdcabrera cdcabrera added 202104 project phase bug Something isn't working labels Mar 19, 2021
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Mar 24, 2021
…nsights#606)

* routerConfig, productGroups, productIds grouped by viewIds
* toolbar, viewId to inventory reset
* toolbarFieldDisplayName, granularity, ranged, uom, apply viewId
* viewReducer, restructure reset to apply productGroups
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Mar 25, 2021
…nsights#606)

* routerConfig, productGroups, productIds grouped by viewIds
* toolbar, viewId to inventory reset
* toolbarFieldDisplayName, granularity, ranged, uom, apply viewId
* viewReducer, restructure reset to apply productGroups
cdcabrera added a commit that referenced this pull request Mar 25, 2021
* routerConfig, productGroups, productIds grouped by viewIds
* toolbar, viewId to inventory reset
* toolbarFieldDisplayName, granularity, ranged, uom, apply viewId
* viewReducer, restructure reset to apply productGroups
cdcabrera added a commit that referenced this pull request Apr 13, 2021
* routerConfig, productGroups, productIds grouped by viewIds
* toolbar, viewId to inventory reset
* toolbarFieldDisplayName, granularity, ranged, uom, apply viewId
* viewReducer, restructure reset to apply productGroups
cdcabrera added a commit that referenced this pull request Apr 13, 2021
* routerConfig, productGroups, productIds grouped by viewIds
* toolbar, viewId to inventory reset
* toolbarFieldDisplayName, granularity, ranged, uom, apply viewId
* viewReducer, restructure reset to apply productGroups
cdcabrera added a commit that referenced this pull request Apr 20, 2021
* routerConfig, productGroups, productIds grouped by viewIds
* toolbar, viewId to inventory reset
* toolbarFieldDisplayName, granularity, ranged, uom, apply viewId
* viewReducer, restructure reset to apply productGroups
cdcabrera added a commit that referenced this pull request Apr 26, 2021
* routerConfig, productGroups, productIds grouped by viewIds
* toolbar, viewId to inventory reset
* toolbarFieldDisplayName, granularity, ranged, uom, apply viewId
* viewReducer, restructure reset to apply productGroups
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
202104 project phase bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant