Skip to content

Fix crash in mobile paragraph blocks with custom font size#2993

Closed
cameronvoell wants to merge 7 commits intodevelopfrom
fix/crash-paragraph-custom-fontSize
Closed

Fix crash in mobile paragraph blocks with custom font size#2993
cameronvoell wants to merge 7 commits intodevelopfrom
fix/crash-paragraph-custom-fontSize

Conversation

@cameronvoell
Copy link
Copy Markdown
Contributor

@cameronvoell cameronvoell commented Jan 12, 2021

Fixes #2991

Related PRs:

Description

This change fixes a crash when opening a post that has a custom font size set in a paragraph.

To Reproduce

Steps to reproduce the behavior:

  1. On the web, create a simple post with a single paragraph block and set its "Font Size" in the Typography section (see screenshot)
  2. Save the post as draft or publish it
  3. Go to the WPAndroid or WPiOS and open the post
  4. 💥

Expected behavior

The app should not crash.

Screenshots:

image

PR submission checklist:

  • I have considered adding unit tests where possible.
  • I have considered if this change warrants user-facing release notes more info and have added them to RELEASE-NOTES.txt if necessary.

@peril-wordpress-mobile
Copy link
Copy Markdown

peril-wordpress-mobile bot commented Jan 12, 2021

Wanna run full suite of Android and iOS UI tests? Click here and 'Approve' CI job!

@cameronvoell
Copy link
Copy Markdown
Contributor Author

I verified that preformatted block did not have the same issue with custom fontSize causing a crash, but have not completed a full audit on where else this could be broken on mobile yet. Will update here if I feel confident that custom fontSize is not crashing us outside the paragraph block

@hypest
Copy link
Copy Markdown
Contributor

hypest commented Jan 12, 2021

When we'll be confident about the fix, we'll want to publish it as a hotfix against the production apps, or betafix if it lands too late for a hotfix.

@cameronvoell
Copy link
Copy Markdown
Contributor Author

Will update here if I feel confident that custom fontSize is not crashing us outside the paragraph block

The same testing steps were crashing in Heading, and List blocks so I updated the fix and the testing steps. This PR is ready for review now.

@cameronvoell cameronvoell requested a review from hypest January 14, 2021 07:41
@hypest
Copy link
Copy Markdown
Contributor

hypest commented Jan 14, 2021

Tested both WPAndroid and WPiOS and works like a charm!
I'll have a look at the code now.

@cameronvoell
Copy link
Copy Markdown
Contributor Author

cameronvoell commented Jan 18, 2021

Fix was merged to gutenberg master, and brought to gutenberg-mobile by betafix merge to master PR, so I'll close this PR

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Crash when opening a post with fontSize set to a paragraph

2 participants