From 268e3b8161aa9f4399b3fdf78e558d0dac79b785 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Thu, 9 May 2024 16:56:16 -0700 Subject: [PATCH 1/2] Update brand color validation to match new schema. --- kolibri/core/assets/src/styles/themeSpec.js | 19 ++++--------------- 1 file changed, 4 insertions(+), 15 deletions(-) diff --git a/kolibri/core/assets/src/styles/themeSpec.js b/kolibri/core/assets/src/styles/themeSpec.js index a48624b3199..768b60b3d97 100644 --- a/kolibri/core/assets/src/styles/themeSpec.js +++ b/kolibri/core/assets/src/styles/themeSpec.js @@ -3,23 +3,12 @@ import isObject from 'lodash/isObject'; const logging = logger.getLogger(__filename); -function _colorScaleValidator(value) { +function _brandColorScaleValidator(value) { if (!isObject(value)) { logging.error(`Expected object but got '${value}'`); return false; } - const COLOR_NAMES = [ - 'v_50', - 'v_100', - 'v_200', - 'v_300', - 'v_400', - 'v_500', - 'v_600', - 'v_700', - 'v_800', - 'v_900', - ]; + const COLOR_NAMES = ['v_200', 'v_400', 'v_600', 'v_800', 'v_1000', 'v_1100']; for (const colorName of COLOR_NAMES) { if (!value[colorName]) { logging.error(`${colorName} '${name}' not defined by theme`); @@ -60,12 +49,12 @@ export default { primary: { type: Object, required: true, - validator: _colorScaleValidator, + validator: _brandColorScaleValidator, }, secondary: { type: Object, required: true, - validator: _colorScaleValidator, + validator: _brandColorScaleValidator, }, }, }, From e239cbeac7075adfb476e9c851a55d5d59be4bc5 Mon Sep 17 00:00:00 2001 From: Richard Tibbles Date: Thu, 9 May 2024 16:56:44 -0700 Subject: [PATCH 2/2] Update color tokens to ones that match the new scheme. --- .../device/assets/src/views/DeprecationWarningBanner.vue | 2 +- .../device/assets/src/views/DeviceSettingsPage/index.vue | 2 +- .../learn/assets/src/views/LibraryPage/UnPinnedDevices.vue | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/kolibri/plugins/device/assets/src/views/DeprecationWarningBanner.vue b/kolibri/plugins/device/assets/src/views/DeprecationWarningBanner.vue index 140e0120f68..9e12243ec3b 100644 --- a/kolibri/plugins/device/assets/src/views/DeprecationWarningBanner.vue +++ b/kolibri/plugins/device/assets/src/views/DeprecationWarningBanner.vue @@ -3,7 +3,7 @@
diff --git a/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue b/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue index 11f9843af2c..f264a5b0e7d 100644 --- a/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue +++ b/kolibri/plugins/device/assets/src/views/DeviceSettingsPage/index.vue @@ -481,7 +481,7 @@ ...mapGetters('deviceInfo', ['isRemoteContent']), InfoDescriptionColor() { return { - color: this.$themePalette.grey.v_700, + color: this.$themePalette.grey.v_600, }; }, pageTitle() { diff --git a/kolibri/plugins/learn/assets/src/views/LibraryPage/UnPinnedDevices.vue b/kolibri/plugins/learn/assets/src/views/LibraryPage/UnPinnedDevices.vue index bf22b977435..57af0a1ea90 100644 --- a/kolibri/plugins/learn/assets/src/views/LibraryPage/UnPinnedDevices.vue +++ b/kolibri/plugins/learn/assets/src/views/LibraryPage/UnPinnedDevices.vue @@ -111,7 +111,7 @@ } }, channelColor() { - return this.$themePalette.grey.v_700; + return this.$themePalette.grey.v_600; }, }, $trs: {