Refactor #27451
openRewrite the organization switcher in react/redux
Description
Switching the organization in the org switcher causes stale state of plugin pages.
In katello, for example, if you switch the organization on the organization switcher there is no good way for the react page to know that you just updated the organization and thus the page can get confused about what organization it is on. This is especially true if you also use the in-page organization switcher (by selecting "any organization").
One possibility to fix this is to rewrite the organization switcher in react, store the organization in foreman's redux store, and for foreman's redux store to be the one source of truth for what organization is selected. After this is done we'll obviously want to refactor katello as well in order to remove independent organization tracking there.
Steps to Reproduce¶
- Starting with "Another Org" on subscription page
- Clicking on a sub to view the details
- Selecting "Any Organization"
- Selecting "Default Organization"
- Clicking the subscriptions breadcrumb
- Subscriptions show from "Another Org", but "Default Organization" org shows in masthead (this is the issue)
- If I refresh the page, we get the expected results of Default Organization's subs showing.
Context
https://github.com/Katello/katello/pull/8227#issuecomment-514687258
https://github.com/Katello/katello/pull/8052¶
Updated by Walden Raines over 5 years ago
- Related to Bug #25113: Subscriptions details page does not handle Org switch correctly. added