ruucm / shadergradient

Create beautiful moving gradients on Framer, Figma and React
https://shadergradient.co
768 stars 33 forks source link

Removing a color crashes website #67

Open imMatheus opened 9 months ago

imMatheus commented 9 months ago

When being on the https://www.shadergradient.co/customize site, removing a color from the color picker (meaning removing the entire hex color) makes the entire website crash. I have included a very short video showing the steps needed to reproduce it.

But here is also a step-by-step guide on to reproduce it

  1. Be on the https://www.shadergradient.co/customize URL
  2. Press the colors tab
  3. Pick any of the 3 colors and press the hex value to select it, then remove it
  4. Website should now have crashed

https://github.com/ruucm/shadergradient/assets/77362975/d87df3a4-24f1-4bcb-8e4a-331d1de54c93

A proposed solution from a UX perspective is to not commit the state change if the color is invalid. Meaning, that if a user has three colors, #ff0000, #00ff00 and #0000ff (Red, Green and Blue) then decides to remove the last color, we do not actually change the state and keep showing that color until a new valid color replaces it

ruucm commented 9 months ago

Hey thanks for reporting this. yeah we are refactoring the whole websites including performance improvements. Will add this fix also :)

imMatheus commented 9 months ago

Great, thanks 🙌 PS: Really love the website, its stunning!