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(productView): key causes refresh #1264

Merged
merged 1 commit into from
Jan 31, 2024

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Jan 30, 2024

What's included

Notes

  • simplifies the product view component by removing the no longer necessary useCallback
    • this was done because of routing overlap between swatch and subscriptions inventory
  • align to authentication component, consistency
  • this started as a fix for the key being used on the provider... we realized unnecessary view refreshes were happening because the key aligned to productID instead of productGroup... updating to productGroup removed the refresh issue (and removing also works)... then we realized the hook itself might not be necessary...

How to test the lesser change

Coverage and basic unit test check

  1. update the NPM packages with $ npm install
  2. $ npm test
  3. confirm tests come back clean

Check the build

  1. update the NPM packages with $ npm install
  2. $ npm run build
  3. confirm tests come back clean

How to test the intended change

Coverage and basic unit test check

  1. update the NPM packages with $ npm install
  2. $ npm test
  3. confirm tests come back clean

Local run check

  1. update the NPM packages with $ npm install
  2. $ npm start
  3. confirm the productView loads successfully and product variants can be navigated as intended

Proxy run check (FAILED, reverting to lesser update fix instead, intended change is linked above)

  1. update the NPM packages with $ npm install
  2. make sure Docker is running, plus on network, then
  3. $ npm run start:proxy
  4. confirm the productView loads successfully and product variants can be navigated as intended
  5. CONFIRM that navigating between other Subscription applications, specifically Inventory, does not cause undue page refreshes due to routing overlap... this is an issue we faced in the past due to the ORIGINAL ROUTING (now that we're under usage the issue may no longer exist... but if someone forgot to remove the old routing configs...)

Check the build

  1. update the NPM packages with $ npm install
  2. $ npm run build
  3. confirm tests come back clean

Example

...

Updates issue/story

ongoing

@cdcabrera cdcabrera added the 202404 project phase label Jan 30, 2024
@cdcabrera cdcabrera changed the title refactor(productView): simplify, unnecessary hook ~refactor(productView): simplify, unnecessary hook~ Jan 30, 2024
@cdcabrera cdcabrera changed the title ~refactor(productView): simplify, unnecessary hook~ ~~refactor(productView): simplify, unnecessary hook~~ Jan 30, 2024
@cdcabrera cdcabrera force-pushed the 20240130-productview-key branch from e15006e to 0d4c5f3 Compare January 30, 2024 16:12
@cdcabrera cdcabrera changed the title ~~refactor(productView): simplify, unnecessary hook~~ fix(productView): key causes refresh Jan 30, 2024
@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2024

Codecov Report

Merging #1264 (5545313) into main (7c8f100) will not change coverage.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1264   +/-   ##
=======================================
  Coverage   91.84%   91.84%           
=======================================
  Files         113      113           
  Lines        4257     4257           
  Branches     1802     1802           
=======================================
  Hits         3910     3910           
  Misses        327      327           
  Partials       20       20           
Files Coverage Δ
src/components/productView/productView.js 100.00% <ø> (ø)

Continue to review full report in Codecov by Sentry.

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

@cdcabrera cdcabrera force-pushed the 20240130-productview-key branch from 0d4c5f3 to 5545313 Compare January 30, 2024 16:20
@cdcabrera cdcabrera marked this pull request as ready for review January 30, 2024 16:21
@cdcabrera cdcabrera added the hold label Jan 30, 2024
@cdcabrera
Copy link
Member Author

As of 20240130 holding due to environment testing issues

@cdcabrera cdcabrera added bug Something isn't working and removed hold labels Jan 31, 2024
@cdcabrera cdcabrera merged commit e6202df into RedHatInsights:main Jan 31, 2024
6 of 7 checks passed
cdcabrera added a commit that referenced this pull request Jan 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
202404 project phase bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants