You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
If users assign a string to config.stylesheet rather than an array, the stylesheet doesn't load and it's confusing to debug. I think either the docs should be improved to explicitly mention that users MUST use an array, or some validation should be added to tell the user that they used a bad value for config.stylesheet. This was really confusing when I tried to configure Homer to use a custom stylesheet.
In config.yml I had stylesheet: assets/custom.css (broken, don't copy this!). This wasn't working and I had to look at the Homer source code to learn why, specifically this part of App.vue where the code loops over the values in config.stylesheet. That led me to look at my dashboard's style tag, which showed this weird code:
Basically, because I used stylesheet: assets/custom.css (broken, don't copy this!), when it was looped over in App.vue, it looped over the characters of the string, treating each one as a stylesheet to import.
I also probably could've been tipped off by these weird 404'd requests:
Describe the solution you'd like
In the docs for config.yml, maybe add another comment to warn users that the value MUST be an array, not a string. I could've just read the docs more carefully but I'm guessing I'm not the only one to be tripped up by this.
Describe alternatives you've considered
You might also consider adding a more obvious failure mode (either show an error, fail to build, etc.) if config.stylesheet is provided but is not an array of strings.
Additional context
N/A. Thanks for working on a great project and contributing to open source!
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
If users assign a string to
config.stylesheet
rather than an array, the stylesheet doesn't load and it's confusing to debug. I think either the docs should be improved to explicitly mention that users MUST use an array, or some validation should be added to tell the user that they used a bad value forconfig.stylesheet
. This was really confusing when I tried to configure Homer to use a custom stylesheet.In
config.yml
I hadstylesheet: assets/custom.css
(broken, don't copy this!). This wasn't working and I had to look at the Homer source code to learn why, specifically this part of App.vue where the code loops over the values inconfig.stylesheet
. That led me to look at my dashboard'sstyle
tag, which showed this weird code:Basically, because I used
stylesheet: assets/custom.css
(broken, don't copy this!), when it was looped over in App.vue, it looped over the characters of the string, treating each one as a stylesheet to import.I also probably could've been tipped off by these weird 404'd requests:
Describe the solution you'd like
In the docs for config.yml, maybe add another comment to warn users that the value MUST be an array, not a string. I could've just read the docs more carefully but I'm guessing I'm not the only one to be tripped up by this.
Describe alternatives you've considered
You might also consider adding a more obvious failure mode (either show an error, fail to build, etc.) if
config.stylesheet
is provided but is not an array of strings.Additional context
N/A. Thanks for working on a great project and contributing to open source!
The text was updated successfully, but these errors were encountered: