Adaptive color theme "Copy theme URL" function results in a broken link
- Dominant language
- JavaScript
- Stars
- 2.1k
- Forks
- 130
- PR merge metrics
- No merged PRs in 30d
Description
## Description
When using the **Adaptive color theme** tool, by opening the _Share_ dropdown and clicking _Copy theme URL_, a URL is copied to the clipboard. That URL contains all of the necessary information to load the color theme into the Leonardo Web Tool in a new tab or browser. However, the result of pasting that URL into a new tab is an indefinite loading screen.
## Steps to reproduce
1. Go to http://leonardocolor.io
2. Click on **Adaptive color theme**
3. Click on the **Share** button at the top right
4. Click **Copy theme URL**
5. Open a new tab and paste the URL into the address bar
6. Observe an indefinite loading screen
## Expected behavior
When I paste the copied URL into a new tab or browser window, I expect the resulting web page to be the same as the _adaptive color theme_ I copied from.
## Screenshots


## Environment
- Chrome version 111.0.5563.146 on MacOS Ventura 13.2.1
- Safari version 16.3 (18614.4.6.1.6) on MacOS Ventura 13.2.1
## Additional context
This isn't happening on every color set, but it has happened to me a handful of times. I have a feeling that some of the URL variables are causing this. Whether it's how they're getting translated into the URL, or read back into the app after pasting the URL.
Here is one that fails for reference:
`https://leonardocolor.io/theme.html?name=Untitled&config=%7B%22baseScale%22%3A%22Sky%22%2C%22colorScales%22%3A%5B%7B%22name%22%3A%22Sky%22%2C%22colorKeys%22%3A%5B%22%23bbd2ec%22%2C%22%23837afa%22%5D%2C%22colorspace%22%3A%22OKLCH%22%2C%22ratios%22%3A%5B%221.025%22%2C%221.125%22%2C%221.25%22%2C%221.75%22%2C%222.5%22%2C%223.25%22%2C%224.5%22%2C%227%22%2C%229.25%22%2C%2213%22%2C%2218%22%5D%2C%22smooth%22%3Afalse%7D%5D%2C%22lightness%22%3A100%2C%22contrast%22%3A1%2C%22saturation%22%3A100%2C%22formula%22%3A%22wcag2%22%7D`
Contributor guide
Research direction
Start at theme.html and trace how the Adaptive color theme's Share > Copy theme URL query is read when the page loads. Reproduce with the failing URL from the issue, then verify that copied URLs open the same adaptive theme instead of remaining on the loading screen.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100