From 55c69f11e758d4a3ad19384eab1d827cfd4f2294 Mon Sep 17 00:00:00 2001 From: shivangrawat30 Date: Sat, 7 Oct 2023 00:49:25 +0530 Subject: [PATCH 1/6] added warning for using KResponsiveWindow Signed-off-by: shivangrawat30 --- lib/KResponsiveWindowMixin.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/KResponsiveWindowMixin.js b/lib/KResponsiveWindowMixin.js index a7632fdb5..59cd5afe7 100644 --- a/lib/KResponsiveWindowMixin.js +++ b/lib/KResponsiveWindowMixin.js @@ -65,6 +65,7 @@ const windowListeners = []; /* methods */ function windowMetrics() { + console.warn('Please Use useKResponsiveWindow instead of KResponsiveWindow Mixin'); return { width: window.innerWidth, height: window.innerHeight, @@ -169,6 +170,7 @@ export default { } else { this.windowBreakpoint = 7; } + console.log('_updateBreakpoint() called. windowBreakpoint:'); }, _updateOrientation() { this.windowIsPortrait = this.windowWidth < this.windowHeight; From 12b30ef94344cfb8201354c2bd7c4f3b29ab6bbb Mon Sep 17 00:00:00 2001 From: shivangrawat30 Date: Sat, 7 Oct 2023 00:50:28 +0530 Subject: [PATCH 2/6] minor change Signed-off-by: shivangrawat30 --- lib/KResponsiveWindowMixin.js | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/KResponsiveWindowMixin.js b/lib/KResponsiveWindowMixin.js index 59cd5afe7..d5d161427 100644 --- a/lib/KResponsiveWindowMixin.js +++ b/lib/KResponsiveWindowMixin.js @@ -170,7 +170,6 @@ export default { } else { this.windowBreakpoint = 7; } - console.log('_updateBreakpoint() called. windowBreakpoint:'); }, _updateOrientation() { this.windowIsPortrait = this.windowWidth < this.windowHeight; From b56b478f5f110247cc88d923a7b806e4c35f6d03 Mon Sep 17 00:00:00 2001 From: Shivang Rawat <114716075+ShivangRawat30@users.noreply.github.com> Date: Tue, 10 Oct 2023 17:12:37 +0530 Subject: [PATCH 3/6] Update KResponsiveWindowMixin.js --- lib/KResponsiveWindowMixin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/KResponsiveWindowMixin.js b/lib/KResponsiveWindowMixin.js index d5d161427..0511bd332 100644 --- a/lib/KResponsiveWindowMixin.js +++ b/lib/KResponsiveWindowMixin.js @@ -65,7 +65,6 @@ const windowListeners = []; /* methods */ function windowMetrics() { - console.warn('Please Use useKResponsiveWindow instead of KResponsiveWindow Mixin'); return { width: window.innerWidth, height: window.innerHeight, @@ -187,6 +186,7 @@ export default { }, }, mounted() { + console.warn('Please Use useKResponsiveWindow instead of KResponsiveWindow Mixin'); addWindowListener(this._updateWindow); }, beforeDestroy() { From 81df3540590bc3a28db0163320815fb32f8d1b08 Mon Sep 17 00:00:00 2001 From: Michaela Robosova Date: Fri, 13 Oct 2023 12:12:54 +0200 Subject: [PATCH 4/6] Tweak wording a bit --- lib/KResponsiveWindowMixin.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/KResponsiveWindowMixin.js b/lib/KResponsiveWindowMixin.js index 0511bd332..6041c0fd6 100644 --- a/lib/KResponsiveWindowMixin.js +++ b/lib/KResponsiveWindowMixin.js @@ -186,7 +186,7 @@ export default { }, }, mounted() { - console.warn('Please Use useKResponsiveWindow instead of KResponsiveWindow Mixin'); + console.warn(`Please use 'useKResponsiveWindow' composable instead of 'KResponsiveWindow' mixin`); addWindowListener(this._updateWindow); }, beforeDestroy() { From 7b43c3c024584073117338d1d021c857e5bfbc8a Mon Sep 17 00:00:00 2001 From: MisRob Date: Fri, 13 Oct 2023 12:23:20 +0200 Subject: [PATCH 5/6] Update changelog --- CHANGELOG.md | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fbc59102e..42e8ada00 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,7 +45,18 @@ Changelog is rather internal in nature. See release notes for the public overvie -## Version 2.0.0 +- [#463] + - **Description:** Add deprecation warning for KResponsiveWindowMixin + - **Products impact:** updated API + - **Addresses:** https://github.com/learningequality/kolibri-design-system/issues/459 + - **Components:** KResponsiveWindowMixin + - **Breaking:** no + - **Impacts a11y:** no + - **Guidance:** useKResponsiveWindow composable should be used instead + +[#463]: https://github.com/learningequality/kolibri-design-system/pull/463 + +## Version 2.0.0-beta0 (released - do not add new items) - [#462] - **Description:** Fix internal links in design system documentation From ccb7e6ce50ebab92d7c6c068d6bff58bdb30940c Mon Sep 17 00:00:00 2001 From: MisRob Date: Fri, 13 Oct 2023 12:28:38 +0200 Subject: [PATCH 6/6] Skip Prettier for the warning --- lib/KResponsiveWindowMixin.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/KResponsiveWindowMixin.js b/lib/KResponsiveWindowMixin.js index 6041c0fd6..345055958 100644 --- a/lib/KResponsiveWindowMixin.js +++ b/lib/KResponsiveWindowMixin.js @@ -186,6 +186,7 @@ export default { }, }, mounted() { + // prettier-ignore console.warn(`Please use 'useKResponsiveWindow' composable instead of 'KResponsiveWindow' mixin`); addWindowListener(this._updateWindow); },