Metadata
Description
When Weavly is loaded without an explicit theme parameter in the URL (or none in local storage, in the case of loading with a URL with no parameters), it defaults to the ‘light’ theme. Whereas in the Theme menu, the “Default” option sets the ‘mixed’ theme.
Steps to reproduce:
- Load Weavly with the following URL: https://deploy-preview-138--c2lc-build.netlify.app/?p=
Expected:
- The mixed theme
Actual:
- The light theme
There are 3 places in App.js where a default theme value is set. We should make them consistently set to ‘mixed’:
- https://github.com/codelearncreate/c2lc-coding-environment/blob/49544ac528bb7f756e4bde1c2f85349d1fc55428/src/App.js#L382
- https://github.com/codelearncreate/c2lc-coding-environment/blob/49544ac528bb7f756e4bde1c2f85349d1fc55428/src/App.js#L922
- https://github.com/codelearncreate/c2lc-coding-environment/blob/49544ac528bb7f756e4bde1c2f85349d1fc55428/src/App.js#L969
Comments
-
Tony Atkins [RtF] commented
2021-04-01T04:43:10.229-0400 Like everything else we persist, the theme is also persisted within local storage, so it may simply be that the value is carried over from there. As an example, if I change to high contrast, create a program, and then quit Firefox and open the develop 0.7 URL with no parameters, the character state, program, and theme are all recovered and added to the URL.
I had to completely clear my browser storage in Firefox, and by doing that was able to verify the issue, which I will put in a pull to address shortly.
-
Tony Atkins [RtF] commented
2021-04-01T04:52:35.967-0400 The empty program trick is very useful as well.