primer / prism

A tool for creating and maintaining cohesive, consistent, and accessible color palettes
https://primer.style/prism/
MIT License
667 stars 39 forks source link

Prism crashes in Safari due to corrupt color list #70

Open Myndex opened 11 months ago

Myndex commented 11 months ago

Describe the bug

App crashes in Safari:

https://primer.style/prism/local/81680851-365b-4cc2-89f0-4a5856b07bda/scale/7b1f34cc-d9d9-4c03-84f3-208bc962b7f8

To Reproduce Steps to reproduce the behavior:

Using Safari (15.6.1) go here:

https://primer.style/prism/local/81680851-365b-4cc2-89f0-4a5856b07bda/scale/7b1f34cc-d9d9-4c03-84f3-208bc962b7f8

It won't load, white screen of death

Expected behavior Expected page to load, it didn't

Exporting the palette, and re-importing, I get an invalid color error, and here's why:

  "coral": [
    "#2ebef",
    "#fce4e9",
    "#f8cdd8",
    "#f2a4be",
    "#e762a3",
    "#aa3e7e",
    "#72305d",
    "#492342",
    "#2d182c",
    "#140b16"
  ],

The first color in coral #2ebef is only 5 characters.

Screenshots White screen

Environment

Safari (15.6.1)

Additional context

Just the specific color list (Coral) is corrupt, the other color lists for the group still work. I am not certain what I did to cause this, but I was working with linked curves IIR.

joshblack commented 11 months ago

Hi there! 👋

Thanks so much for taking the time to report this issue. We were trying to investigate the issue on our end but were unable to reproduce. We tried visiting the URLs that you linked but were never able to get it into a state where the hex color value was corrupted.

Do you still observe this behavior when clearing local storage and what not for the site? Is it also present for other versions of Safari or only in 15.6.1?

Thanks so much, appreciate any additional info here!

Myndex commented 11 months ago

Hi @joshblack

Unfortunately, I can't find much additional. Trying to bring up scale:

.../scale/7b1f34cc-d9d9-4c03-84f3-208bc962b7f8

Causes the editing screen to quit, with console error:

Failed to load resource: the server responded with a status of 404 (Not Found)

And drops back to the home/gallery page (primer.style/prism/), though this is probably because it can not find a scale with the hash key 7b1f34c... and my local storage no longer seems to have that corrupted scale in it.

Sorry I don't have more for you at the moment, other than it's a cool tool, wish we could re-order the scales.