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

Rework of Weather UI #4

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

Rework of Weather UI #4

wants to merge 17 commits into from

Conversation

Hushous
Copy link
Member

@Hushous Hushous commented Sep 30, 2024

  • Redesigned the UI of the weather module
  • Bigger Map
  • streamlined infobox
  • full translation
  • removed unnecessary code segments

- reduce redundant lines
- clean html
- rework UI
not done yet,
translation code filterOption.key doesnt get recognized
Added dynamic translation
-translation for tags
-injected translateservice in .ts script
api states name and state now together in station.name
-delete unnecessary attributes
-add translation for tags
switch progress
- download button anchored to bottom
- bulma calendar in place (on  1920x1080)
- deleted tags
- reduce codebase
- increase readability
- reorder functions
- added tags for information
- deleted unnecessary  translations
- added date representation for selected dates
- dates get compared in unix timestamp
- deleted download disable function
<div class="dropdown is-hoverable is-fullwidth">
<div class="dropdown-trigger">
<button class="button">
<span>{{ "weather-data.attributes." + type.key | translate }}</span>
Copy link
Member

Choose a reason for hiding this comment

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

Please add some chevron (e.g. <ion-icon name="chevron-down-outline"></ion-icon>), similar to this example https://bulma.io/documentation/components/dropdown/

src/lib/weather-data.component.ts Outdated Show resolved Hide resolved
@@ -304,7 +410,6 @@ export class WeatherDataComponent implements OnInit {
console.info("Start downloading!");

this.weatherService.fetchWeatherDataByStation(url.toString()).subscribe({
Copy link
Member

Choose a reason for hiding this comment

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

You have a single value, use a Promise instead

https://rxjs.dev/deprecations/to-promise#firstvaluefrom

* @param timestamp to be converted
* @returns time in seconds (unix timestamp)
*/
convertDateStringToUnixTime(dateString: string): number {
Copy link
Member

Choose a reason for hiding this comment

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

You can format dates via formatDate and DatePipe

add json postfix

Co-authored-by: Piepmatz <[email protected]>
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.

2 participants