feat: added per-corner control for spacing and border-radius - #666
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #666 +/- ##
========================================
Coverage 56.54% 56.54%
========================================
Files 34 34
Lines 4119 4119
========================================
Hits 2329 2329
Misses 1790 1790 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Confidence Score: 4/5Safe to merge after fixing the null-coalescing gap in SpacingControl.readValue and the setUniformValue early-return that prevents closing the split panel. SpacingControl.readValue calls String(getBaseValue()) without a null guard — when no margin/padding is set the block returns null and the literal string "null" appears in the input. The setUniformValue guard in SplitModeInput also exits early when the typed value equals the displayed value, leaving the split panel open with no way to close it by typing. frontend/src/components/SpacingControl.vue (readValue null guard) and frontend/src/components/Controls/SplitModeInput.vue (setUniformValue early-return logic) Reviews (12): Last reviewed commit: "fix: reset split mode when block selecti..." | Re-trigger Greptile |
when only numbers are used then we attach the default unit in the backend, we do not show the unit in the input box
SpacingControl and BorderRadiusControl were near-identical copies with their own CSS shorthand parsing and split/link state. Extract the shared pieces so each component only declares how it reads/writes its value: - Add expandBoxShorthand() to cssUtils, replacing the three copies of the 1/2/3/4-value box expansion (spacing, radius, SplitModeInput display). - Add useSplitBoxControl composable holding the linked/split state, active variant, value sync and combine/normalize handlers. - Add useInputOverflow composable for the shared scrollWidth overflow-fade check duplicated in Input and Autocomplete. Also drops dead state-selection code in BorderRadiusControl and routes its uniform edits through setModelValue, so clearing/setting the single radius now clips overflow and syncs corners like the split mode already did. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Dragging a single padding/margin handle sets only that side with no shorthand base, so unset sides fell back to an empty base and produced malformed shorthands (e.g. "5px 10px") that the split input misread as a two-value shorthand. Fill unset sides with 0 when reconstructing the multi-value shorthand. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…Unit where not needed
Replaces the required `labels` array with `splits: number | (string | Split)[]`, so a split count can be defined without labels. The array length is now the only source of truth for the count, and per-split `attrs` merge over the shared `inputAttrs` — which drops the `(index) => attrs` function form. Labels remain the slider handles, so `enableSlider` is inert when splits are defined by count alone. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Screen.Recording.2026-07-15.at.5.42.05.PM.mp4
Summary