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
Bug 1910859: breadcrumbs and nav doesn't use last namespace #7714
Bug 1910859: breadcrumbs and nav doesn't use last namespace #7714
Conversation
@dtaylor113: This pull request references Bugzilla bug 1910859, which is valid. The bug has been moved to the POST state. The bug has been updated to refer to the pull request using the external bug tracker. 3 validation(s) were run on this bug
In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@dtaylor113 Would you mind adding a test to make sure we don't regress again? This behavior is easy to forget to check and developers might not know about. |
/retest |
Added Cypress tests |
8191b20
to
f7d17eb
Compare
|
||
it('nav and breadcrumbs restores last selected Project when navigating from details to list view', () => { | ||
nav.sidenav.clickNavLink(['Workloads', 'Pods']); | ||
projectDropdown.selectProject('openshift-console'); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd use project default
so this test works on non-OpenShift clusters.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@spadgett default
project/namespace doesn't have any Pods. knative-serving
project/namespace does, can I use that?
Also, doesn't have to be Pods, looking for any namespaced list to details view to test breadcrumbs/nav with.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated to use Workloads -> Secrets
-> default Project.
frontend/public/actions/ui.ts
Outdated
// remember the most recently-viewed project, which is automatically | ||
// selected when returning to the console |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should update this comment. It's no longer accurate. We should explain exactly what this is used for, which is now only to remember if "All Projects" was selected when returning to the list view in the current tab.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed.
f7d17eb
to
20c4f6a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: dtaylor113, spadgett The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
@dtaylor113: All pull requests linked via external trackers have merged: Bugzilla bug 1910859 has been moved to the MODIFIED state. In response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
This PR stores the last selected Project/Namespace in the brower's
sessionStorage
, which is only persisted for the current browser Tab. This is primarliy for the usecase of seeing 'all projects' in a list view, drilling into a Details view which limits to a specific project/namespace, then navigating back to list view -user expects list view to return to 'all projects' and not remain on the project/namespace shown in the Details view and often gets confused why they are seeing less items in the list view.When navigating from a Details view via Breadcrumb or sidebar Nav Item, navigation will used the last project/namespace selected by the user. This PR addresses a regression caused by:
#7433
...which removed the funcationality implemented by:
#5543
...which addressed JIRA story:
https://issues.redhat.com/browse/CONSOLE-2228
cc @sahil143