-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Update placeholder style #44190
Update placeholder style #44190
Conversation
Size Change: +2.24 kB (0%) Total Size: 1.26 MB
ℹ️ View Unchanged
|
Nice! I tinkered with something similar, and was able to move a lot of the stuff from the Placeholder component into the mixin, like so:
I'm not sure that's a good idea. The solid line seems like a good idea, and using currentColor for the background helps anchor the visuals. Perhaps we should see if we could include an icon delineating the block type after all, at least in Image, Featured Image and Video if we expand the style to that block. This might also give duotone a wider spectrum to style, as the removed border makes the duotone effect less pronounced now. |
Took it for another spin. Looks good! Though we should probably not remove the overlay on select, as in some resized cases that makes it basically transparent and lose boundaries: Perhaps something for a separate PR, but as these placeholders start to become increasingly minimalist, it might be worth having some subtle differentiation between them: Here area two quick options. What do you think? |
There are some really nice explorations here! As it gives a good signal that it is a placeholder and also the type of placeholder. |
I'm not a big fan of the icons personally, but we can discuss that separately as it would expand this PR quite a bit and would be better suited to a follow-up.
This should be fixed. |
Re icons, I'm not a big fan for two reasons:
Other options we might consider: display the block name, or a more explicit per-block graphical treatment. It's no a super-strong opinion, but I think it's worth exploring separately to this particular PR. |
Those are good arguments, and I tend to agree. Plus those mockups look great (even if we should probably lean towards as simple outline shapes as possible to keep with the low-noise placeholder look). One thing to consider is that any graphic representation inside either of these needs to be scalable down to at least 100x100px (just to pick an arbitrary minimum size), perhaps even smaller, as one of the main motivators for the placeholder refreshes of especially site logo and featured image is the realization that the existing wizard-like cards don't scale to narrow contexts, and look poor in complex patterns. SVG affords us a ton of options for scaling here, so I don't envision it to be a big problem. But I do like how generic the block-icon (and text label) options are, as they would require little more dev work. @mtias do you have any opinions here? |
How do y'all feel about merging these changes and figuring out how to better indicate the block type (be it icons or labels or something else) in another PR? I feel like there's some more exploration to do there. The changes in this PR address the short-comings of the dashed-line visuals, so it would be nice to merge :) |
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'm happy to try this, as it's beyond the freeze for 6.1 so we should have some time to polish this (add icons) for 6.2. But if we land this, let's keep an eye on followups we might need to do. Sound good?
Sounds good. I'll merge, and open an issue to add further context. |
What?
Updates the block placeholder style
Why?
The current implementation with the dashed border(s) is a little noisy. This iteration replaced the outline with a semi-opaque scrim, and updated the diagonal stroke to be solid rather than dashed.
How?
To create the scrim, a pseudo element is added to the placeholder mixin. It uses
currentColor
for the background and hasopacity: 1
.Testing Instructions
Insert blocks that exhibit the placeholder state (Site Logo, Image, Featured Image) and observe the new style.
Screenshots or screencast
More examples