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

Add content alignment options in paragraphs #1266

Closed
hypest opened this issue Aug 6, 2019 · 10 comments
Closed

Add content alignment options in paragraphs #1266

hypest opened this issue Aug 6, 2019 · 10 comments
Assignees
Labels
Aztec Parity Feature exists in Aztec but not yet in Gutenberg mobile

Comments

@hypest
Copy link
Contributor

hypest commented Aug 6, 2019

Add support for left/center/right alignment of text in paragraph blocks.

Aztec-Android supports it, Aztec-iOS doesn't.

@hypest hypest added the Aztec Parity Feature exists in Aztec but not yet in Gutenberg mobile label Aug 6, 2019
@mchowning mchowning self-assigned this Aug 9, 2019
@mchowning
Copy link
Contributor

👋 @iamthomasbishop! Any thoughts on the UI for this? I assume we'll use the relevant dash-icons (i.e., TinyMCE alignleft)? Where do you think these buttons should go? They seem less important than the bold, emphasis, etc. controls for paragraphs, so I was thinking to the right of those with the scrolling toolbar for the time being (that is where they were on Android-Aztec). I don't think we're going to be at the too-many-icons point yet with the paragraph block with this approach, but we may be there once we add alignment to the heading block.

@iamthomasbishop
Copy link
Contributor

We can probably just utilize the same icons that Core is using, if that's easy enough. I believe they're either using Dashicons or Material.

In terms of placement, we should probably replicate where Core has them – right after the block type selector. Something like this (first example is collapsed(**) example, which we don't yet have. Second example is closer to what we have now):

image

** I'd love to start collapsing groups of similar controls (like alignment) but that would probably be a separate project.

You mentioned Heading block – this is how I'd imagine that would look like w/ collapsed section for alignment:

image

@koke
Copy link
Member

koke commented Aug 26, 2019

A user in 2299402-zen is asking about the option to justify text in the app editor.

@hypest hypest added this to Triage in Mobile Gutenberg via automation Sep 5, 2019
@hypest hypest moved this from Triage to Open Beta in Mobile Gutenberg Sep 5, 2019
@mchowning mchowning moved this from Open Beta to Sprint #39 - v1.13 in Mobile Gutenberg Sep 5, 2019
@mchowning mchowning moved this from Sprint #40 - v1.13 to In progress in Mobile Gutenberg Sep 24, 2019
@hypest
Copy link
Contributor Author

hypest commented Sep 25, 2019

Related #575

@mchowning
Copy link
Contributor

mchowning commented Oct 24, 2019

Hey @iamthomasbishop ! I was working on this and doing some RTL checking when I noticed that because the toolbar is reversed for RTL languages, the alignment buttons end up with a very (imo) unintuitive order such that the button for right alignment is the left-most of the alignment, and the button for left alignment is the right-most of the alignment buttons. This screenshot shows what it looks like RTL language (this is a simulated RTL language, so that's why you're still seeing English):

image

Assuming we do want the toolbar reversed for RTL languages, it seems like we should double-reverse the alignment buttons so that right alignment remains the right-most alignment button. WDYT?

@mchowning
Copy link
Contributor

mchowning commented Oct 24, 2019

Assuming we do want the toolbar reversed for RTL languages, it seems like we should double-reverse the alignment buttons so that right alignment remains the right-most alignment button. WDYT?

Or maybe it's not worth bothering since we want to move the alignment buttons to a dropdown soon:

I'd love to start collapsing groups of similar controls (like alignment) but that would probably be a separate project.

@koke
Copy link
Member

koke commented Oct 24, 2019

I noticed something similar in #1461 and it seems it's not addressed on the web either (WordPress/gutenberg#17922 WordPress/gutenberg#8674 and likely more).

@iamthomasbishop
Copy link
Contributor

iamthomasbishop commented Oct 24, 2019

@mchowning This is an interesting one. I don't have RTL capabilities set up at the moment, and I won't be able to dig in today. My first question is "what are we doing on Aztec?" because I think @etoledom did some RTL work on Aztec a while back so that would be worth considering. Another thing we should do is reference what other apps like Google Docs, Notion, etc. do in RTL cases – might be some clues there.

My suggestion would be to find a quick solution, and if there isn't one then let's focus on bringing the dropdowns into the mix. Although something tells me we're going to have to figure out the order of those buttons as well, so maybe worth the investigation regardless 😄

@mchowning mchowning moved this from In progress to In review in Mobile Gutenberg Oct 28, 2019
@mchowning mchowning moved this from In review to Done (keep clean, manually) in Mobile Gutenberg Nov 18, 2019
@hypest
Copy link
Contributor Author

hypest commented Dec 6, 2019

Fixed with #1489

@hypest hypest closed this as completed Dec 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Aztec Parity Feature exists in Aztec but not yet in Gutenberg mobile
Projects
Mobile Gutenberg
  
Done (keep clean, manually)
Development

No branches or pull requests

4 participants