FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

fix(Options menu): added support for groups and titles by nicolethoen · Pull Request #3360 · patternfly/patternfly-react · GitHub

fix(Options menu): added support for groups and titles - #3360

Merged
dlabrecq merged 4 commits into
patternfly:masterfrom
nicolethoen:options_menu_groups
Dec 13, 2019
Merged

fix(Options menu): added support for groups and titles#3360
dlabrecq merged 4 commits into
patternfly:masterfrom
nicolethoen:options_menu_groups

Conversation

Copy link
Copy Markdown
Contributor

Addresses #3338

Follow up to core PR #2403

Copy link
Copy Markdown
Collaborator

PatternFly-React preview: https://patternfly-react-pr-3360.surge.sh

codecov-io commented Nov 27, 2019
edited
Loading

Copy link
Copy Markdown

Codecov Report

Merging #3360 into master will decrease coverage by 0.01%.
The diff coverage is 63.63%.

@@            Coverage Diff             @@
##           master    #3360      +/-   ##
==========================================
- Coverage   67.49%   67.47%   -0.02%     
==========================================
  Files         897      897              
  Lines       25158    25166       +8     
  Branches     2181     2187       +6     
==========================================
+ Hits        16980    16981       +1     
- Misses       7162     7163       +1     
- Partials     1016     1022       +6
Flag Coverage Δ
#misc 95.45% <ø> (ø) ⬆️
#patternfly3 69.28% <ø> (ø) ⬆️
#patternfly4 64.91% <63.63%> (-0.04%) ⬇️
Impacted Files Coverage Δ
...rc/components/OptionsMenu/OptionsMenuSeparator.tsx 85.71% <ø> (ø) ⬆️
...e/src/components/OptionsMenu/OptionsMenuToggle.tsx 42.85% <ø> (-19.05%) ⬇️
...ore/src/components/OptionsMenu/OptionsMenuItem.tsx 62.5% <ø> (ø) ⬆️
...mponents/OptionsMenu/OptionsMenuToggleWithText.tsx 39.28% <0%> (-3.58%) ⬇️
...ct-core/src/components/OptionsMenu/OptionsMenu.tsx 73.91% <0%> (-3.36%) ⬇️
...re/src/components/Dropdown/DropdownWithContext.tsx 90.47% <100%> (+0.15%) ⬆️
...rc/components/OptionsMenu/OptionsMenuItemGroup.tsx 69.23% <71.42%> (+12.08%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 12a6eb5...98aed1c. Read the comment docs.

dlabrecq left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I'm having trouble using keyboard navigation. When I press enter, focus is not placed on the options. Thus, I cannot use the up/down arrows to navigate the grouped options. This keyboard navigation appears to work with the other option examples.

mcarrano left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

This looks good to me, @nicolethoen . But just one question. Can I apply grouped items with titles to either a single select or multi-select option list? If so then I'm good to approve.

/** Provides an accessible name for the Options menu items group */
ariaLabel?: string;
/** TODO */
groupTitle?: string | React.ReactNode;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

should we change this to label to match the app launcher and dropdown components?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

i think that would be a breaking change at this point...

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Isn't this an internal Class? Changing the name should be ok if that that is so. We already changed the name of the Class itself correct?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It's not an internal class, so I actually might need to change the name back.

menuItems={menuGroups}
toggle={toggle}
isOpen={isOpen}
isGrouped />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

if isGrouped, the .pf-c-options-menu__menu should be a <div> instead of a <ul>. The dropdown and app launcher work that way if it helps to use as a reference.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

hm... the menu is built using the dropdown pieces so i'm surprised that didn't behavior come for free. Nice catch. I'll look into it

/** Provides an accessible name for the Options menu items group */
ariaLabel?: string;
/** TODO */
groupTitle?: string | React.ReactNode;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Isn't this an internal Class? Changing the name should be ok if that that is so. We already changed the name of the Class itself correct?

tlabaj left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM

mcoker left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

👍 Thanks @nicolethoen!

Just a note, if you pull in core v2.44.3, it will fix some extra space that shows up above group titles.

This is what it looks like now:

This is what it should look like:

dlabrecq left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

keyboard navigation appears to be working now. Thanks!

dlabrecq merged commit e608e60 into patternfly:master Dec 13, 2019
nicolethoen deleted the options_menu_groups branch February 8, 2023 13:54
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants


Back | FazBrowse Home | New Git URL