E537 chore(menu-toggle): updated components to use menu toggle by mattnolting · Pull Request #6566 · patternfly/patternfly · GitHub
[go: up one dir, main page]

Skip to content

chore(menu-toggle): updated components to use menu toggle#6566

Merged
mcoker merged 8 commits intopatternfly:v6from
mattnolting:chore-menu-toggle-6207
May 14, 2024
Merged

chore(menu-toggle): updated components to use menu toggle#6566
mcoker merged 8 commits intopatternfly:v6from
mattnolting:chore-menu-toggle-6207

Conversation

@mattnolting
Copy link
Collaborator
@mattnolting mattnolting commented Apr 24, 2024

@patternfly-build
Copy link
Collaborator
patternfly-build commented Apr 24, 2024

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.

The menu on a menu toggle is showing up to the right
image

There seems to be a problem if the content is too wide?
image

Various places I see the toggle scrunched up
image

Comment on lines +12 to +21
### New
```hbs
{{> menu-new menu--width="200px" menu--items=(
entries
(entry name='super fun' IsDisabled=true)
(entry name='test 1' thing='try me')
(entry name='test 2' thing='I\'m here')
)
}}
```
Copy link
Member

Choose a reason for hiding this comment

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

This doesn't seem to render?


// TODO: update alignment for text and action
// TODO: update to use gap instead of margin

Copy link
Member

Choose a reason for hiding this comment

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

Can you make issues for these changes instead of comments here?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

backstop report

I'm sure some of these are known/purposeful since it's a WIP but since I've reviewed, IMO everything looks good to merge except:

  • The HBS helpers have console.logs that need to be removed
  • The "New" menu example should be removed
  • Overflow menu id's are broken, left a comment below on overflow.hbs

I'd like to merge this if possible so these examples are fixed. Currently they're throwing off the layout of lots of components (this visual regression report has 148 changes as result of this PR) and causing lots of issues with our screenshots. It would be great to fix those. If there is a different way of doing the hbs to make it more streamlined, that could always be done later and the visual regression tool can validate since it should(?) result in no visual changes. wdyt @srambach?

menu-toggle--IsPlain=true
menu-toggle--HasKebab=true
menu-toggle--id=(dasherize data-list--id data-list-item--id 'menu-toggle')
menu-toggle--aria-label='Dual list item menu toggle'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
menu-toggle--aria-label='Dual list item menu toggle'}}
menu-toggle--aria-label='Data list item menu toggle'}}

Comment on lines +12 to +21
### New
```hbs
{{> menu-new menu--width="200px" menu--items=(
entries
(entry name='super fun' IsDisabled=true)
(entry name='test 1' thing='try me')
(entry name='test 2' thing='I\'m here')
)
}}
```
Copy link
Contributor

Choose a reason for hiding this comment

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

Did you mean to leave this in?


{{#>overflow-menu
overflow-menu-button--aria-label="Expand button group overflow menu"
overflow-menu--id=(concat toolbar--id '-overflow-menu') menu--IsExpanded=toolbar-overflow-menu-example--IsExpanded
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
overflow-menu--id=(concat toolbar--id '-overflow-menu') menu--IsExpanded=toolbar-overflow-menu-example--IsExpanded
overflow-menu--id=(concat toolbar--id '-overflow-menu')
menu--IsExpanded=toolbar-overflow-menu-example--IsExpanded

Comment on lines +2 to +3
{{ternary overflow-menu--id 'id="{{overflow-menu--id}}"' ''}}
{{ternary overflow-menu--attribute 'id="{{overflow-menu--id}}"' ''}}>
Copy link
Contributor
@mcoker mcoker Apr 25, 2024

Choose a reason for hiding this comment

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

ID's are broken

Screenshot 2024-04-24 at 7 35 51 PM

I'm assuming these 2 lines should be something like this instead? Though I tested it and it's not handling the quotes and everything passed to overflow-menu--attribute even though it's wrapped in {{{...}}}.

Suggested change
{{ternary overflow-menu--id 'id="{{overflow-menu--id}}"' ''}}
{{ternary overflow-menu--attribute 'id="{{overflow-menu--id}}"' ''}}>
{{ternary overflow-menu--id 'id="' overflow-menu--id '"' ''}}
{{{ternary overflow-menu--attribute overflow-menu--attribute ''}}}>

Just a side note, not a big deal since this isn't shipped code, but IMO if we're gonna change the way these blocks are written, let's do it consistently. TL;DR - we can just write it the way we know works and is in all of the other hbs, and make this kind of update when we can talk about it, do it consistently, and test it.

@mattnolting mattnolting force-pushed the chore-menu-toggle-6207 branch from 8ee341d to cd2e81a Compare April 25, 2024 00:50
@mattnolting mattnolting force-pushed the chore-menu-toggle-6207 branch 2 times, most recently from b6d571b to bea59c3 Compare April 25, 2024 17:03
Comment on lines +7 to +8
--#{$menu}--MinWidth: max-content;
--#{$menu}--MaxWidth: 400ch;
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you explain why these 2 changes are needed and need to be a part of this PR? Also what's the significance of 400ch?

In react, popper currently manages the menu size including min-width, and there are use cases of menus not as a dropdown, so I'm hesitant to make this change as it could have unintended side effects depending on how the menu is being used.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Menu has no max-width control.

Screenshot 2024-04-26 at 8 36 11 AM

{{/menu}}
{{/dropdown}}
{{> menu-toggle menu-toggle--text='System log' menu-toggle--id=(dasherize log-viewer--id 'menu-toggle')}}
{{#> menu menu--modifier="pf-m-drilldown pf-m-align-right" menu--attribute='style="--pf-v6-c-menu--Width: 200px;"'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{#> menu menu--modifier="pf-m-drilldown pf-m-align-right" menu--attribute='style="--pf-v6-c-menu--Width: 200px;"'}}
{{#> menu menu--modifier="pf-m-drilldown" menu--attribute='style="--pf-v6-c-menu--Width: 200px;"'}}

@@ -0,0 +1,51 @@
{{> menu-toggle menu-toggle--text='System log' menu-toggle--id=(dasherize log-viewer--id 'menu-toggle')}}
{{#> menu menu--modifier="pf-m-drilldown pf-m-align-right" menu--attribute='style="--pf-v6-c-menu--Width: 200px;"'}}
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
{{#> menu menu--modifier="pf-m-drilldown pf-m-align-right" menu--attribute='style="--pf-v6-c-menu--Width: 200px;"'}}
{{#> menu menu--modifier="pf-m-drilldown" menu--attribute='style="--pf-v6-c-menu--Width: 200px;"'}}

@mattnolting mattnolting force-pushed the chore-menu-toggle-6207 branch 3 times, most recently from 427be15 to 13516ee Compare April 30, 2024 15:05
@mattnolting mattnolting marked this pull request as ready for review April 30, 2024 15:26
@mattnolting mattnolting requested review from mcoker and srambach April 30, 2024 15:26
@mattnolting mattnolting force-pushed the chore-menu-toggle-6207 branch from 55f35eb to 66dbbd6 Compare May 3, 2024 18:21
@mattnolting mattnolting force-pushed the chore-menu-toggle-6207 branch from 66dbbd6 to 17f5ec3 Compare May 13, 2024 15:15
@mattnolting mattnolting force-pushed the chore-menu-toggle-6207 branch from 17f5ec3 to 8321c1e Compare May 14, 2024 15:43
@srambach
Copy link
Member
srambach commented May 14, 2024

@mattnolting
Copy link
Collaborator Author

OK - here's the report I just ran https://drive.google.com/file/d/1sIz7YyVqInrF6f8M2gjFTjjsjO_1_aR7/view?usp=sharing The only significant differences I see are

@srambach Thanks for your help! I'll create an issue and update today.

Copy link
Contributor
@mcoker mcoker left a comment

Choose a reason for hiding this comment

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

LGTM! 🚀

@mcoker mcoker merged commit a5ac993 into patternfly:v6 May 14, 2024
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.

🏇

@patternfly-build
Copy link
Collaborator

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

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.

Overflow menu - remove deprecated dropdown Replace uses of Dropdown (deprecated) with MenuToggle

4 participants

0