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

Bug 1910859: breadcrumbs and nav doesn't use last namespace #7714

Merged
merged 1 commit into from Jan 12, 2021

Conversation

dtaylor113
Copy link
Contributor

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

Installed-Operators-·-OKD

cc @sahil143

@openshift-ci-robot openshift-ci-robot added bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. component/core Related to console core functionality labels Jan 5, 2021
@openshift-ci-robot openshift-ci-robot added bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. and removed bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jan 5, 2021
@openshift-ci-robot
Copy link
Contributor

@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
  • bug is open, matching expected state (open)
  • bug target release (4.7.0) matches configured target release for branch (4.7.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

In response to this:

/bugzilla refresh

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.

@openshift openshift deleted a comment from openshift-ci-robot Jan 5, 2021
@spadgett
Copy link
Member

spadgett commented Jan 5, 2021

@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.

@dtaylor113
Copy link
Contributor Author

/retest

@openshift-ci-robot openshift-ci-robot added the component/dev-console Related to dev-console label Jan 6, 2021
@dtaylor113
Copy link
Contributor Author

@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.

Added Cypress tests


it('nav and breadcrumbs restores last selected Project when navigating from details to list view', () => {
nav.sidenav.clickNavLink(['Workloads', 'Pods']);
projectDropdown.selectProject('openshift-console');
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Comment on lines 205 to 206
// remember the most recently-viewed project, which is automatically
// selected when returning to the console
Copy link
Member

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

fixed.

Copy link
Member

@spadgett spadgett left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 12, 2021
@openshift-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 12, 2021
@openshift-merge-robot openshift-merge-robot merged commit 2013476 into openshift:master Jan 12, 2021
@openshift-ci-robot
Copy link
Contributor

@dtaylor113: All pull requests linked via external trackers have merged:

Bugzilla bug 1910859 has been moved to the MODIFIED state.

In response to this:

Bug 1910859: breadcrumbs and nav doesn't use last namespace

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.

@spadgett spadgett added this to the v4.7 milestone Jan 13, 2021
@dtaylor113 dtaylor113 deleted the last-namespace branch January 22, 2021 19:07
@dtaylor113 dtaylor113 restored the last-namespace branch January 22, 2021 19:07
@dtaylor113 dtaylor113 deleted the last-namespace branch January 22, 2021 19:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. bugzilla/severity-low Referenced Bugzilla bug's severity is low for the branch this PR is targeting. bugzilla/valid-bug Indicates that a referenced Bugzilla bug is valid for the branch this PR is targeting. component/core Related to console core functionality component/dev-console Related to dev-console lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants