-
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.
Declunkify focal point picker dragging (#28676)
* FocalPointPicker: call onDrag instead of onChange while dragging Also: - fix focus and keyboard input on media container - fix onDragStart and onDragEnd to actually fire * Cover block: use imperative preview of focal point while dragging * Media & Text block: use imperative focal point preview while dragging Due to the need to forward a ref through a few components they are also updated. The HOC withNotices is refactored to a function component and made accept and return forwardRef components. ResizableBox is updated to a forwardRef. * Correct createErrorNotice in withNotices * Use a more lenient test for forwardRefs in withNotices * add unit tests for withNotices * Refine event handling in FocalPointPicker - interrupt dragging on blur instead of via withFocusOutside - avoid redundant calls to onDragEnd and onChange - have mousemove listener start and stop synchronously - pass focal point value as first argument to onDrag - some minor stylistic changes * restore grabbing cursor style in FocalPointPicker * Update FocalPointPicker usage in core blocks * add unit tests for FocalPointPicker * Update docs for FocalPointPicker * Update changelog for components package
- Loading branch information
Showing
11 changed files
with
490 additions
and
226 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
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
Oops, something went wrong.