-
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
Column: Add border radius support and content clipping #40925
Column: Add border radius support and content clipping #40925
Conversation
Size Change: +220 B (0%) Total Size: 1.24 MB
ℹ️ View Unchanged
|
@jasmussen I've take a run at your suggestion from #39967 to explore a "Clip content" toggle alongside border radius support for individual Column blocks. As noted in the PR description there's a bit of a UX problem if we clip column content in the editor. I didn't have any success finding a solution here. Given there is a desire for rounded corners on Column blocks, would it still be worth adding (without Clip content option) in a "your mileage may vary" kind of way? Any other ideas? |
It looks like this PR was forgotten about. |
Thanks for the nudge @paaljoachim. It is still in my backlog but unfortunately not a priority. We still have the primary UI issue where clipping content via border-radius will obscure the block inserter. I'm not sure there's a quick fix we can make to move this forward. It's more likely to be working out what compromise is acceptable. |
Took it for a quick spin, and here's a quick GIF: I don't personally see any urgency on this one, but longer term, I do think most of these tools should be available for most blocks. And yes, this PR highlights some of those challenges, clipping or otherwise. One instinct is that for blocks where radius is less useful, like containers group, columns, etc — radius could potentially be a non-default tools panel option. While the toolspanel interface could use separate love for clarity and resetting, this is nevertheless a good example of why curated defaults can make sense. As far as the question on clipping, that is a good question. I have a feeling that at some point in the future, it will likely be useful to be able to toggle clipping off, i.e. it might need to be a separate design tool. In the past we've discussed adding overflow support hidden in the "Advanced" menu, but considering scrollbar use cases and more, we might indeed want overflow as a separate design tool. The question then is what to default to. We can't default every block to overflow: hidden; — yet that is clearly the superior experience when changing the shape of a block, such as using the radius here. So in these cases, should changing the radius also apply overflow: hidden? Not sure, and would be good to get further with design tooling and componentry in general before we touch that, probably. As far as the plus button, I'm still not crazy about it being there, in-canvas. We might still need it, but I feel like there might be a better solution we can find. If all else fails, it might need to be popovered, live outside the block itself, so it would not get cropped. |
Closing this draft PR as it is rather stale now. There still aren't many options to handle the inserter being hidden. Before this could be resurrected, a solution to that is needed. |
Related:
This is a very quick and rough draft to demonstrate the UX issue around adding border radius support to the Column block.
What?
Adds border-radius support to Column blocks and provides the option to toggle content clipping on and off for the column.
Why?
Enabling border radius support for individual columns will allow matching height columns to have rounded corners as per this design mockup. It was initially omitted from #39967 due to concerns around content clipping.
How?
overflow: hidden
is applied via the column's inline styles.Known Issues
Given the inserter is added within the Column block's markup I haven't found a way around this problem.
Testing Instructions
Screenshots or screencast
Screen.Recording.2022-05-09.at.6.36.45.pm.mp4