Repository navigation
List View: Allow right-click to open block settings dropdown, add editor setting #50273
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
Changes from all commits
41d62f4
7c23264
007a1ed
35d42be
4523767
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -65,6 +65,13 @@ export default function EditSitePreferencesModal() { | |
| ) } | ||
| label={ __( 'Display block breadcrumbs' ) } | ||
| /> | ||
| <EnableFeature | ||
| featureName="allowRightClickOverrides" | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. To me,
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Good question! My thinking was to keep it generic so that if we wish to expand other areas to also have right click overrides, we don't wind up with a proliferation of |
||
| help={ __( | ||
| 'Allows contextual list view menus via right-click, overriding browser defaults.' | ||
| ) } | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need to communicate that it's specific to the List view here? I don't think it has effect anywhere else in the editor (?)
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Oh, for the user facing help text, that's a great idea! Perhaps |
||
| label={ __( 'Allow right-click contextual menus' ) } | ||
| /> | ||
| </PreferencesModalSection> | ||
| ), | ||
| }, | ||
|
|
||
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.
Is it that
ownerDocumentcan never be falsy due to the fallback value of{}?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.
This one's slightly subtle —
ownerDocumentis set via destructuring, so if the fallback value after the assignment operator is{}thenownerDocumentwill beundefinedas it doesn't exist on{}🙂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.
Oh right, sorry I read that line wrong.
{}is the fallback forrowRef?.current🤦🏻