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

refactor(inventory): ent 4572 class to functions #857

Merged
merged 4 commits into from
Jan 25, 2022

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Dec 17, 2021

What's included

  • fix(productViews): product configs, test timestamps
  • refactor(inventoryCard): ent-4572 rename from inventoryList
  • refactor(inventoryCard): ent-4572 class, function conversion
    • locale, disabled tab string
    • guestsList, class to func, deprecated guests
    • guestsListContext, hooks for selectors, action
    • inventoryCard, class to func
    • inventoryCardContext, hooks for selectors, action
    • inventorySubscriptions, class to func, alias inventoryCard
    • inventorySubscriptionsContext, hooks for selectors, action
    • productViews, component prop drill, config clean up
    • productViewContext, activate guests config
    • useReactRedux, expand base redux hooks
    • viewReducer, guests query and types
    • selectors, remove unused instances, subscriptions
    • rhsmConstants, expand for guests, number_of_guests
    • rhsmSchemas, guests, subscriptions added
    • rhsmTransformers, instances number_of_guests added
  • refactor(inventory): ent-4572 rename components

Notes

  • There are no visual updates associated with these refactors
  • In order to retain the git history associated with the components we busted the renames into their own commits
  • THESE INVENTORY UPDATES AFFECT THE RHOSAK PRODUCT DISPLAY (a precursor to the inventory updates that will happen for other products) and Subscription inventory table displays across all products
    • The prior class versions of guestsList and inventoryList/Card have been retained as deprecated versions, along with the refactors, since they access the hosts API endpoint. RHOSAK utilizes the newer instances API endpoint ergo it has been updated. The intention is to migrate our other products towards the function components used under RHOSAK when the number_of_guests facet is provided via the instances API, ENT-4580
  • During the refactor we removed a couple of key attributes being used to cause refreshes on inventory. Everything appeared to be refreshing without them during testing, we'll monitor them, if caching issues pop up we'll reimplement them for instances, subscriptions, and the guests display

How to test

Local run check

  1. update the NPM packages with $ yarn
  2. $ yarn start
  3. navigate to the RHOSAK product facet and confirm the inventory, guestsList, and subscriptions load without issue

Proxy run check

  1. update the NPM packages with $ yarn
  2. make sure Docker is running, plus on network, then
  3. $ yarn start:proxy
    1. navigate to the RHOSAK product facet and confirm the inventory, guestsList, and subscriptions load without issue

Example

...

Updates issue/story

ent-4572

cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Jan 18, 2022
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Jan 18, 2022
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Jan 18, 2022
…nsights#857)

* locale, disabled tab string
* guestsList, class to func, deprecated guests
* guestsListContext, hooks for selectors, action
* inventoryCard, class to func
* inventoryCardContext, hooks for selectors, action
* inventorySubscriptions, class to func, alias inventoryCard
* inventorySubscriptionsContext, hooks for selectors, action
* productViews, component prop drill, config clean up
* productViewContext, activate guests config
* useReactRedux, expand base redux hooks
* viewReducer, guests query and types
* selectors, remove unused instances, subscriptions
* rhsmConstants, expand for guests, number_of_guests
* rhsmSchemas, guests, subscriptions added
* rhsmTransformers, instances number_of_guests added
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Jan 18, 2022
…nsights#857)

* locale, disabled tab string
* guestsList, class to func, deprecated guests
* guestsListContext, hooks for selectors, action
* inventoryCard, class to func
* inventoryCardContext, hooks for selectors, action
* inventorySubscriptions, class to func, alias inventoryCard
* inventorySubscriptionsContext, hooks for selectors, action
* productViews, component prop drill, config clean up
* productViewContext, activate guests config
* useReactRedux, expand base redux hooks
* viewReducer, guests query and types
* selectors, remove unused instances, subscriptions
* rhsmConstants, expand for guests, number_of_guests
* rhsmSchemas, guests, subscriptions added
* rhsmTransformers, instances number_of_guests added
@cdcabrera cdcabrera force-pushed the ent-4572-inventory branch 2 times, most recently from 6b6c8b4 to 718788c Compare January 19, 2022 18:08
@codecov-commenter
Copy link

codecov-commenter commented Jan 19, 2022

Codecov Report

Merging #857 (365b37d) into ci (de19628) will decrease coverage by 0.17%.
The diff coverage is 93.98%.

Impacted file tree graph

@@            Coverage Diff             @@
##               ci     #857      +/-   ##
==========================================
- Coverage   94.05%   93.88%   -0.18%     
==========================================
  Files         123      125       +2     
  Lines        3548     3661     +113     
  Branches     1377     1433      +56     
==========================================
+ Hits         3337     3437     +100     
- Misses        194      204      +10     
- Partials       17       20       +3     
Impacted Files Coverage Δ
src/config/product.satellite.js 88.57% <ø> (ø)
src/types/rhsmApiTypes.js 100.00% <ø> (ø)
...torySubscriptions/inventorySubscriptionsContext.js 73.46% <73.46%> (ø)
src/components/guestsList/guestsList.js 83.72% <91.66%> (-14.75%) ⬇️
...c/components/inventoryList/inventoryCardContext.js 91.83% <91.83%> (ø)
src/components/guestsList/guestsListContext.js 96.07% <96.07%> (ø)
src/components/guestsList/guestsList.deprecated.js 98.46% <98.46%> (ø)
src/components/inventoryList/inventoryCard.js 100.00% <100.00%> (ø)
...c/components/inventoryList/inventoryCardHelpers.js 93.40% <100.00%> (ø)
...mponents/inventoryList/inventoryList.deprecated.js 90.54% <100.00%> (ø)
... and 15 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update de19628...365b37d. Read the comment docs.

@cdcabrera cdcabrera added the 202204 project phase label Jan 19, 2022
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Jan 21, 2022
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Jan 21, 2022
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Jan 21, 2022
…nsights#857)

* locale, disabled tab string
* guestsList, class to func, deprecated guests
* guestsListContext, hooks for selectors, action
* inventoryCard, class to func
* inventoryCardContext, hooks for selectors, action
* inventorySubscriptions, class to func, alias inventoryCard
* inventorySubscriptionsContext, hooks for selectors, action
* productViews, component prop drill, config clean up
* productViewContext, activate guests config
* useReactRedux, expand base redux hooks
* viewReducer, guests query and types
* selectors, remove unused instances, subscriptions
* rhsmConstants, expand for guests, number_of_guests
* rhsmSchemas, guests, subscriptions added
* rhsmTransformers, instances number_of_guests added
@cdcabrera cdcabrera force-pushed the ent-4572-inventory branch 2 times, most recently from 42dc288 to a85e94e Compare January 21, 2022 19:23
@cdcabrera cdcabrera changed the title WIP refactor(inventory): ent 4572 class to functions refactor(inventory): ent 4572 class to functions Jan 21, 2022
@cdcabrera cdcabrera marked this pull request as ready for review January 21, 2022 19:29
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Jan 21, 2022
…nsights#857)

* locale, disabled tab string
* guestsList, class to func, deprecated guests
* guestsListContext, hooks for selectors, action
* inventoryCard, class to func
* inventoryCardContext, hooks for selectors, action
* inventorySubscriptions, class to func, alias inventoryCard
* inventorySubscriptionsContext, hooks for selectors, action
* productViews, component prop drill, config clean up
* productViewContext, activate guests config
* useReactRedux, expand base redux hooks
* viewReducer, guests query and types
* selectors, remove unused instances, subscriptions
* rhsmConstants, expand for guests, number_of_guests
* rhsmSchemas, guests, subscriptions added
* rhsmTransformers, instances number_of_guests added
cdcabrera added a commit to cdcabrera/curiosity-frontend that referenced this pull request Jan 21, 2022
…nsights#857)

* locale, disabled tab string
* guestsList, class to func, deprecated guests
* guestsListContext, hooks for selectors, action
* inventoryCard, class to func
* inventoryCardContext, hooks for selectors, action
* inventorySubscriptions, class to func, alias inventoryCard
* inventorySubscriptionsContext, hooks for selectors, action
* productViews, component prop drill, config clean up
* productViewContext, activate guests config
* useReactRedux, expand base redux hooks
* viewReducer, guests query and types
* selectors, remove unused instances, subscriptions
* rhsmConstants, expand for guests, number_of_guests
* rhsmSchemas, guests, subscriptions added
* rhsmTransformers, instances number_of_guests added
@cdcabrera cdcabrera merged commit 39a527a into RedHatInsights:ci Jan 25, 2022
cdcabrera added a commit that referenced this pull request Jan 25, 2022
* locale, disabled tab string
* guestsList, class to func, deprecated guests
* guestsListContext, hooks for selectors, action
* inventoryCard, class to func
* inventoryCardContext, hooks for selectors, action
* inventorySubscriptions, class to func, alias inventoryCard
* inventorySubscriptionsContext, hooks for selectors, action
* productViews, component prop drill, config clean up
* productViewContext, activate guests config
* useReactRedux, expand base redux hooks
* viewReducer, guests query and types
* selectors, remove unused instances, subscriptions
* rhsmConstants, expand for guests, number_of_guests
* rhsmSchemas, guests, subscriptions added
* rhsmTransformers, instances number_of_guests added
cdcabrera added a commit that referenced this pull request Mar 1, 2022
* locale, disabled tab string
* guestsList, class to func, deprecated guests
* guestsListContext, hooks for selectors, action
* inventoryCard, class to func
* inventoryCardContext, hooks for selectors, action
* inventorySubscriptions, class to func, alias inventoryCard
* inventorySubscriptionsContext, hooks for selectors, action
* productViews, component prop drill, config clean up
* productViewContext, activate guests config
* useReactRedux, expand base redux hooks
* viewReducer, guests query and types
* selectors, remove unused instances, subscriptions
* rhsmConstants, expand for guests, number_of_guests
* rhsmSchemas, guests, subscriptions added
* rhsmTransformers, instances number_of_guests added
@cdcabrera cdcabrera mentioned this pull request Mar 3, 2022
cdcabrera added a commit that referenced this pull request Mar 8, 2022
* locale, disabled tab string
* guestsList, class to func, deprecated guests
* guestsListContext, hooks for selectors, action
* inventoryCard, class to func
* inventoryCardContext, hooks for selectors, action
* inventorySubscriptions, class to func, alias inventoryCard
* inventorySubscriptionsContext, hooks for selectors, action
* productViews, component prop drill, config clean up
* productViewContext, activate guests config
* useReactRedux, expand base redux hooks
* viewReducer, guests query and types
* selectors, remove unused instances, subscriptions
* rhsmConstants, expand for guests, number_of_guests
* rhsmSchemas, guests, subscriptions added
* rhsmTransformers, instances number_of_guests added
cdcabrera added a commit that referenced this pull request Mar 8, 2022
* locale, disabled tab string
* guestsList, class to func, deprecated guests
* guestsListContext, hooks for selectors, action
* inventoryCard, class to func
* inventoryCardContext, hooks for selectors, action
* inventorySubscriptions, class to func, alias inventoryCard
* inventorySubscriptionsContext, hooks for selectors, action
* productViews, component prop drill, config clean up
* productViewContext, activate guests config
* useReactRedux, expand base redux hooks
* viewReducer, guests query and types
* selectors, remove unused instances, subscriptions
* rhsmConstants, expand for guests, number_of_guests
* rhsmSchemas, guests, subscriptions added
* rhsmTransformers, instances number_of_guests added
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
202204 project phase
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants