-
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
[Mobile] - Remove usage of ColorEdit in the Button block #33103
Merged
Merged
Conversation
This file contains 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
…ly allowing gradients support for the Button block, since now we are using the colors hook for colors and gradients.
geriux
added
[Status] In Progress
Tracking issues with work in progress
Mobile App - i.e. Android or iOS
Native mobile impl of the block editor. (Note: used in scripts, ping mobile folks to change)
labels
Jun 30, 2021
Size Change: +1 B (0%) Total Size: 1.05 MB
ℹ️ View Unchanged
|
7 tasks
oandregal
reviewed
Jun 30, 2021
oandregal
reviewed
Jun 30, 2021
I've left some comments for my own education, but can safely ignore them. I'll leave others with native knowledge to review this. |
oandregal
reviewed
Jun 30, 2021
2 tasks
chipsnyder
approved these changes
Jul 1, 2021
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 this alongside the GSS iOS changes and everything works great! Thanks for the fix @geriux!
7 tasks
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.
Description
After merging the Global styles implementation #30544 the colors hook was enabled for mobile. Because of this change, the gradients option was missing in the color settings and for the Button block, the color settings are duplicated. This is because the block was using
ColorEdit
which is not needed when using the color hook. I'm removing this file since it was only being used for mobile since web stopped using it a while back.This PR also adds a
gradients
support check when registering the blocks, by only allowing this feature for blocks inALLOWED_BLOCKS_GRADIENT_SUPPORT
. Ideally, we would have to think of a way to support gradients for all blocks but for now, this is only available for the Button block.How has this been tested?
Test case 1
Test case 2 (gradients are not visible for other blocks)
Screenshots
Types of changes
Bug fix
Checklist:
*.native.js
files for terms that need renaming or removal).