Fix weather widget details not showing until manually toggled - #2335
Merged
lissy93 merged 2 commits intoSep 5, 2026
Merged
Conversation
✅ Deploy Preview for dashy-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
showDetails was hardcoded to false regardless of the hideDetails option, so details only appeared after manually clicking the toggle button. Initialize showDetails from !options.hideDetails so details show immediately whenever hideDetails is false (its documented default), matching docs/widgets.md. hideDetails: true keeps hiding them as before. Fixes lissy93#903
jamalkamaladdin
force-pushed
the
fix/903-weather-hide-details
branch
from
September 5, 2026 15:23
ec8b1b5 to
e30b5e9
Compare
lissy93
requested changes
Sep 5, 2026
lissy93
left a comment
Owner
There was a problem hiding this comment.
Thanks @jamalkamaladdin
Mostly LGTM, except I don't think that we need 63 lines of tests for a 1-line easy change.
| description: null, | ||
| temp: null, | ||
| showDetails: false, | ||
| showDetails: !this.options.hideDetails, |
Owner
There was a problem hiding this comment.
I don't think we need these tests, they seem too rigid to be useful, and are only going to break in unhelpful ways next time we update the widget.
Contributor
Author
|
Done |
lissy93
approved these changes
Sep 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #903
Root cause
Weather.vueinitializedshowDetailsas a hardcodedfalse, completelyindependent of the
hideDetailsoption. Theoptions.hideDetailsvalue wasonly used to decide whether to build the
weatherDetailsarray(
processData, line 89), not whether to display it. As a result, even whenhideDetails: falsewas set (or left at its documented default), thedetails section stayed hidden until the user manually clicked the
"show more" toggle button — which is what issue #903 reports.
Per
docs/widgets.md: "If set totrue, the additional details (wind,humidity, pressure, etc) will not be shown. Defaults to
false" — i.e. bydefault, details are supposed to be visible without any interaction.
Fix
Initialize
showDetailsfrom!this.options.hideDetailsinstead of ahardcoded
false. This is a one-line change:hideDetailsunset orfalse(the documented default) -> details showimmediately, matching the docs.
hideDetails: true->weatherDetailsis never populated (unchangedexisting behavior), so nothing renders regardless.
cases.
Testing
Added
tests/components/widgets/weather.test.jscovering:hideDetailsis unsethideDetails: falsehideDetails: trueConfirmed the new tests fail against the old code (3 of 4 fail) and pass
after the fix. Full existing suite (
vitest run) andeslintremain green.