Skip to content
This repository was archived by the owner on Feb 17, 2025. It is now read-only.

Conversation

@MaggieCabrera
Copy link
Contributor

Changes proposed in this Pull Request:

After WordPress/gutenberg#30124 was merged, now we have support for border color, style and width for blocks. BCB was only defining custom values for buttons (and forms, but since those are not blocks, they don't apply here) so this PR removes the custom CSS that BCB was applying to add support for them instead.

I rebuilt Mayland + Seedlet with the changes.

@jffng
Copy link
Contributor

jffng commented Apr 22, 2021

I'm running Gutenberg trunk and this PR, and I don't see the controls:

Screen Shot 2021-04-22 at 9 18 00 AM

Screen Shot 2021-04-22 at 9 21 22 AM

Maybe it's an environment thing... Any ideas on what to do?

In general, I know we know the motions of testing these changes and they're sort of implied, but maybe helpful to add some testing instructions and expected behavior of the change.

@MaggieCabrera
Copy link
Contributor Author

In general, I know we know the motions of testing these changes and they're sort of implied, but maybe helpful to add some testing instructions and expected behavior of the change.

You are so right :S

I'm not going to lie, I only tested this in the frontend, so I didn't see that the editor doesn't show the options. These are the GB styles on the frontend:

Screenshot 2021-04-22 at 15 40 14

I'm not sure why it's not showing on the editor though :S

@MaggieCabrera
Copy link
Contributor Author

I'm testing TT1 blocks like the PR shows and still nothing, on either buttons or the group block. So weird.

@jffng
Copy link
Contributor

jffng commented Apr 22, 2021

:shakes fist: Weird because in the Gutenberg PR it shows controls in the editor!

@pbking
Copy link
Contributor

pbking commented Apr 22, 2021

I believe that has to be enabled via:

   "settings": { 
     "defaults": {
        "core/button":{
			"border": {
				"customColor": true,
				"customRadius": true,
				"customStyle": true,
				"customWidth": true
			}

Those are set to false for all blocks, though the radius is enabled for the button block (by default).

@pbking
Copy link
Contributor

pbking commented Apr 22, 2021

I pushed a change that allows what blocks express support to show the appropriate panels. Now the group block offers the controls.

The button block, however, still doesn't express support for that in its block.json file. A quick test shows that adding it seems to work, giving the buttons the option too but I only gave it a quick glance.

image

@MaggieCabrera
Copy link
Contributor Author

Thank you for investigating that Jason! I rebuilt the child themes again to add your change

@scruffian
Copy link
Member

The controls for the button don't show up in the editor because they haven't been enabled for buttons yet. However it works fine in the front end, so IMO we can merge this. What do y'all think?

@MaggieCabrera
Copy link
Contributor Author

The controls for the button don't show up in the editor because they haven't been enabled for buttons yet. However it works fine in the front end, so IMO we can merge this. What do y'all think?

I agree, to me it's more important that the theme can control it than the user at the moment

@scruffian scruffian merged commit 0a94b55 into trunk Apr 26, 2021
@scruffian scruffian deleted the add/bcb-border-supports branch April 26, 2021 14:45
@pbking
Copy link
Contributor

pbking commented Apr 26, 2021

This appears to be breaking some stuff, I don't believe we should have brought it in.

I'm seeing other issues though so it's hard to put my finger on what's amiss...

I'm not sure we should have brought this in though. The PR really just allows a USER to make changes that a block expresses support for. As far as I can tell it doesn't have anything to do with how/what we can style via theme.json

@scruffian
Copy link
Member

As far as I can tell it doesn't have anything to do with how/what we can style via theme.json

It also removes some CSS

@pbking
Copy link
Contributor

pbking commented Apr 26, 2021

Sorry, to clarify by 'it' I meant the Gutenberg issue. I think it just added user controls to blocks that express support, it doesn't change what can be styled.

@scruffian
Copy link
Member

Why do you think we should back it out? What is it breaking?

@MaggieCabrera
Copy link
Contributor Author

Apparently the corresponding classes or the borders were missing from the editor and have been very recently added: WordPress/gutenberg#31217 can you tell me what issues you are seeing?

@pbking
Copy link
Contributor

pbking commented Apr 27, 2021

The only issues I'm seeing involves the 'outline style' button.
Editor:
image
View:
image
Settings:

					"border": {
						"radius": "4px",
						"width": "10px",
						"style": "solid",
						"color": "red"
					},

I assume that once the button block expresses support for those border styles the above issues will be accounted for.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants