Skip to content

Conversation

@lukewalczak
Copy link
Contributor

@lukewalczak lukewalczak commented Apr 9, 2020

Fixes the issue with no effect on Android when fontWeight value is numerical.
More about the issue you can read here

Going through the comments and potential solutions I've created a function for mapping a font to font-weight called correctTextFontWeight which has to be called from the application starting point (_src/index.js_)

before after
Screenshot 2020-04-09 at 12 36 41 Screenshot 2020-04-09 at 12 28 38
before after
Screenshot 2020-04-09 at 13 01 29 Screenshot 2020-04-09 at 12 29 08

To test:

  1. Open WP-Android app
  2. Open PAGE draft
  3. Expect correct font weight (thicker - 600) on template buttons texts

To test:

  1. Open playground app on Android
  2. Scroll to unsupported block
  3. Expect correct font weight (thicker - 600) on template buttons texts

To test:

  1. Open playground app on iOS
  2. Expect app is not crashing

NOTE: I would like to add some unit test if you like that approach.

PR submission checklist:

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

@lukewalczak lukewalczak merged commit 69a2a06 into develop Apr 30, 2020
@lukewalczak lukewalczak deleted the correct-android-font-weight branch April 30, 2020 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants