Skip to content
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

Adding more border style options #68432

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

benazeer-ben
Copy link
Contributor

What?

Fixes #42993

Why?

Currently it is possible to set solid, dashed, dotted in border-style property. Need to add more styles as per ticket request.

How?

Added more style variations such as double, groove, ridge, inset, outset.

Testing Instructions

  • Go to WP admin dashboard.
  • Edit any post or page.
  • Add any block which has border style support eg: Pull quote block.
  • Check border style option.
  • Try each style variation and verify it's working in editor and on frontend.

Screenshots or screencast

Screenshare.-.2024-12-31.12_14_35.PM.mp4

@akasunil akasunil added [Type] Enhancement A suggestion for improvement. [Feature] Blocks Overall functionality of blocks labels Jan 6, 2025
@benazeer-ben
Copy link
Contributor Author

Hi Team,

Whenever you have some time, could you please review this PR? I’d really appreciate your feedback.

Thanks in advance!

cc: @t-hamano @carolinan

@carolinan
Copy link
Contributor

Hi @benazeer-ben
This issue is not actionable until there is a final decision about if there should be more border styles or not. This would require feedback from the design leads.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!

While I personally think that having more variation in border styles is a good thing, I think there are some issues that need to be addressed from both a design perspective and a component perspective.

Design

  1. It is difficult to tell the difference between "Groove" and "Ridge" from the border indicator.

image

image

  1. The newly added icons themselves may need to be improved to make the border style more distinguishable.

cc @WordPress/gutenberg-design

Component

The inline style has been added to prevent overflow of the popover content, resulting in non-square button sizes:

image

We could solve this by increasing the width of the popover itself, but I think this is not ideal because the width of the popover is scaled to fit the six-column color palette.

We might be able to wrap the buttons as shown below, but the current ToggleGroupControl component is not designed for this type of UI:

image

I have no idea how to solve this 🤔

cc @WordPress/gutenberg-components

@ciampo
Copy link
Contributor

ciampo commented Feb 28, 2025

We might be able to wrap the buttons as shown below, but the current ToggleGroupControl component is not designed for this type of UI:

Historically we have switched from a ToggleGroupControl to a CustomSelectControl (or SelectControl) when the amount of options doesn't fit in the UI (see FontSizePicker as an example).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Blocks Overall functionality of blocks [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Feature request: more border-styles
5 participants