-
Notifications
You must be signed in to change notification settings - Fork 97
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
feat(drilldown): added drilldown menu #3438
Conversation
Preview: https://patternfly-pr-3438.surge.sh A11y report: https://patternfly-pr-3438-coverage.surge.sh
|
d5cc11b
to
86accf5
Compare
@mcoker @christiemolloy examples have included JS to replicate React state mgmt. I'll remove that before final review. |
86accf5
to
34ba551
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.
This is looking good @mattnolting . My only critique is that when you drill into a new level, I believe that the header should show the name of the parent node rather than just the text "Back". To return up a level, the user would click the "<" icon. Does that make sense to others?
34ba551
to
40386f3
Compare
@mattnolting @mcarrano Agree with showing the current level and use the back arrow for going back. However, it looks great to me. :) |
@mcarrano do you mean only the arrow would be clickable, and not the entire item? (arrow + parent node name) |
This looks great! I'll dig in some more, but some initial questions:
|
To accomplish the left/right transition, I had to hide overflow, limiting the viewable children to the root dropdown menu width. Which means using the parent menu as the background for all child menus. Otherwise you would see child menus fading into view to the left/right of the initial dropdown. So it would be more of a fade in/fade out transition than a slide in/slide out transition. I couldn't find another way do that, also the dropshadow interferes with transitions when using the child menu's background.
Since I used the width of the parent menu for all children, I had to set a base width. We could apply that css variable to the menu component making it easily changeable and set the base size w/
Yep, agree 👍 Here's the prototype I created if you want to experiment with it : https://codepen.io/bobcatTaco/pen/pogQbmY |
This is looking great. I love the animation @mattnolting ! The only thing I would change is what shows up in the breadcrumb header when you drill down. Rather than being just a back link, it would contain the title of the parent node that you are viewing the contents of. The user would need to click the "<" to go back up a level. See how the Move To feature works in Google Drive, for example. Here's what that looks like: Only the back-arrow is interactive. |
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 looks good to me! Can you update the transitions to be more specific?
e716188
to
d33c324
Compare
ebdfd30
to
addefef
Compare
@christiemolloy Great point, i'm not sure how to do this statically. I'd like to shift this to React. |
@christiemolloy @mcoker updated |
@@ -2,6 +2,7 @@ | |||
{{#if divider--attribute}} | |||
{{divider--attribute}} | |||
{{/if}} | |||
aria-hidden="true" |
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.
did you mean to add this?
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 did, but maybe better addressed in another issue :)
--pf-c-menu--m-drilldown--c-menu--Transition: transform var(--pf-c-menu--m-drilldown--c-menu--TransitionDuration--transform), visibility var(--pf-c-menu--m-drilldown--c-menu--TransitionDuration--visibility); | ||
|
||
// Drilldown list | ||
--pf-c-menu--m-drilldown__list--TransitionDuration--transform: transform var(--pf-global--TransitionDuration); |
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.
--pf-c-menu--m-drilldown__list--TransitionDuration--transform: transform var(--pf-global--TransitionDuration); | |
--pf-c-menu--m-drilldown__list--TransitionDuration--transform: var(--pf-global--TransitionDuration); |
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.
Just one thing to fix a broken transition, and a question about the divider.
e2b82bc
to
e031697
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!!!
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.
NICE!!!
e031697
to
6e10d23
Compare
🎉 This PR is included in version 4.55.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
fixes #2635
Parent menus control placement of children. If
pf-m-drilled-in
is applied topf-c-menu
, the menu shifts to the lefttransform: translateX(-100%)
, out of view. The nested, children menus are positionedleft: 100%;
, until.pf-m-drilled-in
is applied, where thentransform: translateX(-100%)
is applied.Immediate parent
li
of the current menu has.pf-m-current-path
applied.pf-m-current-path
hides sibling, non-currentli
s and sets their visibility tohidden
. We need to use visibility here because JS will need to reference height of lists when showing/hiding them.