-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UnitControl
: Revamp support for changing unit by typing (#39303)
* Use a simpler way to allow changing units from the text input * Change default of `isPressEnterToChange` in `BoxControl` * Update tests * Avoid potential undefined * Remove extraneous null typing Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com> * Make key matching regex case-insensitive Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com> * Revert removed condtional type="text" on `UnitControl` * Forward __unstableStateReducer through `UnitControl` * Avoid intefering with paste or other shortcuts * Revert `BoxControl` changes * Update unit tests for `BoxControl` * Optimize and guard creation of regex Reduce starting from the second unit and cover null safety * Revise style * Make test of unit switching convenience run for each css unit * Add changelog entry * Remove custom `onChange` callback on Storybook, as it interferes with the actions tab * Improve tests by avoiding local `state` variables and using onChange spies instead * Clarify comments about js-dom not updating select inputs when using the keyboard * Update README --------- Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com> Co-authored-by: Aaron Robertshaw <60436221+aaronrobertshaw@users.noreply.github.com>
- Loading branch information
1 parent
6278cbf
commit 82d99b9
Showing
6 changed files
with
229 additions
and
392 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
Oops, something went wrong.