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

Separator Block: Add support for wide/full-width versions #25080

Closed
kjellr opened this issue Sep 4, 2020 · 8 comments
Closed

Separator Block: Add support for wide/full-width versions #25080

kjellr opened this issue Sep 4, 2020 · 8 comments
Labels
[Block] Separator Affects the Separator Block Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.

Comments

@kjellr
Copy link
Contributor

kjellr commented Sep 4, 2020

It would be interesting to add support for wide/full alignments to the separator block. This could allow folks to better align it to nearby content.

Current:

Screen Shot 2020-09-04 at 1 11 46 PM

Example of a wide-width separator block:

Screen Shot 2020-09-04 at 1 13 31 PM

@kjellr kjellr added [Type] Enhancement A suggestion for improvement. [Block] Separator Affects the Separator Block labels Sep 4, 2020
@beafialho
Copy link

Or even something like this:

92268510-81f20c80-eeb0-11ea-9ea7-ab199f494732

@salimserdar
Copy link

Hi @kjellr @beafialho, do you mind if I ask which theme you are using. Full or wide width support might be at the theme level. Whatever it is, I might send PR. Thank you.

@jordesign
Copy link
Contributor

I've been playing around with this and have a PR - but the one thing I've run into that I'm not sure about.

Using the 'wide' style for HR is an option themes can use to make the separator full/wide width but is left up to the distinction of how the theme styles the is-style-wide class.

Adding the option to set an alignment potentially conflicts with this. Do we think that is a problem? Or is it up to the theme's discretion how to handle this?

Functional Example using TwentyTwenty:

  • Using align options - it renders them at the widths expected.

Screen Shot 2020-09-08 at 9 20 13 pm

  • Switching all 3 Separator blocks to use the 'Wide' style overides the align value:

Screen Shot 2020-09-08 at 9 31 12 pm

@kjellr
Copy link
Contributor Author

kjellr commented Sep 8, 2020

Hi @kjellr @beafialho, do you mind if I ask which theme you are using. Full or wide width support might be at the theme level. Whatever it is, I might send PR. Thank you.

I took the screenshots with the Gutenberg Starter Theme. No theme currently implements full/wide control for the Separator block at the moment since it's not an option in Gutenberg.

Using the 'wide' style for HR is an option themes can use to make the separator full/wide width but is left up to the distinction of how the theme styles the is-style-wide class.

I think in the context of a change like this, the "wide" label for that block style is a little confusing. 😕

In general though, if a feature like this is added, it will ultimately be left up to themes to correctly implement in the front end. I did some light testing against your PR, and both Twenty Twenty and Twenty Nineteen will need some fixes to get it working right. This change would likely require a (brief) dev note to give folks a heads up.

@jordesign
Copy link
Contributor

No theme currently implements full/wide control for the Separator block at the moment since it's not an option in Gutenberg.

In general though, if a feature like this is added, it will ultimately be left up to themes to correctly implement in the front end.

This change would likely require a (brief) dev note to give folks a heads up.

This makes sense. What would the process normally be for this?

I think in the context of a change like this, the "wide" label for that block style is a little confusing. 😕

Agreed - does that make this a bigger change in regard to thinking about the Style options as well?

@kjellr
Copy link
Contributor Author

kjellr commented Sep 9, 2020

This makes sense. What would the process normally be for this?

There's a Needs Dev Note tag that we can add to the PR if/when it's merged, and then one of us would probably write up a short description of the change when it gets released.

I think in the context of a change like this, the "wide" label for that block style is a little confusing. 😕

Agreed - does that make this a bigger change in regard to thinking about the Style options as well?

Let's get some feedback from the rest of the design team about this part.

@paaljoachim
Copy link
Contributor

I do think that most blocks should have alignment options that might be work a little different depending on which block it is used in. Using alignment for the separator block seems like a nice creative way of changing the size of the line. I have also added the issue to the Slack design channel to get additional feedback from other designers.

Of course another way would be to use a kind of slider with percentage/pixels/etc. Where the user can define the width (should also be height) of the line.

@oandregal
Copy link
Member

It looks like this was closed by #25147

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Separator Affects the Separator Block Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

No branches or pull requests

6 participants