-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[weather] add humidity to hourly view, fix spacing error when using UV Index, add config option to hide precipitation entries that are zero #3526
Conversation
automerge is turned off.. |
I hope this fixed it. It may have broken my fork but that is irrelevant, the changes proposed seem fine. |
Thanks for your PR. Could you attach screenshot sof before and after your changes to this PR here? |
I just used the placerholder as the actual class name. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry for taking so long to review, just some minor things to finish
modules/default/weather/hourly.njk
Outdated
@@ -21,15 +21,27 @@ | |||
{% endif %} | |||
</td> | |||
{% endif %} | |||
{% if config.showHumidity %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add the new config options to the defaults object at the top of the file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean the defaults in the weather.js?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it is a new config property, so it needs to havea default value set, and the defaults:{} object contains those
as documented in the developers guide for modules
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no progress here, @rejas is the missing config.showHumidity
the only thing (beside changelog merge conflicts) which is preventing this from merging?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
besides that i had one question above...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
showHumidity is a string due to current.njk implementing multiple options. I only ever implemented a binary True/False. Since js' Boolean("none") == True this will not work as intended without changes. (For that matter all strings that aren't empty are true, so it will always have to check against strings)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed the if to check against "none", but other than that it is still undefined what the correct string should be to turn it on, since the current.njk Humidity has multiple placements, which is inapplicable here. Since the current config comment isn't listing possible values right now, i would suggest changing it to something along the lines of // current: "none", "wind", "below"; hourly: "none", "on"
. While this wouldn't be clean it would work.
Alternatively it could be split into "ShowHumidity: True/False" + "CurrentHumidityPosition: wind, below" etc; whatever is preferable. Changing the comment is a band aid but works, adding options could become convoluted but has less ambiguity.
modules/default/weather/hourly.njk
Outdated
@@ -21,15 +21,27 @@ | |||
{% endif %} | |||
</td> | |||
{% endif %} | |||
{% if config.showHumidity %} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
besides that i had one question above...
@@ -11,6 +11,9 @@ _This release is scheduled to be released on 2024-10-01._ | |||
|
|||
### Added | |||
|
|||
- [weather] Added option Humidity to hourly View |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you'll need to move your changelog entries into the latest develop section....
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hopefully this worked? I replaced the entire file with the current one and then added back the changes
EDIT: nevermind.
This reverts commit 5939180.
…(Added Humidity to hourly. Fixed spacing for hourly UV. Added option to hide zeroes in hourly precipitation. Added config option documentation to defaults)
Basically the title. Just some existing weather data included into hourly, some config option ("hideZeroes") to hide precipitation when it is zero (this actually shrinks the entire table, removing columns that are completely empty), and add a spacing column to fix the UV Index column.
I don't understand why CHANGELOG.md is broken, i accidentally did my changes to my master, so i just took the current dev branch changelog and copied it into my master changelog, added my edits, and commited. This shouldn't conflict but it does