Repository navigation
GradientPicker: Fix control point UI and drag interaction - #20670
Merged
Merged
Conversation
ItsJonQ
requested review from
ajitbohra,
chrisvanpatten,
jorgefilipecosta and
youknowriad
as code owners
March 5, 2020 22:49
|
Size Change: +11 B (0%) Total Size: 864 kB
ℹ️ View Unchanged
|
6 tasks done
ajlende
approved these changes
Mar 6, 2020
ajlende
left a comment
Contributor
There was a problem hiding this comment.
Tested with my starscape block in Chrome, Firefox, Safari, and Edge. It fixes Automattic/block-experiments#41.
mtias
reviewed
Mar 6, 2020
|
|
||
| const changeAngleToPosition = ( event ) => { | ||
| const { x: centerX, y: centerY } = angleCircleCenter.current; | ||
| event.preventDefault(); |
Member
There was a problem hiding this comment.
It's unclear what this is accomplishing on its own. Would a comment be helpful?
added 2 commits
March 9, 2020 15:09
This update fixes the control point circular UI rendered in the (custom) GradientPicker. It also improves the drag interaction for the angular picker - removing content selection and accidental drag side effects on other UI elements.
youknowriad
force-pushed
the
fix/custom-gradient-picker-ui-interaction
branch
from
March 9, 2020 14:09
54e4f04 to
6202d13
Compare
jorgefilipecosta
added a commit
that referenced
this pull request
Mar 18, 2020
jorgefilipecosta
added a commit
that referenced
this pull request
Mar 23, 2020
jorgefilipecosta
added a commit
that referenced
this pull request
Mar 23, 2020
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Description
This update fixes the control point circular UI rendered in the (custom) GradientPicker.
It also improves the drag interaction for the angular picker - removing content selection and accidental drag side effects on other UI elements.
How has this been tested?
Tested locally on Gutenberg.
Screenshots
Before:

(Note: GIF goes white because dragging at a certain point causes the block to deselect)
After:

Types of changes
event.preventDefaultfor drag eventChecklist:
Addresses the GradientPicker issue mentioned in
#20575