Wp-calypso: Gutenberg: Add justified alignment

Created on 19 Nov 2018  路  49Comments  路  Source: Automattic/wp-calypso

Several of our users like justifying their text. In Calypso they had an alignment button. In wp-admin, they could use a keyboard shortcut. Now neither seems to work, and those who don't have custom CSS capabilities are left editing each paragraph's style by hand by clicking three dots, edit HTML, adding style, converting to HTML... and so on, for each paragraph. It'd be nice if this were easier for them.

(Edit from @gwwar) To re-add visual controls, it seems unlikely that core would accept such a patch since this was intentional (removed in WordPress 4.7), but I think we can consider it as a WordPress.com integration if folks really want this. Underline in particular was hidden to reduce confusion on what is and is not a link, while Justify was removed due to spotty browser implementations.

At the time of this update, this is one of the most common bugs/feedback we've received from the Gutenberg rollout.

For reference, this is what Underline and Justify Options in the Calypso Classic Editor look like
screen shot 2018-11-28 at 7 56 50 am

Update 1/23: @gziolo and @jasmussen note that the core Gutenberg project would be open to adding justify and underline, disabled by default, but re-addable as a user option. So for folks taking on this task, try starting with a core patch first, unless things get stuck and be sure to test mobile views and the block toolbar in nested contexts, as this adds additional buttons to the toolbar width.

See related: https://github.com/WordPress/gutenberg/pull/13117, though we'll want to add visual UI here rather than just a keyboard shortcut.

Update (@copons):
This is currently live on WordPress.com Simple sites, and will remain a WordPress.com-only enhancement for the time being.

Update 2 (@copons)
The solution mentioned in the first update is good enough for Simple sites, but we should have a better designed approach for other site types.
This kind of better design likely involves adding an extension point to the Alignment Toolbar (justify should be a block alignment attribute, not an inline format), which is not really straightforward.
I've tried experimenting a bit (https://github.com/WordPress/gutenberg/pull/14824), but couldn't figure out a good and sensible way to proceed, that's also good enough to be reusable by other developers in the wild.

[Goal] Gutenberg [Pri] Normal [Type] Enhancement

Most helpful comment

One fixable challenge that might nonetheless delay this feature is that there isn't necessarily always going to be room for this button in every context. In the mean time it could make sense to introduce these features as keyboard shortcuts only. For example in an upcoming version of Gutenberg, the underline feature will be introduced behind a 鈱楿 shortcut.

All 49 comments

https://en.forums.wordpress.com/topic/new-post-editor-3/

Noting we've had other folks asking too. :)

The broken keyboard shortcuts are being worked on in Core in https://github.com/WordPress/gutenberg/issues/8450

See also: p7DVsv-5F7-p2

I have one from 3960759-hc

Another in 3198529-hc

1603732-zen

1611421-zen

Requested on Twitter.

7819824-hc

Another in #1647561-zd

Another request in the forums: https://en.forums.wordpress.com/topic/justify-text-3/#post-3232361

Another in #1650446-ZD and #1649983-ZD

8875156-hc

Another request for Justify in #8879202-hc

This was requested in the app in 1652134-z also. (Although this was for the app, adding here as it shows demand for a justify option and it's unlikely to be added to the app without first being added to Gutenberg.)

Another user looking for this feature in the forums: https://en.forums.wordpress.com/topic/how-can-i-justify-text-in-the-new-layout/

1680099-zen

Another user would like the option, here 9082543-hc

Another one here 1693452-zen

A review for the app:

There is no option for Justified text, the posts looks too odd without Justified option in the text paragraph.

(As before: Although this was feedback for the app, adding here as it shows demand for a justify option and it's unlikely to be added to the app without first being added to Gutenberg.)

Requested on Twitter.

Another request in 1720247-zen.

1731724-zd

Another +1 from the app:

Actually, for every updates of this app, I'm waiting the 'justify' function to appear in the toolbar in compose section. For me--and I believe for other users too--its important, so that my writing would look neat. It's already have a right, center and left alignment. But no justify command. Hope I will use it soon. Thank you.

One fixable challenge that might nonetheless delay this feature is that there isn't necessarily always going to be room for this button in every context. In the mean time it could make sense to introduce these features as keyboard shortcuts only. For example in an upcoming version of Gutenberg, the underline feature will be introduced behind a 鈱楿 shortcut.

As suggested in this comment, it doesn't look like we're correctly responding to users that they can justify the design with CSS without having to manually set every paragraph:

https://github.com/WordPress/gutenberg/issues/8450#issuecomment-445411782

That's true, but I think the intention of this issue is to allow those without access to CSS to be able to justify text in a more efficient way.

Those who don't have custom CSS capabilities are left editing each paragraph's style by hand by clicking three dots

I manually set every paragraph using HTML, and my text did not justify. I work in a university setting, and my boss requires all of our pages to have justified text. Hope this gets added soon.

Another report here 1825832-zen

One more in 10757717-hc

11021623-hc

3162117-hc

And another #8574984-hc

Another request in 1903732-zen

Another at 11536771-hc

Requested in 1903618-zen.

Requested in 1903618-zen.

@juliasydnor This should have been fixed for Simple sites on Friday by D26137-code (added the Justify button to the Paragraph block toolbar), and we are in process of enabling it for JP and AT.
I don't have access to 1903618-zen, so could you please tell me if it's a Simple and therefore there are other issues going on?

@Copons Good to know, I haven't seen an announcement about the update.

The user had already switched back to the Classic editor. Their ticket was submitted before Friday, so they wouldn't have seen the option then. I do see the option on my simple sites using Gutenberg, so we should be all set.

@juliasydnor Great, thanks!
We haven't advertised it because the button location is temporary, pending Core changes. 馃檪

I think this is a core issue. Should we close this one and track it there?

@scruffian The button is live on WPCOM Simple, but I'm keeping this issue open to remember porting it on JP/AT when possible.

@scruffian see also the comments conversation in p7jreA-2em-p2

@Copons do you mind updating the summary of this issue to reflect that this is a wpcom enhancement for now?

Closing this since the custom format types have been moved to the wpcom-block-editor package and they are available in JP/AT sites (https://github.com/Automattic/jetpack/pull/12070).

Was this page helpful?
0 / 5 - 0 ratings