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 2090895: Support startsWith Nav Extension property #11660

Merged

Conversation

andrewballantyne
Copy link
Contributor

Supporting startsWith from the navigation extensions.

I'm a bit unsure if it was ever supported. Quick searching of the history appears it was not supported in this manner.

To test this, you simply need to add a snippet like this one to any console.navigation/href, console.navigation/resource-ns or console.navigation/resource-cluster extension in the dynamic-demo-plugin.

      "startsWith": ["test"],

Then navigate to any of the Dynamic Plugin routes that start with test and the navs whom you modified will highlight.

/assign @TheRealJon

@openshift-ci openshift-ci bot added bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jun 7, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 7, 2022

@andrewballantyne: This pull request references Bugzilla bug 2090895, which is invalid:

  • expected the bug to target the "4.11.0" release, but it targets "---" instead

Comment /bugzilla refresh to re-evaluate validity if changes to the Bugzilla bug are made, or edit the title of this pull request to link to a different bug.

In response to this:

Bug 2090895: Support startsWith Nav Extension property

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-ci openshift-ci bot requested review from jcaianirh and kyoto June 7, 2022 14:27
@openshift-ci openshift-ci bot added component/core Related to console core functionality approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 7, 2022
@andrewballantyne
Copy link
Contributor Author

/bugzilla refresh

@openshift-ci openshift-ci bot added 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. and removed bugzilla/severity-unspecified Referenced Bugzilla bug's severity is unspecified for the PR. bugzilla/invalid-bug Indicates that a referenced Bugzilla bug is invalid for the branch this PR is targeting. labels Jun 7, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 7, 2022

@andrewballantyne: This pull request references Bugzilla bug 2090895, 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.11.0) matches configured target release for branch (4.11.0)
  • bug is in the state ASSIGNED, which is one of the valid states (NEW, ASSIGNED, ON_DEV, POST, POST)

Requesting review from QA contact:
/cc @yapei

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-ci openshift-ci bot requested a review from yapei June 7, 2022 14:27
@andrewballantyne
Copy link
Contributor Author

/cc @jeff-phillips-18

Jeff, do you ever recall this working when you were reworking our nav to support pinned items back a couple years ago?

@jeff-phillips-18
Copy link
Member

/cc @jeff-phillips-18

Jeff, do you ever recall this working when you were reworking our nav to support pinned items back a couple years ago?

I don't recall it working like this before

Copy link
Member

@TheRealJon TheRealJon left a comment

Choose a reason for hiding this comment

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

Sections also need to be marked as active when a child is active. Check out the static startsWith function that's already implemented on the NavLink class. I'm not sure why this was never used, but we could use it in all of the inheriting classes so that this function will just work.

@andrewballantyne
Copy link
Contributor Author

Sections also need to be marked as active when a child is active. Check out the static startsWith function that's already implemented on the NavLink class. I'm not sure why this was never used, but we could use it in all of the inheriting classes so that this function will just work.

Yup, the test scenario was not part of what I was testing. Good catch.

To test this you'll need to add an extension that uses startsWith that aligns to another section's item. So when you select one nav item, it can highlight a hidden nav item under another section.

@andrewballantyne
Copy link
Contributor Author

/retest

1 similar comment
@andrewballantyne
Copy link
Contributor Author

/retest

Copy link
Member

@TheRealJon TheRealJon 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 openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jun 16, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 16, 2022

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: andrewballantyne, TheRealJon

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
Copy link
Contributor

/retest-required

Remaining retests: 2 against base HEAD 010d9cf and 8 for PR HEAD ebe1717 in total

@andrewballantyne
Copy link
Contributor Author

/retest

@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 16, 2022

@andrewballantyne: all tests passed!

Full PR test history. Your PR dashboard.

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. I understand the commands that are listed here.

@openshift-ci openshift-ci bot merged commit 855b4e3 into openshift:master Jun 17, 2022
@openshift-ci
Copy link
Contributor

openshift-ci bot commented Jun 17, 2022

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

Bugzilla bug 2090895 has been moved to the MODIFIED state.

In response to this:

Bug 2090895: Support startsWith Nav Extension property

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.

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