Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Gradients: errors resulting from clearing or quickly selecting gradient colors in background color #36899

Closed
2 tasks done
andrewserong opened this issue Nov 26, 2021 · 3 comments · Fixed by #37051
Closed
2 tasks done
Assignees
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended

Comments

@andrewserong
Copy link
Contributor

andrewserong commented Nov 26, 2021

Description

While working on a fix for #36640, I noticed a couple of errors being generated via the gradient color picker.

Issues to resolve

  1. With a blocks theme active, while I select between gradients, and then click the Clear button (or deselect the gradient) an error is thrown.
  2. If I go to select a custom color for one part of the gradient and then pan quickly while selecting colors, the block crashes. (Fixed in: Color Picker: Re-instate debounce and controlled value to fix issue with gradient picker #36941)

Step-by-step reproduction instructions

  1. Activate a blocks-based theme (e.g. TwentyTwentyTwo)
  2. Add a Group block to a post
  3. Add a gradient background color to the block, and see if you can recreate the above two scenarios

Screenshots, screen recording, code snippet

Scenario 1 (error caused by clearing gradient)

Kapture 2021-11-26 at 16 57 06

Error message:

image

Fixed: Scenario 2 (failure caused by moving the mouse rapidly across the color picker)

Kapture 2021-11-26 at 17 03 44

Error message:

image

Environment info

  • Gutenberg trunk
  • TwentyTwentyTwo theme
  • macOS, Google Chrome Version 96.0.4664.55 (Official Build) (arm64)

Please confirm that you have searched existing issues in the repo.

Yes

Please confirm that you have tested with all plugins deactivated except Gutenberg.

Yes

@andrewserong
Copy link
Contributor Author

The main blocker here (failure caused by moving the mouse rapidly across the color picker) has been resolved as of #36941. I'll leave this issue open for the remaining issue (console error/warning when clearing a gradient).

@andrewserong andrewserong self-assigned this Dec 1, 2021
@andrewserong
Copy link
Contributor Author

With a blocks theme active, while I select between gradients, and then click the Clear button (or deselect the gradient) an error is thrown.

I have an idea for a fix for this one, I'll put up a PR for it tomorrow 🤞

@andrewserong
Copy link
Contributor Author

Fix ready for review in: #37051

WordPress 5.9 Must-Haves automation moved this from 📥 To do to ✅ Done Dec 3, 2021
@oandregal oandregal removed the [Status] In Progress Tracking issues with work in progress label Dec 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Design Tools Tools that impact the appearance of blocks both to expand the number of tools and improve the experi [Type] Bug An existing feature does not function as intended
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants