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
Add pinned resource pages to dev perspective navigation #4903
Add pinned resource pages to dev perspective navigation #4903
Conversation
d36a188
to
6cc269b
Compare
@openshift/team-devconsole-ux the modal prompting the user to unpin from search seems a bit over the top because the user doesn't lose data and to pin is just one click away. I can understand having the model from the nav because unpinning from there requires the user to go back to search page to repin. |
> | ||
{getToggleText(item)} | ||
{getToggleText(resource)} | ||
<a |
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.
This should be a button.
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.
yeah, but then we have a button as a child of a button which gives console warning:
Warning: validateDOMNesting(...): <button> cannot appear as a descendant of <button>
{getToggleText(resource)} | ||
<a | ||
className="pf-c-button pf-m-link co-search-group__pin-toggle" | ||
key="pin-toggle" |
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.
Key isn't needed here.
Are you sure you want to unpin <strong>{label}</strong> from navigation? | ||
</span> | ||
); | ||
confirmModal({ |
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.
This modal is duplicate code.
I don't agree that we need a modal popup from the search page. But that's a UX decision.
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.
Added it there because accidental unpin'ing causes you to lose the order of the navigation pinned items. If a mistake is made you'd have to unpin/pin a bunch of items (requiring you to re-select them in the search page) to get that order back.
64ac6ad
to
b408c0c
Compare
/retest |
1 similar comment
/retest |
b408c0c
to
3e0554f
Compare
the thinking was if someone clicked quickly in the spot twice, this would prevent them from unpinning by mistake. But I could go either way @christianvogt |
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! Nice job @jeff-phillips-18
3e0554f
to
9cf605a
Compare
Updated per UX/PM discussions. |
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 :-)
.oc-nav-pinned-item__unpin-button { | ||
visibility: hidden; | ||
&:focus { | ||
visibility: visible; | ||
} | ||
} | ||
&:hover, &:focus { | ||
.oc-nav-pinned-item__unpin-button { | ||
visibility: visible; |
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.
Use opacity instead of visibility so that the button node can be navigated to via keyboard tab.
9cf605a
to
21d8cb8
Compare
9433f5f
to
f7d37d2
Compare
/retest |
f7d37d2
to
aa18355
Compare
aa18355
to
065e0d8
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: christianvogt, dtaylor113, jeff-phillips-18, serenamarie125 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 |
It appears changes in this PR caused https://bugzilla.redhat.com/show_bug.cgi?id=1829886. |
Fixes:
https://issues.redhat.com/browse/ODC-3326
Analysis / Root cause:
As a developer I want to be able to access my frequent search results. I use search to gain access to resource lists that aren't accessible through the existing nav in the dev perspective.
Solution Description:
Add a
Pin to navigation
button to the search results header (Unpin from navigation
if already pinned).Show pinned items in the navigation bar for the dev perspective.
Screen shots / Gifs for design review:
Browser conformance:
cc @openshift/team-devconsole-ux @serenamarie125
/kind feature