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(productViewMissing): ent-3913 apply platform appNavClick #695

Merged
merged 2 commits into from
Jun 7, 2021

Conversation

cdcabrera
Copy link
Member

@cdcabrera cdcabrera commented Jun 2, 2021

What's included

  • fix(productViewMissing): ent-3913 apply platform appNavClick
    • testing, mock appNavClick, hook
    • productViewMissing, useRouter, setAppNav
    • platformActions, expose setAppNav
    • platformServices, expose appNavClick, replace navigation
    • useRouter, pass useHistory, proxy useHistory push, setAppNav
  • fix(redirect): ent-3833 restructure, force a path
    • testing, window.replace noop
    • authentication, remove isRedirect
    • productViewMissing, on available product cards redirect
    • redirect, restructure, force a path, pass search, hash
    • router, var rename, centralize exports, index.js
    • routerHelpers, optional chain

Notes

  • Each of these commits covers a different form of redirect
    • fix redirect covers handling a forced redirect with window.location.href
    • fix productViewMissing covers using the platforms appNavClick chrome method (allows updating the left hand nav without forcing a refresh)

How to test

Proxy run check

since the platform still appears to have some redirects in place, and this automagically performs the redirect you can test 2 ways to confirm it's actually doing something.

First

  1. update the NPM packages with $ yarn
  2. make sure Docker is running, plus on network, then
  3. $ yarn start:proxy
  4. confirm the redirect happens by purposefully using a botched url, i.e. /beta/subscriptions/ and confirm that the product id rhel is used and the end result is /beta/subscriptions/rhel

Second

  1. update the NPM packages with $ yarn
  2. make sure Docker is running, plus on network, then
  3. $ yarn start:proxy
  4. navigate to a purposefully broken path /beta/subscriptions/
  5. modify the ./src/components/productViewMissing.js file default prop availableProductsRedirect to zero, hit refresh and the card view of missing products should appear
  6. click on a card and the path should update accordingly
  • NOTE: testing the left menu highlighting may produce a false positive if the platform redirects are still in place

Example

Jun-10-2021.11-36-51.mp4

Updates issue/story

ent-3913
ent-3833

@cdcabrera cdcabrera added bug Something isn't working tech debt We've ignored it this long... 202108 project phase labels Jun 2, 2021
@cdcabrera cdcabrera changed the title fix(productViewMissing): ent-3913 apply platform appNavClick fix(productViewMissing): ent-3833 apply platform appNavClick Jun 2, 2021
@cdcabrera cdcabrera changed the title fix(productViewMissing): ent-3833 apply platform appNavClick fix(productViewMissing): ent-3913 apply platform appNavClick Jun 2, 2021
@cdcabrera cdcabrera added the story New feature, or process work label Jun 2, 2021
Copy link
Member Author

@cdcabrera cdcabrera left a comment

Choose a reason for hiding this comment

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

Minor update

.eslintrc Outdated Show resolved Hide resolved
cdcabrera added 2 commits June 7, 2021 13:23
* testing, window.replace noop
* authentication, remove isRedirect
* productViewMissing, on available product cards redirect
* redirect, restructure, force a path, pass search, hash
* router, var rename, centralize exports, index.js
* routerHelpers, optional chain
…nsights#695)

* testing, mock appNavClick, hook
* productViewMissing, useRouter, setAppNav
* platformActions, expose setAppNav
* platformServices, expose appNavClick, replace navigation
* useRouter, pass useHistory, proxy useHistory push, setAppNav
@cdcabrera cdcabrera merged commit 6605b93 into RedHatInsights:ci Jun 7, 2021
cdcabrera added a commit that referenced this pull request Jun 7, 2021
* testing, window.replace noop
* authentication, remove isRedirect
* productViewMissing, on available product cards redirect
* redirect, restructure, force a path, pass search, hash
* router, var rename, centralize exports, index.js
* routerHelpers, optional chain
cdcabrera added a commit that referenced this pull request Jun 10, 2021
* testing, window.replace noop
* authentication, remove isRedirect
* productViewMissing, on available product cards redirect
* redirect, restructure, force a path, pass search, hash
* router, var rename, centralize exports, index.js
* routerHelpers, optional chain
cdcabrera added a commit that referenced this pull request Jun 10, 2021
* testing, mock appNavClick, hook
* productViewMissing, useRouter, setAppNav
* platformActions, expose setAppNav
* platformServices, expose appNavClick, replace navigation
* useRouter, pass useHistory, proxy useHistory push, setAppNav
cdcabrera added a commit that referenced this pull request Jul 13, 2021
* testing, window.replace noop
* authentication, remove isRedirect
* productViewMissing, on available product cards redirect
* redirect, restructure, force a path, pass search, hash
* router, var rename, centralize exports, index.js
* routerHelpers, optional chain
cdcabrera added a commit that referenced this pull request Jul 13, 2021
* testing, mock appNavClick, hook
* productViewMissing, useRouter, setAppNav
* platformActions, expose setAppNav
* platformServices, expose appNavClick, replace navigation
* useRouter, pass useHistory, proxy useHistory push, setAppNav
cdcabrera added a commit that referenced this pull request Jul 13, 2021
* testing, window.replace noop
* authentication, remove isRedirect
* productViewMissing, on available product cards redirect
* redirect, restructure, force a path, pass search, hash
* router, var rename, centralize exports, index.js
* routerHelpers, optional chain
cdcabrera added a commit that referenced this pull request Jul 13, 2021
* testing, mock appNavClick, hook
* productViewMissing, useRouter, setAppNav
* platformActions, expose setAppNav
* platformServices, expose appNavClick, replace navigation
* useRouter, pass useHistory, proxy useHistory push, setAppNav
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
202108 project phase bug Something isn't working story New feature, or process work tech debt We've ignored it this long...
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant