8000 feat(menu-toggle): added tokens, new design spec by mattnolting · Pull Request #6177 · patternfly/patternfly · GitHub
[go: up one dir, main page]

Skip to content

feat(menu-toggle): added tokens, new design spec#6177

Merged
mcoker merged 3 commits intopatternfly:v6from
mattnolting:chore-menu-toggle-tokens
Feb 14, 2024
Merged

feat(menu-toggle): added tokens, new design spec#6177
mcoker merged 3 commits intopatternfly:v6from
mattnolting:chore-menu-toggle-tokens

Conversation

@mattnolting
Copy link
Collaborator
@mattnolting mattnolting commented Jan 2, 2024

closes #6163

Menu toggle: https://patternfly-pr-6177.surge.sh/components/menus/menu-toggle

Text input group will be addressed in followup 6257

@patternfly-build
Copy link
Collaborator
patternfly-build commented Jan 2, 2024

@mattnolting mattnolting force-pushed the chore-menu-toggle-tokens branch from fb990c9 to 1ac39d6 Compare January 2, 2024 13:43
@wise-king-sullyman wise-king-sullyman linked an issue Jan 2, 2024 that may be closed by this pull request
@mattnolting mattnolting force-pushed the chore-menu-toggle-tokens branch 2 times, most recently from 917ce92 to 04ca11c Compare January 11, 2024 04:03
@mattnolting mattnolting marked this pull request as ready for review January 11, 2024 04:04
@mattnolting mattnolting force-pushed the chore-menu-toggle-tokens branch 2 times, most recently from 2adbc92 to c4be0d6 Compare January 17, 2024 21:02
@mattnolting mattnolting force-pushed the chore-menu-toggle-tokens branch 2 times, most recently from 84f097c to bffc98d Compare January 17, 2024 22:21
@andrew-ronaldson
Copy link
Collaborator

Looks like this split expanded state is using var(--pf-v5-c-menu-toggle--Color) . Can we point to --pf-t--global--text--color--on-brand--clicked
Screenshot 2024-01-25 at 5 48 04 PM

@mattnolting mattnolting marked this pull request as draft January 26, 2024 02:30
@mattnolting mattnolting force-pushed the chore-menu-toggle-tokens branch from bffc98d to bcef1b6 Compare January 29, 2024 20:41
@mattnolting mattnolting marked this pull request as ready for review January 29, 2024 20:41
@mattnolting mattnolting force-pushed the chore-menu-toggle-tokens branch from bcef1b6 to 97c03cd Compare January 29, 2024 21:01
@srambach
Copy link
Member

In this example, https://patternfly-pr-6177.surge.sh/components/menus/menu-toggle/#plain should the 3rd one show as expanded? And should the 5th one be marked as disabled?

10BC0

Copy link
@lboehling lboehling left a comment

Choose a reason for hiding this comment

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

Thanks Matt!! looking great. I noticed a few things --

  • Hover and expanded states for the regular toggles should be using border—color—hover and border—color—clicked respectively, not brand--hover/clicked.

  • Plain with text toggle looks like it needs the mix blend mode token so the hover shows on dark theme.

  • Split action has a blue divider in between on the default state, that should probably just point to border--color--default. image

  • Split action and split secondary only have one hover state in the PR, but the action and dropdown toggle should have separate hover/clicked interactions for both of those.

Otherwise looks good! thank you!

Copy link
Contributor
@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

  • @lboehling For the split button toggles, should each variant have separate hover styling for the action and the toggle button? The primary split button action for example only changes the style on hover for the button you're hovering. The default and secondary don't (at least I couldn't really tell)
  • For the typeahead, the outline for the arrow toggle button gets a little cutoff/overlapped by I assume the text input group border (screenshot below). This is more a nit because I barely noticed it, but I know we've noticed similar issues in the past where the outline gets cutoff so just wanted to note it
    image
  • This can be a followup, but it'd be nice to update examples so that we state what toggle is in what state. The primary and secondary examples do this, with the toggle text being "Collapsed" etc, but the plain toggle, split button and such examples aren't as clear unless you dig through the code.

@mattnolting mattnolting requested a review from lboehling January 30, 2024 19:39
@mattnolting
Copy link
Collaborator Author
  • @lboehling For the split button toggles, should each variant have separate hover styling for the action and the toggle button? The primary split button action for example only changes the style on hover for the button you're hovering. The default and secondary don't (at least I couldn't really tell)

@thatblindgeye I had the same question. I believe for the Alpha release, we're going to stick with the current interaction

  • For the typeahead, the outline for the arrow toggle button gets a little cutoff/overlapped by I assume the text input group border (screenshot below). This is more a nit because I barely noticed it, but I know we've noticed similar issues in the past where the outline gets cutoff so just wanted to note it

@thatblindgeye There are several other changes required for this. In the interest of the Alpha release, I created this followup to address text input group followup 6257

image

  • This can be a followup, but it'd be nice to update examples so that we state what toggle is in what state. The primary and secondary examples do this, with the toggle text being "Collapsed" etc, but the plain toggle, split button and such examples aren't as clear unless you dig through the code.

@thatblindgeye I also left many TODOs for menu toggle. https://github.com/patternfly/patternfly/pull/6177/files#diff-62015d4798b534885d858ec2db1ee853e67d6eedcfde5142cd4f4364e88cbd52R3-R8 are a few

Copy link
Contributor
@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

Above sounds good. Few more things I noticed which if they wouldn't be covered by the todo's you've noted, we can add on as a followup. Don't think anything stands out as blocking to me otherwise so I'd be good giving it the ✅

  • The split button primary: it may not be immediately apparent that there is a checkbox that can be clicked when it's checked:
    image

Comment on lines +163 to +165
{{> menu-toggle menu-toggle--UsesButton=true menu-toggle--IsPlain=true menu-toggle--IsDiv=true}}
 
{{#> menu-toggle menu-toggle--IsPlain=true menu-toggle--attribute='aria-label="Actions"'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we plan to support both a div wrapper and button wrapper for instances like this? With the div wrapper the focus styling ends up not working correctly, since those styles end up on the div.pf-ct-c-menu-toggle. There's still an outline, but the background isn't changing like I'd expect (at least in dark mode).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Not both, transitionally we need to support button.pf-v5-c-menu-toggle__button, but should be using .pf-v5-c-button.

Comment on lines +35 to +37
--#{$menu-toggle}--active--BackgroundColor: var(--pf-t--global--background--color--control--default);
--#{$menu-toggle}--active--BorderWidth: var(--pf-t--global--border--width--button--active);
--#{$menu-toggle}--active--BorderColor: var(--pf-t--global--border--color--clicked);
Copy link
Contributor

Choose a reason for hiding this comment

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

@lboehling is there a use case for active/clicked styling of a menu toggle that would differ from its expanded state?

@mattnolting mattnolting force-pushed the chore-menu-toggle-tokens branch from 3804795 to 3f1824e Compare January 31, 2024 01:01
Copy link
Member
@srambach srambach left a comment

Choose a reason for hiding this comment

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

🏎️

Copy link
Contributor
@thatblindgeye thatblindgeye left a comment

Choose a reason for hiding this comment

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

My comments above can be addressed as a followup, can we add those comments to the issue you created to track followups needed? Otherwise lgtm

Copy link
Collaborator
@andrew-ronaldson andrew-ronaldson left a comment

Choose a reason for hiding this comment

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

Good stuff! Thanks

A5EC
@mcoker mcoker force-pushed the chore-menu-toggle-tokens branch from 3f1824e to 13da16f Compare February 14, 2024 05:46
@mcoker mcoker merged commit 474d91d into patternfly:v6 Feb 14, 2024
@patternfly-build
Copy link
Collaborator

🎉 This PR is included in version 6.0.0-alpha.83 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Consume tokens: Menu toggle

7 participants

0