From b87e802c8da02e4fb916abc5dc45c26b7d5dbdfc Mon Sep 17 00:00:00 2001 From: Fredrik Oterholt Date: Tue, 4 Jan 2022 09:18:29 +0100 Subject: [PATCH 1/6] Broken link for contribution guidelines Replace with correct URL for the contribution guidelines --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 6fe93019..e64bb9ba 100644 --- a/README.md +++ b/README.md @@ -40,7 +40,7 @@ Contributions of all kinds are welcome, not only in the form of code but also wi - documentation - translations -For the full contribution guidelines, check out: [https://docs.magicmirror.builders/getting-started/contributing.html](https://docs.magicmirror.builders/getting-started/contributing.html) +For the full contribution guidelines, check out: [https://docs.magicmirror.builders/about/contributing.html](https://docs.magicmirror.builders/about/contributing.html) ## Enjoying MagicMirror? Consider a donation! From 4325fcdca2fa103e0973a7200467a05a12542a75 Mon Sep 17 00:00:00 2001 From: Tom Hirschberger Date: Tue, 11 Jan 2022 15:20:33 +0100 Subject: [PATCH 2/6] automatically add/remove a hidden/shown class to the module wrappers if they get hidden or shown --- js/main.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/js/main.js b/js/main.js index bc128194..fa8db4a0 100644 --- a/js/main.js +++ b/js/main.js @@ -245,6 +245,8 @@ const MM = (function () { if (moduleWrapper !== null) { moduleWrapper.style.transition = "opacity " + speed / 1000 + "s"; moduleWrapper.style.opacity = 0; + moduleWrapper.className = moduleWrapper.className.split(" shown").join(""); + moduleWrapper.className += " hidden"; clearTimeout(module.showHideTimer); module.showHideTimer = setTimeout(function () { @@ -310,6 +312,8 @@ const MM = (function () { moduleWrapper.style.transition = "opacity " + speed / 1000 + "s"; // Restore the position. See hideModule() for more info. moduleWrapper.style.position = "static"; + moduleWrapper.className = moduleWrapper.className.split(" hidden").join(""); + moduleWrapper.className += " shown"; updateWrapperStates(); From 4ce42d4f70a67f779ce0f9c41ba3e9101b44f8e0 Mon Sep 17 00:00:00 2001 From: Tom Hirschberger Date: Tue, 11 Jan 2022 15:25:37 +0100 Subject: [PATCH 3/6] added shown/hidden class feature to CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8fae9b3a..e8a80f4f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ _This release is scheduled to be released on 2022-04-01._ - Added a config option under the weather module, absoluteDates, providing an option to format weather forecast date output with either absolute or relative dates. - Added test for new weather forecast absoluteDates porperty. +- The modules get a class shown/hidden added/removed if they get shown/hidden ### Updated From b3dd531abbb4f76a7179d296af9e20d40a2c0b08 Mon Sep 17 00:00:00 2001 From: Tom Hirschberger Date: Tue, 11 Jan 2022 15:52:00 +0100 Subject: [PATCH 4/6] removed adding of shown class --- js/main.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/js/main.js b/js/main.js index fa8db4a0..816d021a 100644 --- a/js/main.js +++ b/js/main.js @@ -245,7 +245,6 @@ const MM = (function () { if (moduleWrapper !== null) { moduleWrapper.style.transition = "opacity " + speed / 1000 + "s"; moduleWrapper.style.opacity = 0; - moduleWrapper.className = moduleWrapper.className.split(" shown").join(""); moduleWrapper.className += " hidden"; clearTimeout(module.showHideTimer); @@ -313,7 +312,6 @@ const MM = (function () { // Restore the position. See hideModule() for more info. moduleWrapper.style.position = "static"; moduleWrapper.className = moduleWrapper.className.split(" hidden").join(""); - moduleWrapper.className += " shown"; updateWrapperStates(); From 6c63fac2405b9e14d9280c8bb8f8dae4a3b07ab6 Mon Sep 17 00:00:00 2001 From: Tom Hirschberger Date: Tue, 11 Jan 2022 15:52:56 +0100 Subject: [PATCH 5/6] updated changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index e8a80f4f..6e769d4d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,7 +13,7 @@ _This release is scheduled to be released on 2022-04-01._ - Added a config option under the weather module, absoluteDates, providing an option to format weather forecast date output with either absolute or relative dates. - Added test for new weather forecast absoluteDates porperty. -- The modules get a class shown/hidden added/removed if they get shown/hidden +- The modules get a class hidden added/removed if they get hidden/shown ### Updated From 1ba4213910758f1fb3e7620a64fecbb8a8ec3c39 Mon Sep 17 00:00:00 2001 From: Tom Hirschberger Date: Tue, 11 Jan 2022 15:54:45 +0100 Subject: [PATCH 6/6] set the hidden class by classList features instead of string manipulation now --- js/main.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/js/main.js b/js/main.js index 816d021a..dfb79708 100644 --- a/js/main.js +++ b/js/main.js @@ -245,7 +245,7 @@ const MM = (function () { if (moduleWrapper !== null) { moduleWrapper.style.transition = "opacity " + speed / 1000 + "s"; moduleWrapper.style.opacity = 0; - moduleWrapper.className += " hidden"; + moduleWrapper.classList.add("hidden"); clearTimeout(module.showHideTimer); module.showHideTimer = setTimeout(function () { @@ -311,7 +311,7 @@ const MM = (function () { moduleWrapper.style.transition = "opacity " + speed / 1000 + "s"; // Restore the position. See hideModule() for more info. moduleWrapper.style.position = "static"; - moduleWrapper.className = moduleWrapper.className.split(" hidden").join(""); + moduleWrapper.classList.remove("hidden"); updateWrapperStates();