-
Notifications
You must be signed in to change notification settings - Fork 4.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
LineHeightControl: Allow for more granular control of decimal places (#…
…52902) * Change the line height step value from 0.1 to 0.01 * Update test and related comments * Revert 0.1 to 0.01 step changes * Avoid using roundClamp for line height calculations * Introduce roundingStep prop to NumberControl * Update number-control tests to use string input values * Add changelog entry * Try spincrement prop * Handle rounding logic with two decimals * Fix rounding up logic * Tweak type comments and changelog entry Co-Authored-By: Mitchell Austin <9000376+stokesman@users.noreply.github.com> * Revert specialised rounding in LineHeightControl * Fix spin rounding in NumberControl Co-Authored-By: Mitchell Austin <9000376+stokesman@users.noreply.github.com> * Replace spincrement with spinFactor Co-Authored-By: Mitchell Austin <9000376+stokesman@users.noreply.github.com> * Update line height control unit tests * Update packages/components/src/number-control/index.tsx Co-authored-by: Lena Morita <lena@jaguchi.com> * Update packages/components/src/number-control/index.tsx Co-authored-by: Lena Morita <lena@jaguchi.com> * Add tests that include use of spinFactor prop * Add tests for shiftStep + spinFactor --------- Co-authored-by: Mitchell Austin <9000376+stokesman@users.noreply.github.com> Co-authored-by: Mitchell Austin <mr.fye@oneandthesame.net> Co-authored-by: Lena Morita <lena@jaguchi.com>
- Loading branch information
1 parent
26cf1f8
commit 4388c48
Showing
7 changed files
with
107 additions
and
27 deletions.
There are no files selected for viewing
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
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
7 changes: 6 additions & 1 deletion
7
packages/block-editor/src/components/line-height-control/utils.js
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
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
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
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
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