Move global namespaces filter dropdown to the application header #2468
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Users have been confused by the namespaces dropdown, not realising it affects filtering globally across the application. This is in no small part due to the fact that it doesn't appear on all pages, and behaviour is not always consistent.
Move the dropdown to the application header so that it appears on all pages, making it more clear that this affects the entire application, not just the current page.
Add some additional content to the existing NamespaceContext which is used to return to the correct list view when viewing a details page and selecting 'All Namespaces', and to ensure the URL can be updated correctly when selecting a different namespace (both for list and details pages).
Move and update the relevant tests from ListPageLayout and SideNav to the new HeaderBarContent container which now manages all logic related to namespace changes, both for the global filter and in the URL.
Submitter Checklist
As the author of this PR, please check off the items in this checklist:
functionality, content, code)
See the contribution guide
for more details.