-
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
feature: add consistant illustrator to audio block #66838
base: trunk
Are you sure you want to change the base?
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
It looks incorrect at narrower widths: If we were to take a similar approach to the Image block for the Audio block, these buttons shouldn't be visible. However, the Audio block toolbar doesn't yet have a button for adding audio, so there would be no way to add media. Similar to #64320, we should add an add button to the block toolbar before moving forward with this PR. |
This reverts commit d519020.
f9e5890
to
4ce7083
Compare
@t-hamano address your feedback please check 🙇♂️ Screen.Recording.2024-11-08.at.23.28.40.movcc: @richtabor |
@t-hamano any feedback for this PR? 🙇♂️ |
|
||
const isSmallContainer = placeholderWidth && placeholderWidth < 160; | ||
|
||
const isContentOnlyMode = blockEditingMode === 'contentOnly'; |
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.
What is this? It should not be related to this PR.
|
||
const isContentOnlyMode = blockEditingMode === 'contentOnly'; | ||
|
||
const autioReplaceFlow = isSingleSelected && ( |
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 autioReplaceFlow = isSingleSelected && ( | |
const mediaReplaceFlow = isSingleSelected && ( |
Additionally, the code here should also be replaced with this component.
@@ -16,4 +16,8 @@ | |||
margin-top: -9px; | |||
margin-left: -9px; | |||
} | |||
|
|||
.components-placeholder.has-illustration { |
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.
.components-placeholder.has-illustration { | |
.block-editor-media-placeholder.is-small { |
Selectors with the .components-
prefix should be avoided where possible.
There was a past desire to do the same for the Audio block, where I voiced skepticism, because the Audio block is so different from Video and Image, that it much less counts as "this is a visual spot" therefore needing a visual placeholder in its resting state. To that end, I don't think it's right to add this illustration to the Audio block, but I'm happy to defer to others who have a stronger opinion. |
I recall there being a discussion about this: #64691 I don't have a strong opinion on whether or not we should use the placeholder for the Audio block, but I'm interested to hear what others think. @WordPress/gutenberg-design |
Let's see if I got this right... exploring here... Here are various media blocks added to the canvas. This is what I see when none of the blocks are selected. It is a not a consistent experience. I do not feel that changing the none selected experience for the Audio block to be similar to the Image block is the correct way to go. I do feel that there is a need of a common consistency in a none selected state for all the media blocks. Perhaps only showing the icon something like this. It would be better to go back to the general issue which @t-hamano Aki mentioned: #64691 |
A total of three PRs have been submitted related to this PR:
Perhaps we should discuss a bit more in #66768 whether the illustrations are appropriate for these blocks. |
What?
Added consistent illustrator for Audio block similar to the image block.
Why?
Part of #66828
How?
Placeholder
intoMediaPlaceholder
similar to image block.Testing Instructions
Audio
block &Image
blockAudio
block and dis-select it see illustrator similar to theImage
blockScreenshots or screencast
Screen.Recording.2024-11-08.at.00.00.09.mov