Conversation
|
Preview: https://patternfly-pr-6167.surge.sh A11y report: https://patternfly-pr-6167-a11y.surge.sh |
2f1c88a to
f99bad6
Compare
b6f701e to
0f068ae
Compare
a12cea2 to
c2b0b21
Compare
| --#{$breadcrumb}__item-divider--FontSize: var( --pf-t--global--font--size--body--sm); | ||
|
|
||
| // Breadcrumb link | ||
| --#{$breadcrumb}__link--PaddingInlineStart: revert; // use a mutable value for alignment control |
There was a problem hiding this comment.
Were changed to this file meant to be in this PR?
srambach
left a comment
There was a problem hiding this comment.
Couple of code questions and a couple of visual questions -
Should the split button toggles be pill shaped? Also, this one doesn't have the border radius all around on the disabled version.
I think the highlighting isn't working right on disabled menu items with actions/favs?
2024-01-09_08-40-53.mp4
| --#{$menu}--m-drilldown__content--TransitionDuration--transform: var(--#{$pf-global}--TransitionDuration); | ||
| --#{$menu}__item-action--hover--BackgroundColor: var(--pf-t--global--background--color--action--plain--hover); | ||
| --#{$menu}__item-action--focus--BackgroundColor: var(--pf-t--global--background--color--action--plain--focus); | ||
| --#{$menu}__item-action--m-selected--BackgroundColor: var(); |
46ea5d3 to
0376b24
Compare
| --#{$menu}__search--PaddingLeft: var(--#{$pf-global}--spacer--md); | ||
| --#{$menu}__search--PaddingRight: var(--#{$pf-global}--spacer--md); |
There was a problem hiding this comment.
It looks like the Figma design shows no inline padding. @lboehling can you confirm? I'm looking at the Filter Search Input design.
| --#{$menu}__list-item--m-danger--Color: var(--pf-t--global--text--color--status--danger--default); | ||
| --#{$menu}__list-item--m-load__item--Color: var(--pf-t--global--text--color--link--default); | ||
| --#{$menu}__list-item--has--menu-action--PaddingRight: var(--pf-t--global--spacer--sm); | ||
| --#{$menu}__list-item--child--not-active--BackgroundColor: var(--pf-t--global--background--color--action--plain--default); |
There was a problem hiding this comment.
This prevents parent siblings from changing background on hover
There was a problem hiding this comment.
Just wanted to check that this is still needed? Tried removing where this var is being applied locally and at least for the Flyout and Drilldown examples it didn't seem to make a difference
0376b24 to
b339af2
Compare
b339af2 to
418b137
Compare
|
@andrew-ronaldson Same thing happens on pf6. That's part of the menu toggle, separate from menu. I'm updating menu toggle now :) |
mcoker
left a comment
There was a problem hiding this comment.
Left some comments, though in v5, hovering/focusing anything in a menu list item (the main item and/or any actions in it) would trigger the background change on the list item, and I see that was removed here. In checking with @lboehling, it looks like we want to keep the behavior from v5, and that impacts a lot of my feedback. Let's regroup on Monday and see what the best path forward is to getting menu updated for alpha.
| &:first-child { | ||
| margin-inline-start: calc(var(--#{$breadcrumb}__link--PaddingInlineStart) * -1); // left align first item in list with list bounds while retaining link padding | ||
| } |
There was a problem hiding this comment.
Oh I was asking why the padding was added in the first place. It doesn't exist in v6 currently. This last example is misaligned but that's because the browser/agent styles are adding padding to the breadcrumb link when it's a button. IMO that's just a bug we overlooked since we don't want the default button element styles - we'd just remove that (set breadcrumb__link to padding: 0).
This is what I'm seeing in this PR currently
| --#{$menu}__item-action--PaddingBlock: var(--pf-t--global--spacer--sm); | ||
| --#{$menu}__item-action--PaddingInline: var(--pf-t--global--spacer--md); | ||
| --#{$menu}__item-action--FontSize: var(--pf-t--global--font--size--body--default); |
There was a problem hiding this comment.
doesn't look like any of these are used?
|
|
||
| // - Menu disabled | ||
| .#{$menu}__item, | ||
| .#{$menu}__action { |
There was a problem hiding this comment.
Doesn't look like .#{$menu}__action is a thing?
| justify-content: center; | ||
| padding-block-start: var(--#{$menu}__list-item--m-loading--PaddingTop); | ||
| overflow: hidden; // prevents spinner rotation from overflowing | ||
| pointer-events: none; |
There was a problem hiding this comment.
I'm assuming disabling pointer-events keeps the backgrounds and hover/interaction styles from showing up? It's still focusable and tabbable. Though if it shouldn't be interacted with, it shouldn't have a button inside.
@tlabaj @thatblindgeye is the loading item button something that can interact with, or do you think that's something we might support? As in (just as an example), someone could click on it to stop loading whatever it's doing? Also a side note, at least in this example, the "view more" link has tabindex="-1" so I can't tab to it - is that a bug? https://www.patternfly.org/components/menus/menu/react/with-view-more/
There was a problem hiding this comment.
@mcoker If you are referring to the spinner, it is currently a span with not onClick callback. At this pont I would not anticipate a use case where we would click on it.
I believe the tabindex="-1" is correct. We do not typically tab through our menu items. We have been navigating them with the up and down arrow keys. @thatblindgeye please correct me if I am wrong.
There was a problem hiding this comment.
That's correct regarding the tabindex. We do update the tabindex to 0 in React when an item actually receives focus via the arrow keys (just so the previously focused item will receive focus again upon entering the Menu, unless the menu was closed), but otherwise should be -1.
The/one of the only times we'd need to tab to content in a Menu is if there's actions in a footer/outside the actual menu item list.
There was a problem hiding this comment.
If you are referring to the spinner, it is currently a span with not onClick callback. At this pont I would not anticipate a use case where we would click on it.
@tlabaj I'm referring to the button.pf-v5-c-menu__item that wraps it - you can see it in the screenshot below
There was a problem hiding this comment.
@mcoker I see. Even thought the spinner is rendered in a button, the onClick is only called when the "View more" button is clicked and not the spinner. If we wanted to allow for that we would need to modify the code. I would not consider ding that right now unless we had a request for it. At that point I would probably get UX's opinion on the interaction.
| {{/if}} | ||
| <div class="{{pfv}}menu__item-action | ||
| {{setModifiers | ||
| menu-list-item--IsAriaDisabled='pf-m-aria-disabled' |
There was a problem hiding this comment.
Do you need this on both the __item-action container and the action inside?
| padding-block-start: var(--#{$menu}--PaddingBlockStart); | ||
| padding-block-end: var(--#{$menu}--PaddingBlockEnd); | ||
| overflow: hidden; | ||
| color: var(--#{$menu}--Color); |
| color: var(--#{$menu}__list-item--Color); | ||
| background-color: var(--#{$menu}__list-item--BackgroundColor); |
There was a problem hiding this comment.
background-color is needed, color is not
b2f975c to
1a1b619
Compare
|
Updates:
|
1a1b619 to
5dfe29c
Compare
|
It doesn't look like selected menu items are showing the check when selected? https://patternfly-pr-6167.surge.sh/components/menus/menu/#option-multi-select |
5dfe29c to
0aa4da7
Compare
Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> Update src/patternfly/components/Menu/menu.scss Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> Update src/patternfly/components/Menu/menu.scss Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> Update src/patternfly/components/Menu/menu.scss Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> Update src/patternfly/components/Menu/menu.scss Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com> Update src/patternfly/components/Menu/menu.scss Co-authored-by: Michael Coker <35148959+mcoker@users.noreply.github.com>
0aa4da7 to
d15c8a5
Compare
mcoker
left a comment
There was a problem hiding this comment.
LGTM! I'll open a couple of follow-up issues for higher and lower priority updates.
| --#{$menu}__list-item--BackgroundColor: var(--pf-t--global--background--color--action--plain--default); | ||
| --#{$menu}__list-item--hover--BackgroundColor: var(--pf-t--global--background--color--action--plain--hover); | ||
| --#{$menu}__list-item--MixBlendMode: normal; | ||
| --#{$menu}__list-item--MixBlendMode--hover: var(--pf-t--global--background--color--action--plain--hover--blend); |
There was a problem hiding this comment.
nit
| --#{$menu}__list-item--MixBlendMode--hover: var(--pf-t--global--background--color--action--plain--hover--blend); | |
| --#{$menu}__list-item--hover--MixBlendMode: var(--pf-t--global--background--color--action--plain--hover--blend); |
| padding-inline-end: var(--#{$menu}__list-item--has--menu-action--PaddingInlineEnd); | ||
| } | ||
|
|
||
| &:has(> :hover) { |
There was a problem hiding this comment.
Can this not just be &:hover? This also needs to apply on focus, :focus-within should do it.
|
|
||
| &.pf-m-selected { | ||
| .#{$menu}__item-select-icon { | ||
| &:is(:hover, :focus, :active, .pf-m-selected) { |
There was a problem hiding this comment.
is :active needed? If it isn't needed, I'd prefer remove it and we can leave :active as it is across the board unless there is a design/code reason for it.
| .#{$check} { | ||
| --pf-v5-c-check__input--TranslateY: none; | ||
| // expand clickable area to full width/height of list__item | ||
| input::before { |
There was a problem hiding this comment.
This shouldn't be needed, and I'm pretty sure a pseudo element on an <input> isn't in the spec (this doesn't work in FF).
For checkbox items the __item is a <label>, which should make the whole thing clickable, but it isn't working currently because the label has an invalid for attribute for the input inside of it. Pretty sure we just need to take the for attribute off entirely, it isn't needed.
| &.pf-m-favorited, | ||
| &.pf-m-favorited:hover, | ||
| &.pf-m-favorited .#{$button} { |
There was a problem hiding this comment.
Could this not just target the button? eg, remove the first two selectors.
| &.pf-m-favorited, | |
| &.pf-m-favorited:hover, | |
| &.pf-m-favorited .#{$button} { | |
| &.pf-m-favorited .#{$button} { |
| --#{$breadcrumb}__link--PaddingInlineStart: var(--pf-t--global--spacer--sm); // use a mutable value for alignment control | ||
| --#{$breadcrumb}__link--PaddingInlineEnd: var(--pf-t--global--spacer--sm); // use a mutable value for alignment control |
There was a problem hiding this comment.
I'd still like to understand why padding was added. v5 has inline padding in the buttons example but it's a bug and shouldn't be there.
| .#{$menu}, | ||
| .#{$menu}__list, | ||
| .#{$menu}__group { | ||
| @include pf-v5-hidden-visible(grid); | ||
| } | ||
|
|
||
| // - Menu shared display flex | ||
| .#{$menu}__content, | ||
| .#{$menu}__list-item, | ||
| .#{$menu}__item, | ||
| .#{$menu}__item-main, | ||
| .#{$menu}__breadcrumb, | ||
| .#{$menu}__item-check, | ||
| .#{$menu}__item-action, | ||
| .#{$menu}__item-action-icon { | ||
| @include pf-v5-hidden-visible(flex); | ||
| } |
There was a problem hiding this comment.
Why are all of these using hidden-visible? In v5, only __list, __item, and __group use it. If we aren't trying to support the pf-m-hidden/visible[-on-breakpoint] on all of these elements, we should remove this. If we are trying to support that, we should talk about why.
|
|
||
| // - Menu item disabled - Menu action disabled | ||
| .#{$menu}__list-item, | ||
| .#{$menu}__item-action { |
There was a problem hiding this comment.
Why is item-action included here? From glancing at it, it looks like the only thing that would apply to item-action is pointer-events but the action that goes inside of item-action (the button component) should handle all of that for us.
|
|
||
| &:has(> :hover) { | ||
| --#{$menu}__list-item--BackgroundColor: var(--#{$menu}__list-item--hover--BackgroundColor); | ||
| --#{$menu}__list-item--MixBlendMode: var(--#{$menu}__list-item--MixBlendMode--hover); |
| --#{$menu}__item-action--FontSize: var(--pf-t--global--font--size--body--default); | ||
| --#{$menu}__item-action--icon--size: var(--#{$menu}__item-action--FontSize, var(--pf-t--global--icon--size--md)); | ||
| --#{$menu}__item-action--Color: var(--pf-t--global--icon--color--subtle); | ||
| --#{$menu}__item-action--m-favorited--Color: var(--pf-t--global--icon--color--favorite--clicked); | ||
| --#{$menu}__item-action--button--MinWidth: calc(var(--#{$menu}__item-action--icon--size) + var(--pf-t--global--spacer--sm) * 2); |
There was a problem hiding this comment.
I think this is the only one that's needed now?
| --#{$menu}__item-action--FontSize: var(--pf-t--global--font--size--body--default); | |
| --#{$menu}__item-action--icon--size: var(--#{$menu}__item-action--FontSize, var(--pf-t--global--icon--size--md)); | |
| --#{$menu}__item-action--Color: var(--pf-t--global--icon--color--subtle); | |
| --#{$menu}__item-action--m-favorited--Color: var(--pf-t--global--icon--color--favorite--clicked); | |
| --#{$menu}__item-action--button--MinWidth: calc(var(--#{$menu}__item-action--icon--size) + var(--pf-t--global--spacer--sm) * 2); | |
| --#{$menu}__item-action--m-favorited--Color: var(--pf-t--global--icon--color--favorite--clicked); |
|
🎉 This PR is included in version 6.0.0-alpha.84 🎉 The release is available on: Your semantic-release bot 📦🚀 |













closes #6162
closes #6218