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

iOS Quote and Pull Quote blocks render typography discrepancies #47263

Closed
dcalhoun opened this issue Jan 19, 2023 · 2 comments · Fixed by #47284
Closed

iOS Quote and Pull Quote blocks render typography discrepancies #47263

dcalhoun opened this issue Jan 19, 2023 · 2 comments · Fixed by #47284
Labels
[Block] Pullquote Affects the Pullquote Block [Block] Quote Affects the Quote Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Priority] High Used to indicate top priority items that need quick attention [Type] Regression Related to a regression in the latest release
Projects

Comments

@dcalhoun
Copy link
Member

Description

When adding Quote and Pull Quote blocks on iOS, there are several typographic issues rendered:

  • Quote & Pull Quote: unexpected p tags within citation line breaks, incorrect text size
  • Pull Quote: Misaligned text

The incorrect text size appears to have surfaced in the WP 21.4 release. The unexpected p tags and misalignment appear to have surfaced in the pending WP 21.5 release.

The incorrect text size may only surface for block themes where custom styles/typography is supported.

Step-by-step reproduction instructions

  1. Add Quote/Pull quote block.
  2. Add multiple lines of text in the quote body.
  3. Add multiline lines of text in the citation.

Expected behaviour

Correct text size and alignment is displayed. p tags are not inserted for the citation field.

Actual behaviour

Incorrect text size and alignment is displayed. p tags are inserted for the citation field.

Screenshots or screen recording (optional)

21.3
WPiOS.21.3.MP4
21.4
WPiOS.21.4.MP4
21.5
WPiOS.21.5.MP4

WordPress information

  • WordPress version: 6.1.1
  • Gutenberg version: 14.9.1
  • Are all plugins except Gutenberg deactivated? Yes
  • Are you using a default theme (e.g. Twenty Twenty-One)? No, Geologist.

Device information

  • Device: iPhone SE
  • Operating system: iOS 16.1
  • WordPress app version: 21.5
@dcalhoun dcalhoun added [Type] Regression Related to a regression in the latest release Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Block] Quote Affects the Quote Block [Block] Pullquote Affects the Pullquote Block labels Jan 19, 2023
@dcalhoun dcalhoun changed the title iOS Quote and Pull Quote blocks render typography discrepencies iOS Quote and Pull Quote blocks render typography discrepancies Jan 19, 2023
@fluiddot fluiddot added the [Priority] High Used to indicate top priority items that need quick attention label Jan 19, 2023
@fluiddot fluiddot added this to Triage in Mobile Apps via automation Jan 19, 2023
@fluiddot fluiddot moved this from Triage to To do in Mobile Apps Jan 19, 2023
@fluiddot
Copy link
Contributor

Quote & Pull Quote: unexpected p tags within citation line breaks

I investigated this issue further and seems that might be related to Aztec. When the Quote block is created, the content of the citation element is an empty string. However, when focusing on the Citation text input, the text is updated with the value <p></p> 🤔 .

As a side note, I also noticed that this issue can't be reproduced when connecting the Chrome debugger 🙃 .

@fluiddot
Copy link
Contributor

fluiddot commented Jan 19, 2023

I tried to debug the issue and noticed the following difference in Gutenberg Mobile trunk before and after this PR was merged:

Before:
Screenshot 2023-01-19 at 12 24 16

After:
Screenshot 2023-01-19 at 12 23 35

NOTE: The logs generated after focusing the text input were produced after typing the character a.

As you can see, there's an extra onSelectionChangeFromAztec event triggered when focusing the Citation text input that is setting the content value to <p></p>.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Pullquote Affects the Pullquote Block [Block] Quote Affects the Quote Block Mobile App - i.e. Android or iOS Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change) [Priority] High Used to indicate top priority items that need quick attention [Type] Regression Related to a regression in the latest release
Projects
Mobile Apps
  
Done
Development

Successfully merging a pull request may close this issue.

2 participants