-
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
Border Controls: Add placeholders and base styles #34465
Closed
Closed
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
stacimc
added
[Status] In Progress
Tracking issues with work in progress
[Feature] Design Tools
Tools that impact the appearance of blocks both to expand the number of tools and improve the experi
labels
Sep 1, 2021
Co-authored-by: André <583546+oandregal@users.noreply.github.com>
…r.js Co-authored-by: André <583546+oandregal@users.noreply.github.com>
stacimc
force-pushed
the
update/border-panel-placeholders
branch
from
September 2, 2021 02:24
3d8e6b8
to
a44b25f
Compare
Size Change: +476 B (0%) Total Size: 1.04 MB
ℹ️ View Unchanged
|
7 tasks
Closing as this was resolved in #33743 by css defaults. This may be useful to look at again if the global styles API is implemented and there is a desire for populating the inputs with values from global styles in the block editor. |
7 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
[Feature] Design Tools
Tools that impact the appearance of blocks both to expand the number of tools and improve the experi
[Status] In Progress
Tracking issues with work in progress
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.
Depends on:
Alternative approach to #34131
Description
As we convert the border supports to use the new Tools Panel (#33743) and configure default controls for each block (#34061), we want to prevent needing to enable border style as a default. This was previously done because the style needs to be selected in order for changes to color or width to make visible changes in the editor.
This PR makes use of the addition of an API to access global styles in the block editor (#34178) to solve this problem, and also add placeholders/defaults for each of the border attributes.
Changes:
solid
style will be automatically applied if none is selected/available from global stylesAt the moment this PR also includes a fix for a bug in the border color control, to correctly check selected presets and display the selected color in the color indicator. Since this could be merged separately I also have a PR here with just those changes broken out: #34467
Notes
How has this been tested?
I've tested this with just #34178, and also rebased on top of #33743 which converts the panel to the new ToolsPanel. It should work in both cases. I used the Group block to test.
Test behavior of the placeholders for each of
width / style / color / radius
in the editortheme.json
, something like this:Test the panel in Global styles to make sure it continues to function
Test setting a width or color when the style is not set
Screenshots
Placeholders:
Automatically setting border style when color/width selected:
Types of changes
Checklist:
*.native.js
files for terms that need renaming or removal).