gutenberg icon indicating copy to clipboard operation
gutenberg copied to clipboard

Alignment: setting alignment attributes should be consistent across blocks

Open designsimply opened this issue 8 years ago • 3 comments

Split out from https://github.com/WordPress/gutenberg/issues/4010 where @bradyvercher says:

Toolbar onChange Callback

Some blocks define a class method (requires binding in the constructor), others define a local function, and some use an inline arrow function. They all do the same thing. I'd like to see this be more consistent across blocks.

Considering how simple it is, I think using an inline arrow function would make things more concise and easier to read:

<BlockAlignmentToolbar
    value={ align }
    onChange={ value => setAttributes({ align: value }) }
/>

designsimply avatar Jul 11 '18 23:07 designsimply

Both alignment used and classes should be consistent across blocks in my opinion. This is similar to the visual side in https://github.com/WordPress/gutenberg/issues/3785.

karmatosed avatar Jul 12 '18 09:07 karmatosed

@designsimply - I am championing an issue that I believe is related to this. If you could spare a moment and have a look and comment that would be fantastic. Regardless of how you feel about the issue I raised, I agree completely with this issue you raised...block styling consistency is a must if external themes are going to play well with GB. Thanks in advance...much appreciated :-)

timhibberd avatar Nov 01 '18 02:11 timhibberd

Closing this as it's not really important and we'd like to bring consistency with #20650

youknowriad avatar Mar 05 '20 14:03 youknowriad