-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Mobile - Cover block - Fixes color settings and placeholder visibility #37372
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
|
Size Change: +232 B (0%) Total Size: 1.13 MB
ℹ️ View Unchanged
|
…ompatibility for resetting the overlay color to the default one and fixes a case where the placeholder would be visible after creating the block and clearing its overlay color/media.
…r if there's one inner block present
…overlay solid and gradient color, as well as resetting the overlay color.
76487f1 to
b7c20e9
Compare
antonis
approved these changes
Dec 17, 2021
Member
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.
Great work @geriux 👍
- I tested the app running metro on Android (Pixel 5/Android 12) and iOS(iPhone SE 2020/iOS 14.7.1) and everything worked as expected 🎉
- The code changes look consistent too me 🎉
- Great work extending the test coverage with the added test cases🥇
Thank you for wrangling this issue 🙇
ps. I was able to reproduce #37042 but this would be handled separately.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #37227
Description
This PR fixes a regression where the color/gradient of the Cover block wouldn't be applied.
It replaces the usage of the
withColorsHOC and__experimentalUseGradientin favor of getting the colors directly fromuseSetting.It also adds some tests in case of future changes related to the colors settings.
A while back the
Resetbutton was added within the color palette, there's a fix as well to make it compatible with the Cover block. For this case, if you reset the overlay color, it will clear the color and maintain the cover block and its inner block. This also will benefit the case when an image/video is removed, the block should still be visible with its inner blocks.How has this been tested?
Test case 1
CoverblockTest case 2
CoverblockGradientsoptionTest case 3
CoverblockTest case 4
CoverblockScreenshots
Test case 1
Test case 2
Test case 3
Test case 4
Types of changes
Bug fix
Checklist:
*.native.jsfiles for terms that need renaming or removal).