-
Notifications
You must be signed in to change notification settings - Fork 4.7k
UI Components: Refactor BlockSettingsMenu and MoreMenu as DropdownMenu #14843
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
Merged
Merged
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
9dc5a86
Components: Document missing menuLabel, position, className Dropdown …
aduth e01d053
Components: Add render prop support to DropdownMenu
aduth eb321f9
Block Editor: Refactor BlockSettingsMenu as DropdownMenu
aduth e262c3f
CHANGELOG 7a54cec63
aduth 635e7f4
CHANGELOG 743e4da7c
aduth 68dd8f5
CHANGELOG ea8265827
aduth e557b60
Components: Remove unintended tabs from DropdownMenu tests
aduth 51acab9
Refactor MoreMenu component to use DropdownMenu component
gziolo 2d34643
Use single label for DrowdownMenu components
gziolo cf462a6
Fix all failing e2e tests
gziolo 7ea821b
Add all class names for backward compatibility
gziolo dc93e96
Fix unit tests by refreshing saved snapshots
gziolo 4864809
Update packages/components/src/menu-group/index.js
aduth 67a4f8b
Add back removed changelog update for components during rebase
gziolo 6276b9c
Mark all props used with DropdownMenu for backward compatibility as u…
gziolo 2456dde
Remove obsolete DropdownMenuSepararator component
gziolo 1b24803
Apply changes after rebase to align CSS styles with master
gziolo 032167a
Display dropdown menu indicator only when icon set expliclity to false
gziolo File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
60 changes: 4 additions & 56 deletions
60
packages/block-editor/src/components/block-settings-menu/style.scss
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,59 +1,7 @@ | ||
| .block-editor-block-settings-menu__toggle .dashicon { | ||
| transform: rotate(90deg); | ||
| .block-editor-block-settings-menu__content { | ||
| padding: 0; | ||
| } | ||
|
|
||
| // Popout menu | ||
| .block-editor-block-settings-menu__popover { | ||
| &::before, | ||
| &::after { | ||
| margin-left: 2px; | ||
| } | ||
|
|
||
| .block-editor-block-settings-menu__content { | ||
| padding: ($grid-size - $border-width) 0; | ||
| } | ||
|
|
||
| .block-editor-block-settings-menu__separator { | ||
| margin-top: $grid-size; | ||
| margin-bottom: $grid-size; | ||
| margin-left: 0; | ||
| margin-right: 0; | ||
| border-top: $border-width solid $light-gray-500; | ||
|
|
||
| // Check if the separator is the last child in the node and if so, hide itself | ||
| &:last-child { | ||
| display: none; | ||
| } | ||
| } | ||
|
|
||
| .block-editor-block-settings-menu__title { | ||
| display: block; | ||
| padding: 6px; | ||
| color: $dark-gray-300; | ||
| } | ||
|
|
||
| // Menu items | ||
| .block-editor-block-settings-menu__control { | ||
| width: 100%; | ||
| justify-content: flex-start; | ||
| background: none; | ||
| outline: none; | ||
| border-radius: 0; | ||
| text-align: left; | ||
| cursor: pointer; | ||
| color: $dark-gray-600; | ||
| @include menu-style__neutral; | ||
|
|
||
| &:hover:not(:disabled):not([aria-disabled="true"]) { | ||
| @include menu-style__hover; | ||
| } | ||
|
|
||
| &:focus:not(:disabled):not([aria-disabled="true"]) { | ||
| @include menu-style__focus; | ||
| } | ||
|
|
||
| .dashicon { | ||
| margin-right: 5px; | ||
| } | ||
| } | ||
| .block-editor-block-settings-menu__toggle .dashicon { | ||
| transform: rotate(90deg); | ||
| } |
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.