-
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
Placeholder component: Replace upload icon with text when rendering labels #44437
base: trunk
Are you sure you want to change the base?
Placeholder component: Replace upload icon with text when rendering labels #44437
Conversation
Renders the text supplied in 'aria-label' instead
This reduction also helps us ensure the labels are shown instea of the icon when 'Show button labels' preference is enabled.
Nice, that makes good sense! Can the label be generic, just "Add"? Or even "Add media"? |
Thank you for checking @jasmussen! This line ensures that whatever is passed in the |
Can we just change the aria-label to be "Add" or "Add media"? Mainly it's a question of fitting in constrained contexts, which is more likely to be possible with shorter phrases. Otherwise could we have the button use a regular label and have the aria label as a tooltip? |
@jasmussen Understood. I have shortened the button labels to be |
That seems like a good starting point to me. In general we are challenged with space, there's no getting around that, and I would love a full iteration on how we can improve the "labels only" mode in a cohesive way. Not saying that to block this one, just noting that I'd love to see an experiene as refined as the MacOS Finder "labels only" mode, for example, which seems more considered than what we have today. For this PR, though, seems like it mainly needs a code review. |
Should this be 'Add Image' instead of 'Add Media'? In these two contexts, as far as I know, we only support image assets, so I think that the greater specificity is advantageous. Otherwise, changes look good to me! |
Yup, totally agree on that. I have made that change, updated the screenshots in the PR description, and have updated my branch. Thank you for looking into it. @joedolson you can proceed with the re-review of the code. |
Just a note for reviewers: The failing tests don't seem to be related to this PR. |
Hi @joedolson @jasmussen 👋 Could you please help me with a review on this one? Or guide me if there's anything the PR needs. |
I think it looks good as far as accessibility concerns go; I appreciate your handling the move up/move down alignment issues, as well. Code review will need to come from somebody with write access to the repository, but I can definitely give my thumbs up on the UI changes. |
@mikachan!! I need your help (yet again 🙈). Could you please help me know who could code review this PR? |
@RahiDroid Hi, are you able to solve the merge conflict and rebase the PR? |
Hi @carolinan, I'll look into this after few hours. Busy with work at the moment. |
@carolinan It appears that the blocks are being rendered inside an iframe, If you go to that iframe and maybe add the class Do you have any insights on this? Have there been any changes related to this lately? It would help me dig this further. Edit: I have updated the branch with latest trunk if you wish to take a look. |
What?
Placeholder
component when theShow button text labels
preference is enabled.Featured image block
's styles so that it can be overwritten when labels are to be rendered for the placeholder. This change overlaps with a change in Post Featured Image: Fix borders after addition of overlay feature #44286, but is required for this PR as well. Credit to the PR author.Why?
How?
Testing Instructions
Since this PR touches a couple of widely used components' styles, it should be tested thoroughly.
Options > Preferences > General
and enableShow button text labels
. See this comment for visuals of this option.Post Featured Image
block.Add a featured image
instead of the circular upload button.Screenshots or screencast