-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add alt toolbar for image crop mode #37337
base: trunk
Are you sure you want to change the base?
Conversation
b04901a
to
8c30ffd
Compare
Size Change: +273 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
@@ -8,13 +8,15 @@ const BlockControlsBlock = createSlotFill( 'BlockControlsBlock' ); | |||
const BlockControlsInline = createSlotFill( 'BlockFormatControls' ); | |||
const BlockControlsOther = createSlotFill( 'BlockControlsOther' ); | |||
const BlockControlsParent = createSlotFill( 'BlockControlsParent' ); | |||
const BlockControlsAlt = createSlotFill( 'BlockControlsParent' ); |
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.
const BlockControlsAlt = createSlotFill( 'BlockControlsParent' ); | |
const BlockControlsAlt = createSlotFill( 'BlockControlsAlt' ); |
I am looking forward to this improvement. Feel free to ping me when PR is ready for testing.
I'm wondering if it would be worthwhile to set up a system allowing blocks to create their own editing layers/modes? There are a couple cases that may benefit from such a system:
Additionally, some blocks may need separate rendering depending on some external state and a layer could be used to edit each of those states.
The first set has only one rendering path with multiple editing layers. The second set has one rendering path per editing layer. I think we can focus on the first set for multiple editing layers and one rendering path for now, and later add a way to handle separate rendering paths based on external state. In addition to the designs from #23721 that this is currently based off of, #20193 (comment) has some more designs for what these 'layers' could look like for the toolbar. |
Discussion about my above comment can happen in #38108 |
Thanks for working on this. I think it'd be good to fix the accessibility issues with the crop tools with any improvement here - #24676. Especially if this is going to be a system that any block can use. |
Description
First part in fixing #23721
Replace the entire toolbar when opening the image editor.
The toolbar is replaced by adding a new
alt
mode for the block in addition tovisual
andhtml
and a newalt
slot for the toolbar.How has this been tested?
In the image block,
Screenshots
Types of changes
New feature
Checklist:
*.native.js
files for terms that need renaming or removal).