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.
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
Editor: Add extensibility to PreviewOptions v2 #64644
Editor: Add extensibility to PreviewOptions v2 #64644
Changes from 3 commits
3b94038
f30edaf
290072b
095e3aa
6b926ab
1a975c8
bf99ae0
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can probably drop the
withPluginContext
. It's only here for icon context, and as @simison noted, there's no need for inheriting icons just yet.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The note mentioned above for clarity:
It's all supported out of the box for the
PluginMoreMenuItem
:Whenever, the sidebar is selected, it's reflected in the menu with the checkmark icon ✔️. Let's not limit the options that are supported out of the box like the icon that get inherited for all fills. That's the part that makes the More Menu item behave as a checkbox:
gutenberg/packages/editor/src/components/plugin-sidebar-more-menu-item/index.js
Lines 56 to 63 in 71e0fae
gutenberg/packages/interface/src/components/complementary-area-more-menu-item/index.js
Lines 43 to 44 in 71e0fae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Then, if we want to keep the icon from the plugin context, let's use the
usePluginContext
hook instead ofcompose
andwithPluginContext
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If
usePluginContext
exist, then it would be so much more up to recent React standards 😄