From 1bc0270d7bda950380702c81bf3c2e04073b8483 Mon Sep 17 00:00:00 2001
From: flopp999 <21694965+flopp999@users.noreply.github.com>
Date: Sun, 11 Oct 2020 09:36:52 +0200
Subject: [PATCH 1/6] Update forecast.njk
change name of day to today and tomorrow
---
modules/default/weather/forecast.njk | 30 +++++++++++++++++-----------
1 file changed, 18 insertions(+), 12 deletions(-)
diff --git a/modules/default/weather/forecast.njk b/modules/default/weather/forecast.njk
index 7d0f515d..98569e23 100644
--- a/modules/default/weather/forecast.njk
+++ b/modules/default/weather/forecast.njk
@@ -10,19 +10,25 @@
{% set forecast = forecast.slice(0, numSteps) %}
{% for f in forecast %}
+ {% if (currentStep == 0) %}
+ {{ "TODAY" | translate }} |
+ {% elif (currentStep == 1) %}
+ {{ "TOMORROW" | translate }} |
+ {% else %}
{{ f.date.format('ddd') }} |
- |
-
- {{ f.maxTemperature | roundValue | unit("temperature") }}
- |
-
- {{ f.minTemperature | roundValue | unit("temperature") }}
- |
- {% if config.showPrecipitationAmount %}
-
- {{ f.precipitation | unit("precip") }}
- |
- {% endif %}
+ {% endif %}
+ |
+
+ {{ f.maxTemperature | roundValue | unit("temperature") }}
+ |
+
+ {{ f.minTemperature | roundValue | unit("temperature") }}
+ |
+ {% if config.showPrecipitationAmount %}
+
+ {{ f.precipitation | unit("precip") }}
+ |
+ {% endif %}
{% set currentStep = currentStep + 1 %}
{% endfor %}
From 569dec1b0b60a96e8fecbd4a33032aaddc7210c1 Mon Sep 17 00:00:00 2001
From: flopp999 <21694965+flopp999@users.noreply.github.com>
Date: Sun, 11 Oct 2020 09:42:09 +0200
Subject: [PATCH 2/6] Update CHANGELOG.md
---
CHANGELOG.md | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index fb61bd24..ce7a75a4 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,7 +12,7 @@ _This release is scheduled to be released on 2021-01-01._
### Added
### Updated
-
+- Weather module - forecast now show TODAY and TOMORROW instead of weekday, to make it easier to understand
### Deleted
### Fixed
From 3b76ca4f9ba6527aa31c5672d2aa324541506246 Mon Sep 17 00:00:00 2001
From: flopp999 <21694965+flopp999@users.noreply.github.com>
Date: Mon, 12 Oct 2020 09:09:42 +0200
Subject: [PATCH 3/6] Update forecast.njk
---
modules/default/weather/forecast.njk | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/modules/default/weather/forecast.njk b/modules/default/weather/forecast.njk
index 98569e23..ae752637 100644
--- a/modules/default/weather/forecast.njk
+++ b/modules/default/weather/forecast.njk
@@ -19,15 +19,15 @@
{% endif %}
|
- {{ f.maxTemperature | roundValue | unit("temperature") }}
+ {{ f.maxTemperature | roundValue | unit("temperature") }}
|
- {{ f.minTemperature | roundValue | unit("temperature") }}
+ {{ f.minTemperature | roundValue | unit("temperature") }}
|
{% if config.showPrecipitationAmount %}
-
- {{ f.precipitation | unit("precip") }}
- |
+
+ {{ f.precipitation | unit("precip") }}
+ |
{% endif %}
{% set currentStep = currentStep + 1 %}
From d11696015d5ed200f6ece6b03c305a292f367398 Mon Sep 17 00:00:00 2001
From: flopp999 <21694965+flopp999@users.noreply.github.com>
Date: Mon, 12 Oct 2020 09:10:51 +0200
Subject: [PATCH 4/6] Update forecast.njk
---
modules/default/weather/forecast.njk | 36 ++++++++++++++--------------
1 file changed, 18 insertions(+), 18 deletions(-)
diff --git a/modules/default/weather/forecast.njk b/modules/default/weather/forecast.njk
index ae752637..85ed0fef 100644
--- a/modules/default/weather/forecast.njk
+++ b/modules/default/weather/forecast.njk
@@ -10,25 +10,25 @@
{% set forecast = forecast.slice(0, numSteps) %}
{% for f in forecast %}
- {% if (currentStep == 0) %}
- {{ "TODAY" | translate }} |
- {% elif (currentStep == 1) %}
- {{ "TOMORROW" | translate }} |
- {% else %}
- {{ f.date.format('ddd') }} |
- {% endif %}
- |
-
- {{ f.maxTemperature | roundValue | unit("temperature") }}
- |
-
- {{ f.minTemperature | roundValue | unit("temperature") }}
- |
- {% if config.showPrecipitationAmount %}
-
- {{ f.precipitation | unit("precip") }}
+ {% if (currentStep == 0) %}
+ | {{ "TODAY" | translate }} |
+ {% elif (currentStep == 1) %}
+ {{ "TOMORROW" | translate }} |
+ {% else %}
+ {{ f.date.format('ddd') }} |
+ {% endif %}
+ |
+
+ {{ f.maxTemperature | roundValue | unit("temperature") }}
|
- {% endif %}
+
+ {{ f.minTemperature | roundValue | unit("temperature") }}
+ |
+ {% if config.showPrecipitationAmount %}
+
+ {{ f.precipitation | unit("precip") }}
+ |
+ {% endif %}
{% set currentStep = currentStep + 1 %}
{% endfor %}
From 3c84002abda8cad6a1650a1950e54ed0ce2dae90 Mon Sep 17 00:00:00 2001
From: Michael Teeuw
Date: Thu, 15 Oct 2020 09:20:44 +0200
Subject: [PATCH 5/6] Fix linter issues.
---
CHANGELOG.md | 2 ++
1 file changed, 2 insertions(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ce7a75a4..7e5fedea 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -12,7 +12,9 @@ _This release is scheduled to be released on 2021-01-01._
### Added
### Updated
+
- Weather module - forecast now show TODAY and TOMORROW instead of weekday, to make it easier to understand
+
### Deleted
### Fixed
From e09fec56e257c988adc099d5f54c59fd2a2ff6b7 Mon Sep 17 00:00:00 2001
From: flopp999 <21694965+flopp999@users.noreply.github.com>
Date: Tue, 20 Oct 2020 07:26:39 +0200
Subject: [PATCH 6/6] Update weather_spec.js
try to change the default to Today and Tomorrow
---
tests/e2e/modules/weather_spec.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tests/e2e/modules/weather_spec.js b/tests/e2e/modules/weather_spec.js
index d87a44cd..2d9f3f01 100644
--- a/tests/e2e/modules/weather_spec.js
+++ b/tests/e2e/modules/weather_spec.js
@@ -186,7 +186,7 @@ describe("Weather module", function () {
const weather = generateWeatherForecast();
await setup({ template, data: weather });
- const days = ["Fri", "Sat", "Sun", "Mon", "Tue"];
+ const days = ["Today", "Tomorrow", "Sun", "Mon", "Tue"];
for (const [index, day] of days.entries()) {
await app.client.waitUntilTextExists(`.weather table.small tr:nth-child(${index + 1}) td:nth-child(1)`, day, 10000);