-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
[RNMobile] Fix issues with gradients on Button Block and resetting themes #23075
Conversation
Size Change: +621 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
@@ -107,6 +108,15 @@ class NativeEditorProvider extends Component { | |||
|
|||
this.subscriptionParentUpdateTheme = subscribeUpdateTheme( | |||
( theme ) => { | |||
// Reset the colors and gradients in case one theme was set with custom items and then updated to a theme without custom elements. |
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.
Nice catch!
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.
Tested via steps described, and via steps here: wordpress-mobile/WordPress-Android#12041 (comment) on a Pixel 3a (w/ Android 10). Works as expected. LGTM!
Description
Fix issue where an older value for gradients was being used on button blocks.
How has this been tested?
1.) Select a theme with custom gradients or add gradients to a theme
2.) Create a post or page
3.) Add a button block(s) and set the custom gradient
Expect to see the custom gradient on the block
1.) Select a theme with custom gradients or add gradients to a theme
2.) Open a post with a block that uses that custom color or gradient (such as a cover or button block)
Expect to see the custom gradient on the block (This will cache the theme)
3) Leave the editor and activate a different theme without custom colors or gradients set
4) Reopen the editor
Expect to see the default gray where the custom setting was originally applied after the theme updates
Screenshots
Types of changes
Bug fix
Checklist: