-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Mobile - Rich Text - Validate link colors #38474
Conversation
Size Change: 0 B Total Size: 1.14 MB ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM 🎊 !
I confirm that the crash can't be reproduced, however, I noticed that adding 3 or more colors to the custom palette makes the default text color turn white which makes the text to be unreadable (see attached video capture).
android-custom-palette.mp4
Yeah, that's one of the issues that will be fixed in #38417. For now this will prevent the crash. Thanks for bringing it up and for the review! |
The changelog update will be included in #38488 |
* Mobile - Rich Text - Validate link colors * Mobile - Rich Text - Update naming to match prop
* Release script: Update react-native-editor version to 1.71.0 * Release script: Update with changes from 'npm run core preios' * Updare CHANGELOG to reflect changes in 1.71.0 * Tests: Enable post type UI for templates and template parts (#38486) * Tests: Enable post type UI for templates and template parts * Only enable UI for block themes * Mobile - Rich Text - Validate link colors (#38474) * Mobile - Rich Text - Validate link colors * Mobile - Rich Text - Update naming to match prop Co-authored-by: George Mamadashvili <[email protected]> Co-authored-by: Gerardo Pacheco <[email protected]> Co-authored-by: Matt Chowning <[email protected]>
* Release script: Update react-native-editor version to 1.71.0 * Release script: Update with changes from 'npm run core preios' * Updare CHANGELOG to reflect changes in 1.71.0 * Tests: Enable post type UI for templates and template parts (#38486) * Tests: Enable post type UI for templates and template parts * Only enable UI for block themes * Mobile - Rich Text - Validate link colors (#38474) * Mobile - Rich Text - Validate link colors * Mobile - Rich Text - Update naming to match prop * Release script: Update react-native-editor version to 1.71.1 * Release script: Update with changes from 'npm run core preios' * [RNMobile] Highlight text: Check if style attribute value is defined during filtering (#38670) * Check if style value is defined before removing extra spaces * Add test case for old text color format * Update react-native-editor changelog * Update CHANGELOG with 1.71.1 changes * Fix incorrect CHANGELOG entry from previous commit Co-authored-by: Siobhan <[email protected]> Co-authored-by: George Mamadashvili <[email protected]> Co-authored-by: Gerardo Pacheco <[email protected]> Co-authored-by: Carlos Garcia <[email protected]>
Gutenberg Mobile PR
-> Mobile - Rich Text - Validate link colors wordpress-mobile/gutenberg-mobile#4542Fixes wordpress-mobile/WordPress-Android#15876
Description
This PR fixes a crash on production for users using block-based themes and custom link colors, currently we don't support custom palettes and this is generating setting invalid link colors. On iOS it just simply uses the default color, but on Aztec Android, if an invalid color is passed through the
text
attribute inRichText
it will crash the app when it tries to parse it.So to avoid this, it will validate if the color is correct, if not it'll pass the default editor value. Using the
colord
library to check the value.Testing Instructions
Precondition: A custom color palette, to create this follow these instructions:
Test case 1 (Change the default link color of your theme to a custom one)
Note: You won't see the link color you selected until we support custom palettes, this will be introduced here.
Screenshots
Types of changes
Bug fix
Checklist:
*.native.js
files for terms that need renaming or removal).