Skip to content
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

Add (optional) precipitation amount #184

Merged
merged 3 commits into from Oct 18, 2022

Conversation

pauln
Copy link
Contributor

@pauln pauln commented Oct 17, 2022

Adds an option to display precipitation amounts.

I noticed that there's a feature request for precipitation amounts, so I've implemented it following the same patterns as in #182 (wind forecast).

Closes #142

Adds an option to display precipitation amounts.
Copy link
Owner

@decompil3d decompil3d left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks -- some comments below

README.md Outdated Show resolved Hide resolved
cypress/e2e/weather-bar.cy.ts Outdated Show resolved Hide resolved
src/editor.ts Outdated Show resolved Hide resolved
src/editor.ts Outdated Show resolved Hide resolved
src/editor.ts Outdated Show resolved Hide resolved
@@ -339,6 +344,22 @@ export class HourlyWeatherCard extends LitElement {
return temperatures;
}

private getPrecipitation(forecast: ForecastSegment[], numSegments: number, offset: number, unit: string): SegmentPrecipitation[] {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can stay as-is since it'll be easy to add precipitation probability into the objects later.

src/localize/languages/en.json Outdated Show resolved Hide resolved
src/types.ts Outdated Show resolved Hide resolved
src/weather-bar.ts Outdated Show resolved Hide resolved
src/weather-bar.ts Outdated Show resolved Hide resolved
pauln and others added 2 commits October 18, 2022 17:10
Allows for a future PR to add the chance of precipitation without renaming this option.

Co-authored-by: Jonathan Keslin <decompil3d@users.noreply.github.com>
@pauln
Copy link
Contributor Author

pauln commented Oct 18, 2022

Sure, that makes sense to me. Thanks for the suggested changes; that saved me some time finding all the places that needed changing (though you did miss one, which I've sorted in a subsequent commit).

@decompil3d decompil3d merged commit 5f802c4 into decompil3d:main Oct 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Precipitation (rainfall) information or mode
2 participants