-
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
Format toolbar: visual clue for hidden active items #21892
Conversation
Size Change: +37 B (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
My goodness, this feels like an excellent win! And serendipitously, I just discussed the other day on another ticket with @karmatosed exactly this treatment — what does a toolbar button look like when it has opened a submenu? In this case, obviously, the black "toggled" state does not indicate simply that a popover is open, but simply that a submenu item was toggled. I imagine this would benefit alignments too, do you think? But the remaining question is: what do we do with the indication that a submenu is open? Right now there's just a blue color: Some options:
|
Yeah, do we need a visual clue for a submenu being open? In my opinion, the submenu appearing is enough of a visual clue. |
But I like extending this active visual clue to alignments, it makes sense. |
6669195
to
1ea5bc6
Compare
@jasmussen I added it for text alignment too. |
Cool! How about block alignments? |
Love this #21814 is the issue where I brought up the select state and maybe we can combine with this to close? |
Do we still need the "text color" button to show up separately with this change? |
@youknowriad What do you mean? :) |
If you select text, change it's color using the button in the drop-down, that color button now shows up among the other inline buttons instead of in the drop-down. With this visual indication, perhaps it can just stay in the drop-down. |
1ea5bc6
to
fbeaa23
Compare
@jasmussen @karmatosed How's this? :) |
Wasn't it but in the block toolbar for a reason? I didn't work on the text color button, so I don't know why it appears in the block toolbar when it's active. I assume so it's easy for people to know about the color? |
Aaah, or do you mean, now that the collapsed button indicates active state, we can move it back? |
Yes, essentially, because there's indication as to where you go to change it. There were also some challenges with the color button in the toolbar. |
Ok, I removed it. Ready for review. |
I think there is some value to showing the color swatch for the inline color. It's sort of a way to "augment the icon". I was just about to fix it, actually. |
I just tested this PR in Gutenberg.run and noticed a few issues. 1. Color indicator missing.The color bar is missing from the "A" icon. I should see a red bar in the screenshot below. 2. Off-centered iconThe dropdown arrow appears off-centered in the selected state of the icon. 3. Pressed state loses the iconWhen I press down on the dropdown icon, the icon disappears. Perhaps it is just displaying in black on a black background. Tested on Chrome 81.0.4. |
@mapk I removed the color indication because it doesn't make any sense to me there. The icons in the list should be consistent and there's color indication in both the text and the color panel that it opens. |
@@ -62,7 +62,7 @@ | |||
background: transparent; | |||
} | |||
|
|||
&::before { | |||
&:not(:active)::before { |
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.
@jasmussen Is this the right way? I'm not sure :)
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.
I can't immediately grok what it does. But my instinct was to simply add a separate :active modifier and make the text white there. But I can see that the following CSS would interfere with that:
.components-button:not([aria-disabled="true"]):active {
color: inherit;
}
So if what you have here works, I think it's good to ship. I don't know if it needs a comment.
Nice work.
67fce6e
to
f6af5a1
Compare
Is this good to go? I'll rebase. |
If the color indicator is back yes I think it's good 💯 |
f6af5a1
to
d2a9576
Compare
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.
78d7fd4
to
6a5f10e
Compare
Is this one still relevant? If yes, then it needs to be rebased 👍 |
🎉 Agree that this one would be a nice win and great to land. Looks like it's ready to merge with a rebase @ellatrix? |
I agree with everyone. This would be a sweet improvement to land. |
6a5f10e
to
82cb606
Compare
Nice to see the closed loop :) |
Description
How has this been tested?
Screenshots
Types of changes
Checklist: