-
Notifications
You must be signed in to change notification settings - Fork 4.7k
Spacing presets: add editor UI support #42173
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
Merged
Changes from 1 commit
Commits
Show all changes
89 commits
Select commit
Hold shift + click to select a range
f979215
WIP - some initial structure for adding spacing presets support to t…
f034f2f
Fix doc comment
b57577f
Test
glendaviesnz 4e8381a
Add initial spacing box control component
glendaviesnz 42615f5
Move experimental component to block editor components
glendaviesnz 2b9970e
Replace emotion styles
glendaviesnz ecb59b0
Some fixes to get the basics working
glendaviesnz 496dba1
Some more tidy up
glendaviesnz 332c3c2
Two steps forward - maybe?
glendaviesnz 39c4b0c
Get the passing of existing values working
glendaviesnz 6409fda
Fix linting issues
glendaviesnz e3b871b
Add initial handling of 0 values
glendaviesnz 0548311
Handle 0 and default better
glendaviesnz 281c76f
Try using a select control
glendaviesnz 2ad0f96
More tweaks to show slider and select for testing
glendaviesnz 5bc1046
remove superflous component
glendaviesnz 6cdc706
Prototype using customselect
glendaviesnz e998877
Add custom header to controls
glendaviesnz 7568aaa
Switch to segmented control
glendaviesnz 71b7fb7
Some clean up of redundant code
glendaviesnz aca422e
Remove axial default
glendaviesnz b7b8f8d
Some more tidy up and add toggle to select list if more than 8 presets
glendaviesnz 7592079
Clean up CSS, and naming of main settings component
glendaviesnz 448d56a
Switch from box icon back to text labels
glendaviesnz bc17c58
Move parsing of units into the child settings component
glendaviesnz 94e119d
Get handling of custom values working
glendaviesnz 14b7bb5
Prepare test file for adding utils tests
glendaviesnz d3ab731
And conversion from preset to custom value
glendaviesnz ae88165
Set custom range control correctly when switching from preset to cust…
glendaviesnz 9b496bd
Show correct controls for the current values
glendaviesnz bd60740
Fix issue with unit not being set when switching from preset and usin…
glendaviesnz cdda2fc
Fix issue with reset not working
glendaviesnz 4d900a6
Fix issue with all sides showing in control when all the values where…
glendaviesnz b178c4b
Remove unused export of box icon
glendaviesnz bfd6598
Some code tidy up
glendaviesnz a5bc925
Tidy up utils, add doc comments and remove unused methods
glendaviesnz 8b78443
Add some tests
glendaviesnz b041551
Add arial labels to spacing inputs
glendaviesnz 8ae9147
Improve aria labels
glendaviesnz a7aa0d5
Minor fixes from review
glendaviesnz 7992536
Fix tests
glendaviesnz 4c866ea
Better align the controls and the buttons to the designs
glendaviesnz bebffd4
Remove redundant reset button
glendaviesnz cbe9c5c
Fix bug with preset not converting to custom value with all sides con…
glendaviesnz 7f1cc8e
Makes sure max width is not overwritten by component styles to preven…
glendaviesnz a31f3b8
Fix layout of select control
glendaviesnz b4f664c
remove mod to custom select control
glendaviesnz 563e4bf
Minor fixed from PR review
glendaviesnz 5eee65c
Remove support for editing pairs of sides as event not currently pass…
glendaviesnz a87050d
Move label for all sides into top header
glendaviesnz 2b6cade
Adjust layout of all sides controls
glendaviesnz 8f525ee
Switch to css grid for laying out the controls
glendaviesnz 98118a8
Fix bug with value not being set when custom select used
glendaviesnz 9fbc3b0
Fix bug with current value not displaying in custom select
glendaviesnz 87343dd
Minor fixes
glendaviesnz a4088ea
Standardised use of $grid-unit
glendaviesnz 82c3c3c
Tidy up CSS
glendaviesnz 2465154
Add handling of default
glendaviesnz 73f96cd
Switch from regex exec to match
glendaviesnz 9d390ed
Fix unit test
glendaviesnz cae7ee2
Remove redundant CSS
glendaviesnz 6ff2352
Add the spacing presets control to global styles
glendaviesnz ca87605
Fix inconsistant naming of CustomSpacingSize
glendaviesnz b54163c
Remove redundant space
glendaviesnz deaed6c
Switch to using new applyValueToSides method from components lib
glendaviesnz b7c53dc
Rename default to Inherit style
glendaviesnz cecbc7f
Grey out range if value unset
glendaviesnz f11bc9a
Fixes linting error
glendaviesnz bc07d84
Switch to not showing range control if setting undefined
glendaviesnz 038b1c2
Revert "Switch to not showing range control if setting undefined"
glendaviesnz f04dff6
Style fixes from PR review
glendaviesnz 7c55b8d
remove the 'inherit' label on undefined
glendaviesnz 5c34101
Fix bug with 0 values not being seen as preset
glendaviesnz cf9822d
Fix bug with mixed value not being set correctly
glendaviesnz bebd991
Reduce grid gap to compact display a bit
glendaviesnz a71709d
Use onMouseDown instead of onClick so tooltip shows
glendaviesnz 3c64a0c
Remove unused default input props
glendaviesnz bce9da8
Add some additional tests
glendaviesnz 868f61e
Minor fixes from PR review
glendaviesnz ce380eb
Update switch from custom to preset so label only shows 0 if custom v…
glendaviesnz d05bfbf
Deal with floats when switching from custom to preset and add an opti…
glendaviesnz 1abc3a5
Code tidy ups from PR review
glendaviesnz aeedc1d
Fix bug with double click required to set initial value if further do…
glendaviesnz 4397dfb
Change Inherit to Default in select list as Inherit doesn't make so m…
glendaviesnz 9b73207
Remove redundant internal state value
glendaviesnz 1b1f299
If custom sizing set and user switches to the select list, show custo…
glendaviesnz 68f60bf
Add spacing details to global styles PRESET_METADATA so changes to sp…
glendaviesnz cb11f83
Only show the spacing sizes control if there are spacing sizes set
glendaviesnz 884c77a
Add guard against undefined spacingSizes
glendaviesnz File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Get handling of custom values working
- Loading branch information
commit 94e119d9cf91d5da0e56e84a6ed14507c9d435d1
There are no files selected for viewing
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.