From 36bd334693ee1fbaaaa05c1da5e06017e946f607 Mon Sep 17 00:00:00 2001 From: adibmbrk Date: Sun, 26 Jan 2025 09:00:08 +0000 Subject: [PATCH 01/14] Remove .less files --- .../frontend/shared/styles/main.less | 101 ------------------ .../plugins/formulas/style.less | 66 ------------ .../plugins/image-upload/style.less | 82 -------------- 3 files changed, 249 deletions(-) delete mode 100644 contentcuration/contentcuration/frontend/shared/styles/main.less delete mode 100644 contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.less delete mode 100644 contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.less diff --git a/contentcuration/contentcuration/frontend/shared/styles/main.less b/contentcuration/contentcuration/frontend/shared/styles/main.less deleted file mode 100644 index 50000d3755..0000000000 --- a/contentcuration/contentcuration/frontend/shared/styles/main.less +++ /dev/null @@ -1,101 +0,0 @@ -@import '~material-icons/iconfont/material-icons.css'; - -@font-face { - font-family: 'Noto Sans'; - src: url('../fonts/NotoSans-Regular.ttf') format('truetype'); -} - -html { - overflow-y: auto !important; - - .title, - .headline, - .display, - .display-1, - .subheading, - .v-toolbar__title, - .v-chip__content { - font-family: 'Noto Sans' !important; - } - - .v-btn--flat, - .v-tabs__item { - font-weight: bold; - cursor: pointer; - } - - .text-truncate { - line-height: unset !important; - } -} - -body { - font-family: 'Noto Sans', Verdana, sans-serif; - letter-spacing: 0.03em; - /* stylelint-disable-next-line custom-property-pattern */ - background-color: var(--v-backgroundColor-base); - - * { - font-family: 'Noto Sans'; - } - - .v-card { - outline-color: #8dc5b6; - } - - .v-tooltip__content { - max-width: 200px; - text-align: center; - } - - .button:focus-visible, - .v-btn:focus-visible { - outline: 2px solid var(--v-secondary-base) !important; - } -} - -/* RTL-related rules */ - -/*! rtl:begin:ignore */ -[dir='rtl'] { - .v-label { - transform-origin: top right; - } - - .grid-item div { - text-align: right; - } - - .rtl-flip { - transform: scaleX(-1); - } - - .v-speed-dial--left { - right: auto; - left: 16px; - } - - .v-input { - text-align: right; - } -} - -/*! rtl:end:ignore */ - -// Overriding default Vuetify theme -.theme--light { - .v-sheet, - .v-card, - .v-list__tile, - &.application { - color: var(--v-text-base); - } - - // Removes a weird default Vuetify style - // applying background color to links - // Due to name collisions with tokens - .text, - .link { - background-color: transparent !important; - } -} diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.less b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.less deleted file mode 100644 index fe30f853dd..0000000000 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.less +++ /dev/null @@ -1,66 +0,0 @@ -@import '../../mathquill/mathquill.css'; - -.uploading { - cursor: progress; -} - -.formulas-menu, -.images-menu { - z-index: 2; -} - -.wrapper { - border: 4px solid transparent; - - &.highlight { - border-color: var(--v-primary-base); - } -} - -.mq-math-mode { - padding: 4px 4px 2px 0; - margin: 4px; - font-family: Symbola; - color: #333333; - cursor: pointer; -} - -.editing .mq-math-mode { - background-color: #f9f2f4; - border-radius: 4px; - box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), - 0 1px 3px 0 rgba(0, 0, 0, 0.12); -} - -// TODO (when updating to new frontend files structure) -// find better location for following styles that -// are supposed to be common to all editable fields -.mq-editable-field { - border: 0; - - .mq-to, - .mq-from, - .mq-sup, - .mq-sup-inner, - .mq-sub, - .mq-numerator, - .mq-denominator { - padding-right: 1px; - padding-left: 1px; - border: 1px solid gray; - } - - .mq-int .mq-sup { - border: 0; - } -} - -.math-field * { - line-height: 1 !important; - white-space: nowrap !important; -} - -:host { - margin-right: -0.2em !important; - margin-left: -0.2em !important; -} diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.less b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.less deleted file mode 100644 index 11392b3ec7..0000000000 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.less +++ /dev/null @@ -1,82 +0,0 @@ -@import '~vuetify/dist/vuetify.min.css'; -// stylelint-disable scss/at-import-partial-extension -@import '~shared/styles/main.less'; -// stylelint-enable - -@resizer-size: 16px; - -img { - max-width: 100%; - height: auto; - /* stylelint-disable-next-line custom-property-pattern */ - border: 1px solid var(--v-greyBorder-base); - object-fit: cover; -} - -.dragging { - img { - pointer-events: none; - user-select: none; - } -} - -.resizing { - user-select: none; - - * { - user-select: none; - } - - img { - border: 2px solid var(--v-grey-darken4); - } -} - -.resizer { - position: absolute; - right: -@resizer-size / 2; - bottom: 2px; - width: @resizer-size; - height: @resizer-size; - cursor: se-resize; - user-select: none; - background-color: white; - border: 2px solid var(--v-grey-darken4); - border-radius: @resizer-size; -} - -.edit-options { - top: 4px; - right: 4px; - user-select: none; - /* stylelint-disable-next-line custom-property-pattern */ - background-color: var(--v-backgroundColor--base); - opacity: 0; - - // TUI will automatically move cursor inside button, - // so don't allow clicking on elements inside the button - /deep/ * { - pointer-events: none; - } - - /deep/ .v-btn__content { - height: min-content; - } - - i { - font-style: normal; - } -} - -.image-field { - position: relative; - display: inline-block; - width: max-content; - max-width: 95%; - vertical-align: middle; - - &:hover:not(.resizing) .edit-options, - .edit-options:focus { - opacity: 1; - } -} From a1eb10dc1b51a37c442a533be77bb6e6b343736e Mon Sep 17 00:00:00 2001 From: adibmbrk Date: Sun, 26 Jan 2025 09:01:25 +0000 Subject: [PATCH 02/14] Convert to scss files and refactor imports --- .../contentcuration/frontend/shared/app.js | 2 +- .../frontend/shared/styles/main.scss | 100 ++++++++++++++++++ .../plugins/formulas/MarkdownFormulaField.vue | 2 +- .../plugins/formulas/style.scss | 68 ++++++++++++ .../image-upload/MarkdownImageField.vue | 2 +- .../plugins/image-upload/style.scss | 80 ++++++++++++++ 6 files changed, 251 insertions(+), 3 deletions(-) create mode 100644 contentcuration/contentcuration/frontend/shared/styles/main.scss create mode 100644 contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.scss create mode 100644 contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss diff --git a/contentcuration/contentcuration/frontend/shared/app.js b/contentcuration/contentcuration/frontend/shared/app.js index d650a1d061..89c6467872 100644 --- a/contentcuration/contentcuration/frontend/shared/app.js +++ b/contentcuration/contentcuration/frontend/shared/app.js @@ -118,7 +118,7 @@ import { theme, icons } from 'shared/vuetify'; import { i18nSetup } from 'shared/i18n'; import './styles/vuetify.scss'; -import 'shared/styles/main.less'; +import 'shared/styles/main.scss'; import Base from 'shared/Base.vue'; import urls from 'shared/urls'; import ActionLink from 'shared/views/ActionLink'; diff --git a/contentcuration/contentcuration/frontend/shared/styles/main.scss b/contentcuration/contentcuration/frontend/shared/styles/main.scss new file mode 100644 index 0000000000..e13fd99350 --- /dev/null +++ b/contentcuration/contentcuration/frontend/shared/styles/main.scss @@ -0,0 +1,100 @@ +@import '~material-icons/iconfont/material-icons.css'; + +@font-face { + font-family: 'Noto Sans'; + src: url('../fonts/NotoSans-Regular.ttf') format('truetype'); +} + +html { + overflow-y: auto !important; + + .title, + .headline, + .display, + .display-1, + .subheading, + .v-toolbar__title, + .v-chip__content { + font-family: 'Noto Sans' !important; + } + + .v-btn--flat, + .v-tabs__item { + font-weight: bold; + cursor: pointer; + } + + .text-truncate { + line-height: unset !important; + } +} + +body { + font-family: 'Noto Sans', Verdana, sans-serif; + letter-spacing: 0.03em; + // stylelint-disable-next-line custom-property-pattern + background-color: var(--v-backgroundColor-base); + + * { + font-family: 'Noto Sans'; + } + + .v-card { + outline-color: #8dc5b6; + } + + .v-tooltip__content { + max-width: 200px; + text-align: center; + } + + .button:focus-visible, + .v-btn:focus-visible { + outline: 2px solid var(--v-secondary-base) !important; + } +} + +// RTL-related rules + +/*! rtl:begin:ignore */ +[dir='rtl'] { + .v-label { + transform-origin: top right; + } + + .grid-item div { + text-align: right; + } + + .rtl-flip { + transform: scaleX(-1); + } + + .v-speed-dial--left { + right: auto; + left: 16px; + } + + .v-input { + text-align: right; + } +} +/*! rtl:end:ignore */ + +// Overriding default Vuetify theme +.theme--light { + .v-sheet, + .v-card, + .v-list__tile, + &.application { + color: var(--v-text-base); + } + + // Removes a weird default Vuetify style + // applying background color to links + // Due to name collisions with tokens + .text, + .link { + background-color: transparent !important; + } +} diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/MarkdownFormulaField.vue b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/MarkdownFormulaField.vue index bb0624fcec..100ac05945 100644 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/MarkdownFormulaField.vue +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/MarkdownFormulaField.vue @@ -13,7 +13,7 @@ // vue-custom-element can't use SFC styles, so we load our styles directly, // to be passed in when we register this component as a custom element - import css from '!css-loader!less-loader!./style.less'; + import css from '!css-loader!sass-loader!./style.scss'; const MarkdownFormulaField = { name: 'MarkdownFormulaField', diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.scss b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.scss new file mode 100644 index 0000000000..d0048fa84a --- /dev/null +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.scss @@ -0,0 +1,68 @@ +@import '../../mathquill/mathquill.css'; + +.uploading { + cursor: progress; +} + +.formulas-menu, +.images-menu { + z-index: 2; +} + +.wrapper { + border: 4px solid transparent; + + &.highlight { + border-color: var(--v-primary-base); + } +} + +.mq-math-mode { + padding: 4px 4px 2px 0; + margin: 4px; + font-family: Symbola; + color: #333333; + cursor: pointer; +} + +.editing .mq-math-mode { + background-color: #f9f2f4; + border-radius: 4px; + box-shadow: + 0 2px 1px -1px rgba(0, 0, 0, 0.2), + 0 1px 1px 0 rgba(0, 0, 0, 0.14), + 0 1px 3px 0 rgba(0, 0, 0, 0.12); +} + +// TODO (when updating to new frontend files structure) +// find better location for following styles that +// are supposed to be common to all editable fields +.mq-editable-field { + border: 0; + + .mq-to, + .mq-from, + .mq-sup, + .mq-sup-inner, + .mq-sub, + .mq-numerator, + .mq-denominator { + padding-right: 1px; + padding-left: 1px; + border: 1px solid gray; + } + + .mq-int .mq-sup { + border: 0; + } +} + +.math-field * { + line-height: 1 !important; + white-space: nowrap !important; +} + +:host { + margin-right: -0.2em !important; + margin-left: -0.2em !important; +} diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/MarkdownImageField.vue b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/MarkdownImageField.vue index 096531cbe8..4045653126 100644 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/MarkdownImageField.vue +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/MarkdownImageField.vue @@ -64,7 +64,7 @@ // vue-custom-element can't use SFC styles, so we load our styles directly, // to be passed in when we register this component as a custom element - import css from '!css-loader!less-loader!./style.less'; + import css from '!css-loader!sass-loader!./style.scss'; const MarkdownImageField = { name: 'MarkdownImageField', diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss new file mode 100644 index 0000000000..9cea4ca8c3 --- /dev/null +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss @@ -0,0 +1,80 @@ +@import '~vuetify/dist/vuetify.min.css'; +// stylelint-disable scss/at-import-partial-extension + +$resizer-size: 16px; + +img { + max-width: 100%; + height: auto; + /* stylelint-disable-next-line custom-property-pattern */ + border: 1px solid var(--v-greyBorder-base); + object-fit: cover; +} + +.dragging { + img { + pointer-events: none; + user-select: none; + } +} + +.resizing { + user-select: none; + + * { + user-select: none; + } + + img { + border: 2px solid var(--v-grey-darken4); + } +} + +.resizer { + position: absolute; + right: calc(-#{$resizer-size} / 2); + bottom: 2px; + width: $resizer-size; + height: $resizer-size; + cursor: se-resize; + user-select: none; + background-color: white; + border: 2px solid var(--v-grey-darken4); + border-radius: $resizer-size; +} + +.edit-options { + top: 4px; + right: 4px; + user-select: none; + /* stylelint-disable-next-line custom-property-pattern */ + background-color: var(--v-backgroundColor--base); + opacity: 0; + + // TUI will automatically move cursor inside button, + // so don't allow clicking on elements inside the button + ::v-deep * { + pointer-events: none; + } + + ::v-deep .v-btn__content { + height: min-content; + } + + i { + font-style: normal; + } +} + +.image-field { + position: relative; + display: inline-block; + width: max-content; + max-width: 95%; + vertical-align: middle; + + &:hover:not(.resizing) .edit-options, + .edit-options:focus { + opacity: 1; + } +} From 42a071084748c042ba37a2b60961e373002d13f8 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Mon, 27 Jan 2025 21:01:47 +0000 Subject: [PATCH 03/14] [pre-commit.ci lite] apply automatic fixes --- .../contentcuration/frontend/shared/styles/main.scss | 1 + .../shared/views/MarkdownEditor/plugins/formulas/style.scss | 4 +--- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/contentcuration/contentcuration/frontend/shared/styles/main.scss b/contentcuration/contentcuration/frontend/shared/styles/main.scss index e13fd99350..777a8b3668 100644 --- a/contentcuration/contentcuration/frontend/shared/styles/main.scss +++ b/contentcuration/contentcuration/frontend/shared/styles/main.scss @@ -79,6 +79,7 @@ body { text-align: right; } } + /*! rtl:end:ignore */ // Overriding default Vuetify theme diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.scss b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.scss index d0048fa84a..fe30f853dd 100644 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.scss +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/formulas/style.scss @@ -28,9 +28,7 @@ .editing .mq-math-mode { background-color: #f9f2f4; border-radius: 4px; - box-shadow: - 0 2px 1px -1px rgba(0, 0, 0, 0.2), - 0 1px 1px 0 rgba(0, 0, 0, 0.14), + box-shadow: 0 2px 1px -1px rgba(0, 0, 0, 0.2), 0 1px 1px 0 rgba(0, 0, 0, 0.14), 0 1px 3px 0 rgba(0, 0, 0, 0.12); } From d2574e000ab2cf00fd40dd1140d5e6549960749e Mon Sep 17 00:00:00 2001 From: adibmbrk Date: Tue, 28 Jan 2025 21:55:49 +0000 Subject: [PATCH 04/14] Remove usage of `::v-deep` --- .../views/MarkdownEditor/plugins/image-upload/style.scss | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss index 9cea4ca8c3..1c7a80af79 100644 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss @@ -53,11 +53,11 @@ img { // TUI will automatically move cursor inside button, // so don't allow clicking on elements inside the button - ::v-deep * { + * { pointer-events: none; } - ::v-deep .v-btn__content { + .v-btn__content { height: min-content; } From 6891b6f9a72e0e85f38e703893d88adc835ca395 Mon Sep 17 00:00:00 2001 From: adibmbrk Date: Sat, 1 Feb 2025 17:59:30 +0000 Subject: [PATCH 05/14] Migrate from less to scss --- .../frontend/accounts/pages/Create.vue | 14 ++++++------- .../frontend/accounts/pages/Main.vue | 20 +++++++++++-------- .../RequestNewActivationLink.vue | 2 +- .../pages/resetPassword/ForgotPassword.vue | 2 +- .../pages/resetPassword/ResetPassword.vue | 2 +- 5 files changed, 21 insertions(+), 19 deletions(-) diff --git a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue index e4e28d6d08..68929ef55c 100644 --- a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue +++ b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue @@ -562,15 +562,13 @@ - diff --git a/contentcuration/contentcuration/frontend/administration/components/ConfirmationDialog.vue b/contentcuration/contentcuration/frontend/administration/components/ConfirmationDialog.vue index ca87915d68..ee5023d180 100644 --- a/contentcuration/contentcuration/frontend/administration/components/ConfirmationDialog.vue +++ b/contentcuration/contentcuration/frontend/administration/components/ConfirmationDialog.vue @@ -62,5 +62,5 @@ - diff --git a/contentcuration/contentcuration/frontend/administration/pages/Channels/ChannelActionsDropdown.vue b/contentcuration/contentcuration/frontend/administration/pages/Channels/ChannelActionsDropdown.vue index 7a871a42a5..ea030b9d5d 100644 --- a/contentcuration/contentcuration/frontend/administration/pages/Channels/ChannelActionsDropdown.vue +++ b/contentcuration/contentcuration/frontend/administration/pages/Channels/ChannelActionsDropdown.vue @@ -225,5 +225,5 @@ - diff --git a/contentcuration/contentcuration/frontend/administration/pages/Users/UserActionsDropdown.vue b/contentcuration/contentcuration/frontend/administration/pages/Users/UserActionsDropdown.vue index 3331542803..2f6967c644 100644 --- a/contentcuration/contentcuration/frontend/administration/pages/Users/UserActionsDropdown.vue +++ b/contentcuration/contentcuration/frontend/administration/pages/Users/UserActionsDropdown.vue @@ -168,5 +168,5 @@ - diff --git a/contentcuration/contentcuration/frontend/administration/pages/Users/UserDetails.vue b/contentcuration/contentcuration/frontend/administration/pages/Users/UserDetails.vue index fbe0c4bf46..0cfe28208f 100644 --- a/contentcuration/contentcuration/frontend/administration/pages/Users/UserDetails.vue +++ b/contentcuration/contentcuration/frontend/administration/pages/Users/UserDetails.vue @@ -400,7 +400,7 @@ - diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/HintsEditor/HintsEditor.vue b/contentcuration/contentcuration/frontend/channelEdit/components/HintsEditor/HintsEditor.vue index 6decf999b1..1e3dba9add 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/HintsEditor/HintsEditor.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/HintsEditor/HintsEditor.vue @@ -295,7 +295,7 @@ - diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditList.vue b/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditList.vue index a18b45000d..8b41200a3f 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditList.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/edit/EditList.vue @@ -98,7 +98,7 @@ - diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/move/NewTopicModal.vue b/contentcuration/contentcuration/frontend/channelEdit/components/move/NewTopicModal.vue index cf701fd03d..3879541975 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/move/NewTopicModal.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/move/NewTopicModal.vue @@ -83,5 +83,5 @@ - diff --git a/contentcuration/contentcuration/frontend/channelEdit/pages/StagingTreePage/index.vue b/contentcuration/contentcuration/frontend/channelEdit/pages/StagingTreePage/index.vue index 5b58af9e62..e81e5e70d6 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/pages/StagingTreePage/index.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/pages/StagingTreePage/index.vue @@ -571,7 +571,7 @@ - + diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/BrowsingCard.vue b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/BrowsingCard.vue index d5c1105995..4e55199191 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/BrowsingCard.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/BrowsingCard.vue @@ -193,7 +193,7 @@ - + diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ImportFromChannelsModal.vue b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ImportFromChannelsModal.vue index e085b6fe7d..cf44d06f05 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ImportFromChannelsModal.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/ImportFromChannels/ImportFromChannelsModal.vue @@ -274,7 +274,7 @@ - + diff --git a/contentcuration/contentcuration/frontend/channelEdit/views/NodePanel.vue b/contentcuration/contentcuration/frontend/channelEdit/views/NodePanel.vue index 814ae683d9..0c25fe1315 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/views/NodePanel.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/views/NodePanel.vue @@ -202,7 +202,7 @@ - diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterBar.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterBar.vue index 6fb71d6b64..dc6bdbd80c 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterBar.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/CatalogFilterBar.vue @@ -115,7 +115,7 @@ }; - diff --git a/contentcuration/contentcuration/frontend/channelList/views/ChannelListIndex.vue b/contentcuration/contentcuration/frontend/channelList/views/ChannelListIndex.vue index 4dee071859..af387cc79a 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/ChannelListIndex.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/ChannelListIndex.vue @@ -267,7 +267,7 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/Formula.vue b/contentcuration/contentcuration/frontend/shared/views/Formula.vue index fb8780ee42..769eb0a60f 100644 --- a/contentcuration/contentcuration/frontend/shared/views/Formula.vue +++ b/contentcuration/contentcuration/frontend/shared/views/Formula.vue @@ -66,7 +66,7 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownEditor/FormulasMenu/FormulasMenu.vue b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownEditor/FormulasMenu/FormulasMenu.vue index 9499dcd4e0..b7d86147ec 100644 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownEditor/FormulasMenu/FormulasMenu.vue +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownEditor/FormulasMenu/FormulasMenu.vue @@ -179,7 +179,7 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownViewer/MarkdownViewer.vue b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownViewer/MarkdownViewer.vue index 2769e88cd5..63b0b6470e 100644 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownViewer/MarkdownViewer.vue +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownViewer/MarkdownViewer.vue @@ -77,7 +77,7 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/Menu.vue b/contentcuration/contentcuration/frontend/shared/views/Menu.vue index 6b433ed8c8..c86b06d164 100644 --- a/contentcuration/contentcuration/frontend/shared/views/Menu.vue +++ b/contentcuration/contentcuration/frontend/shared/views/Menu.vue @@ -33,6 +33,6 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/PageContainer.vue b/contentcuration/contentcuration/frontend/shared/views/PageContainer.vue index 72604063e8..94e8dfdba3 100644 --- a/contentcuration/contentcuration/frontend/shared/views/PageContainer.vue +++ b/contentcuration/contentcuration/frontend/shared/views/PageContainer.vue @@ -17,7 +17,7 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/VIconWrapper.vue b/contentcuration/contentcuration/frontend/shared/views/VIconWrapper.vue index adcffb8ef3..366c8a4932 100644 --- a/contentcuration/contentcuration/frontend/shared/views/VIconWrapper.vue +++ b/contentcuration/contentcuration/frontend/shared/views/VIconWrapper.vue @@ -34,7 +34,7 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/contentNodeFields/CategoryOptions.vue b/contentcuration/contentcuration/frontend/shared/views/contentNodeFields/CategoryOptions.vue index f6170a8b9a..30bd844a67 100644 --- a/contentcuration/contentcuration/frontend/shared/views/contentNodeFields/CategoryOptions.vue +++ b/contentcuration/contentcuration/frontend/shared/views/contentNodeFields/CategoryOptions.vue @@ -272,7 +272,7 @@ }; - diff --git a/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableItem.vue b/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableItem.vue index 17f0abe8d7..4050723e39 100644 --- a/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableItem.vue +++ b/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableItem.vue @@ -9,5 +9,5 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/draggable/DraggablePlaceholder.vue b/contentcuration/contentcuration/frontend/shared/views/draggable/DraggablePlaceholder.vue index da091e485c..8dbfbf3085 100644 --- a/contentcuration/contentcuration/frontend/shared/views/draggable/DraggablePlaceholder.vue +++ b/contentcuration/contentcuration/frontend/shared/views/draggable/DraggablePlaceholder.vue @@ -43,7 +43,7 @@ - + diff --git a/contentcuration/contentcuration/frontend/shared/views/errors/ChannelNotFoundError.vue b/contentcuration/contentcuration/frontend/shared/views/errors/ChannelNotFoundError.vue index 3852510005..b6115d20ac 100644 --- a/contentcuration/contentcuration/frontend/shared/views/errors/ChannelNotFoundError.vue +++ b/contentcuration/contentcuration/frontend/shared/views/errors/ChannelNotFoundError.vue @@ -43,4 +43,4 @@ - + diff --git a/contentcuration/contentcuration/frontend/shared/views/errors/GenericError.vue b/contentcuration/contentcuration/frontend/shared/views/errors/GenericError.vue index d76af80b6e..57e6c8e0dc 100644 --- a/contentcuration/contentcuration/frontend/shared/views/errors/GenericError.vue +++ b/contentcuration/contentcuration/frontend/shared/views/errors/GenericError.vue @@ -80,4 +80,4 @@ - + diff --git a/contentcuration/contentcuration/frontend/shared/views/errors/PermissionsError.vue b/contentcuration/contentcuration/frontend/shared/views/errors/PermissionsError.vue index 1dbde60a97..52df9da589 100644 --- a/contentcuration/contentcuration/frontend/shared/views/errors/PermissionsError.vue +++ b/contentcuration/contentcuration/frontend/shared/views/errors/PermissionsError.vue @@ -44,4 +44,4 @@ - + diff --git a/contentcuration/contentcuration/frontend/shared/views/errors/ReportErrorModal.vue b/contentcuration/contentcuration/frontend/shared/views/errors/ReportErrorModal.vue index b82e1024a2..b117bfb910 100644 --- a/contentcuration/contentcuration/frontend/shared/views/errors/ReportErrorModal.vue +++ b/contentcuration/contentcuration/frontend/shared/views/errors/ReportErrorModal.vue @@ -96,7 +96,7 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/files/FileStorage.vue b/contentcuration/contentcuration/frontend/shared/views/files/FileStorage.vue index 61e1e8c37e..17c968a335 100644 --- a/contentcuration/contentcuration/frontend/shared/views/files/FileStorage.vue +++ b/contentcuration/contentcuration/frontend/shared/views/files/FileStorage.vue @@ -102,7 +102,7 @@ - From b543a789d64df18b2de6975e198b6d2f6024cc22 Mon Sep 17 00:00:00 2001 From: adibmbrk Date: Tue, 11 Feb 2025 18:25:18 +0000 Subject: [PATCH 08/14] Migrate from less to scss --- .stylelintrc.js | 10 +++++++- .../pages/Users/EmailUsersDialog.vue | 4 ++-- .../components/AddRelatedResourcesModal.vue | 4 ++-- .../AnswersEditor/AnswersEditor.vue | 18 +++++++------- .../AssessmentEditor/AssessmentEditor.vue | 2 +- .../AssessmentItemEditor.vue | 2 +- .../AssessmentItemPreview.vue | 8 +++---- .../components/AssessmentItemToolbar.vue | 2 +- .../components/Clipboard/Channel.vue | 11 +++++---- .../components/Clipboard/ContentNode.vue | 14 +++++------ .../components/Clipboard/index.vue | 14 +++++------ .../components/ContentNodeEditListItem.vue | 4 ++-- .../components/ContentNodeListItem/index.vue | 18 +++++++------- .../components/edit/EditListItem.vue | 4 ++-- .../ImportFromChannels/SearchFilters.vue | 2 +- .../channelEdit/views/files/FileUpload.vue | 6 ++--- .../views/files/FileUploadDefault.vue | 4 ++-- .../channelEdit/views/trash/TrashModal.vue | 2 +- .../frontend/settings/pages/Storage/index.vue | 10 ++++---- .../frontend/shared/views/ActionLink.vue | 2 +- .../frontend/shared/views/Banner.vue | 2 +- .../frontend/shared/views/BottomBar.vue | 2 +- .../views/ContentNodeLearningActivityIcon.vue | 2 +- .../frontend/shared/views/InfoModal.vue | 4 ++-- .../frontend/shared/views/LazyListGroup.vue | 18 +++++++------- .../views/draggable/DraggableCollection.vue | 2 +- .../views/draggable/DraggableHandle.vue | 2 +- .../views/draggable/DraggableRegion.vue | 2 +- .../frontend/shared/views/errors/AppError.vue | 2 +- .../shared/views/errors/PageNotFoundError.vue | 2 +- .../shared/views/files/FileStatus.vue | 2 +- .../frontend/shared/views/files/Thumbnail.vue | 24 +++++++++---------- .../shared/views/form/CountryField.vue | 4 ++-- .../shared/views/form/MultiSelect.vue | 6 ++--- .../shared/views/form/PasswordField.vue | 2 +- .../frontend/shared/views/form/TextArea.vue | 2 +- 36 files changed, 112 insertions(+), 107 deletions(-) diff --git a/.stylelintrc.js b/.stylelintrc.js index 6ac1911a5a..b7b5451a5e 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -10,6 +10,14 @@ module.exports = { 'selector-max-id': null, // This would require a major refactor 'at-rule-no-unknown': null, // we're using LESS 'scss/at-rule-no-unknown': null, // we're using LESS - 'csstree/validator': null // this triggers issues with unknown at rules too. + 'csstree/validator': null, // this triggers issues with unknown at rules too. + 'selector-pseudo-class-no-unknown': [ + true, + { + // In Vue 2.6 and later, `::v-deep` is used for deep selectors. + // This rule allows `::v-deep` to prevent linting errors. + ignorePseudoClasses: ['v-deep'], + } + ] }, }; diff --git a/contentcuration/contentcuration/frontend/administration/pages/Users/EmailUsersDialog.vue b/contentcuration/contentcuration/frontend/administration/pages/Users/EmailUsersDialog.vue index 433ede42c3..3510b8ce30 100644 --- a/contentcuration/contentcuration/frontend/administration/pages/Users/EmailUsersDialog.vue +++ b/contentcuration/contentcuration/frontend/administration/pages/Users/EmailUsersDialog.vue @@ -248,9 +248,9 @@ - + diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/Clipboard/ContentNode.vue b/contentcuration/contentcuration/frontend/channelEdit/components/Clipboard/ContentNode.vue index f0795c04dc..77ba98f670 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/Clipboard/ContentNode.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/Clipboard/ContentNode.vue @@ -244,7 +244,7 @@ }; - diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeEditListItem.vue b/contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeEditListItem.vue index 1e4d0f3c7d..d47852d957 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeEditListItem.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/ContentNodeEditListItem.vue @@ -307,7 +307,7 @@ - \ No newline at end of file diff --git a/contentcuration/contentcuration/frontend/shared/views/ActionLink.vue b/contentcuration/contentcuration/frontend/shared/views/ActionLink.vue index 16afe626db..0077f2dc97 100644 --- a/contentcuration/contentcuration/frontend/shared/views/ActionLink.vue +++ b/contentcuration/contentcuration/frontend/shared/views/ActionLink.vue @@ -60,7 +60,7 @@ }; - diff --git a/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableCollection.vue b/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableCollection.vue index c3ccf70628..1e93732d76 100644 --- a/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableCollection.vue +++ b/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableCollection.vue @@ -9,5 +9,5 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableHandle.vue b/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableHandle.vue index 5370009efb..5d10e26289 100644 --- a/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableHandle.vue +++ b/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableHandle.vue @@ -9,5 +9,5 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableRegion.vue b/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableRegion.vue index 0041b90892..c66f5831ef 100644 --- a/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableRegion.vue +++ b/contentcuration/contentcuration/frontend/shared/views/draggable/DraggableRegion.vue @@ -9,5 +9,5 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/errors/AppError.vue b/contentcuration/contentcuration/frontend/shared/views/errors/AppError.vue index 409359f11e..c49e1f6356 100644 --- a/contentcuration/contentcuration/frontend/shared/views/errors/AppError.vue +++ b/contentcuration/contentcuration/frontend/shared/views/errors/AppError.vue @@ -30,7 +30,7 @@ - + diff --git a/contentcuration/contentcuration/frontend/shared/views/files/FileStatus.vue b/contentcuration/contentcuration/frontend/shared/views/files/FileStatus.vue index f277c54d2e..2962e27edd 100644 --- a/contentcuration/contentcuration/frontend/shared/views/files/FileStatus.vue +++ b/contentcuration/contentcuration/frontend/shared/views/files/FileStatus.vue @@ -62,7 +62,7 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/form/TextArea.vue b/contentcuration/contentcuration/frontend/shared/views/form/TextArea.vue index 1db05d1b9d..cf6c27b040 100644 --- a/contentcuration/contentcuration/frontend/shared/views/form/TextArea.vue +++ b/contentcuration/contentcuration/frontend/shared/views/form/TextArea.vue @@ -68,6 +68,6 @@ - From f1d03bf947f3ff474e74f21648e657f762503d39 Mon Sep 17 00:00:00 2001 From: adibmbrk Date: Tue, 11 Feb 2025 19:43:19 +0000 Subject: [PATCH 09/14] Migrate less to scss --- .../components/StudioTree/StudioTree.vue | 6 ++-- .../components/edit/DetailsTabView.vue | 30 +++++++++---------- .../channelEdit/components/edit/EditModal.vue | 6 ++-- .../channelEdit/components/move/MoveModal.vue | 6 ++-- .../pages/StagingTreePage/DiffTable.vue | 6 ++-- .../ReviewSelectionsPage.vue | 4 +-- .../SearchOrBrowseWindow.vue | 4 +-- .../channelEdit/views/TreeView/index.vue | 10 +++---- .../views/files/ContentRenderer.vue | 12 ++++---- .../views/files/FileUploadItem.vue | 4 +-- .../supplementaryLists/SubtitlesList.vue | 4 +-- .../supplementaryLists/SupplementaryList.vue | 4 +-- .../files/thumbnails/ContentNodeThumbnail.vue | 4 +-- .../views/sync/SyncResourcesModal.vue | 6 ++-- .../views/Channel/CatalogFilters.vue | 8 ++--- .../channelList/views/Channel/ChannelItem.vue | 4 +-- .../Channel/components/LanguageFilter.vue | 7 ++--- .../channelList/views/ChannelListAppError.vue | 2 +- .../views/ChannelSet/ChannelSetList.vue | 4 +-- .../shared/layouts/ImmersiveModalLayout.vue | 2 +- .../frontend/shared/views/Alert.vue | 4 +-- .../frontend/shared/views/AppBar.vue | 4 +-- .../frontend/shared/views/Breadcrumbs.vue | 4 +-- .../frontend/shared/views/ContentNodeIcon.vue | 4 +-- .../frontend/shared/views/CopyToken.vue | 6 ++-- .../shared/views/ErrorList/ErrorList.vue | 4 +-- .../frontend/shared/views/ExpandableList.vue | 4 +-- .../frontend/shared/views/FullscreenModal.vue | 6 ++-- .../frontend/shared/views/HelpTooltip.vue | 4 +-- .../shared/views/LanguageDropdown.vue | 6 ++-- .../MarkdownEditor/MarkdownEditor.vue | 4 +-- .../image-upload/MarkdownImageField.vue | 4 +-- .../frontend/shared/views/MessageDialog.vue | 4 +-- .../views/ResizableNavigationDrawer.vue | 8 ++--- .../frontend/shared/views/Sandbox.vue | 2 +- .../frontend/shared/views/ToggleText.vue | 2 +- .../frontend/shared/views/ToolBar.vue | 4 +-- .../shared/views/channel/ChannelModal.vue | 2 +- .../shared/views/channel/ChannelSharing.vue | 2 +- .../shared/views/channel/ChannelThumbnail.vue | 4 +-- .../CompletionOptions/ActivityDuration.vue | 2 +- .../CompletionOptions/MasteryCriteriaGoal.vue | 6 ++-- .../MasteryCriteriaMofNFields.vue | 6 ++-- .../LearningActivityOptions.vue | 2 +- .../ResourcesNeededOptions.vue | 2 +- .../frontend/shared/views/details/Details.vue | 6 ++-- .../shared/views/details/DetailsRow.vue | 2 +- .../shared/views/files/FileStatusText.vue | 4 +-- .../shared/views/files/ImageOnlyThumbnail.vue | 26 ++++++++-------- .../frontend/shared/views/form/Checkbox.vue | 4 +-- 50 files changed, 136 insertions(+), 139 deletions(-) diff --git a/contentcuration/contentcuration/frontend/channelEdit/components/StudioTree/StudioTree.vue b/contentcuration/contentcuration/frontend/channelEdit/components/StudioTree/StudioTree.vue index a90a5f878c..f045a48a74 100644 --- a/contentcuration/contentcuration/frontend/channelEdit/components/StudioTree/StudioTree.vue +++ b/contentcuration/contentcuration/frontend/channelEdit/components/StudioTree/StudioTree.vue @@ -412,9 +412,9 @@ - + \ No newline at end of file diff --git a/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelItem.vue b/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelItem.vue index ba98f77283..ae440d54ab 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelItem.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/Channel/ChannelItem.vue @@ -383,7 +383,7 @@ - + diff --git a/contentcuration/contentcuration/frontend/channelList/views/ChannelSet/ChannelSetList.vue b/contentcuration/contentcuration/frontend/channelList/views/ChannelSet/ChannelSetList.vue index ea771b5241..66d6bf5c62 100644 --- a/contentcuration/contentcuration/frontend/channelList/views/ChannelSet/ChannelSetList.vue +++ b/contentcuration/contentcuration/frontend/channelList/views/ChannelSet/ChannelSetList.vue @@ -140,13 +140,13 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/MessageDialog.vue b/contentcuration/contentcuration/frontend/shared/views/MessageDialog.vue index 9e758cf541..f7fc3d6ddb 100644 --- a/contentcuration/contentcuration/frontend/shared/views/MessageDialog.vue +++ b/contentcuration/contentcuration/frontend/shared/views/MessageDialog.vue @@ -59,13 +59,13 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/ToggleText.vue b/contentcuration/contentcuration/frontend/shared/views/ToggleText.vue index aef5a6cbb3..380da0f66d 100644 --- a/contentcuration/contentcuration/frontend/shared/views/ToggleText.vue +++ b/contentcuration/contentcuration/frontend/shared/views/ToggleText.vue @@ -93,7 +93,7 @@ - diff --git a/contentcuration/contentcuration/frontend/shared/views/contentNodeFields/ResourcesNeededOptions.vue b/contentcuration/contentcuration/frontend/shared/views/contentNodeFields/ResourcesNeededOptions.vue index 8585ed7911..2752c8e9b0 100644 --- a/contentcuration/contentcuration/frontend/shared/views/contentNodeFields/ResourcesNeededOptions.vue +++ b/contentcuration/contentcuration/frontend/shared/views/contentNodeFields/ResourcesNeededOptions.vue @@ -81,6 +81,6 @@ }; - diff --git a/contentcuration/contentcuration/frontend/shared/views/details/Details.vue b/contentcuration/contentcuration/frontend/shared/views/details/Details.vue index 03ace0c8fd..efab758c0f 100644 --- a/contentcuration/contentcuration/frontend/shared/views/details/Details.vue +++ b/contentcuration/contentcuration/frontend/shared/views/details/Details.vue @@ -549,9 +549,9 @@ - From d0f244eea3d2ccc4f4f7573f20a98fd3813e6e8e Mon Sep 17 00:00:00 2001 From: adibmbrk Date: Tue, 11 Feb 2025 19:57:13 +0000 Subject: [PATCH 11/14] Fix lint issues --- .stylelintrc.js | 4 +- .../frontend/shared/views/LazyListGroup.vue | 2 +- .../MarkdownEditor/ImagesMenu/ImagesMenu.vue | 88 +++++++++---------- 3 files changed, 47 insertions(+), 47 deletions(-) diff --git a/.stylelintrc.js b/.stylelintrc.js index b7b5451a5e..0b9f00d378 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -11,12 +11,12 @@ module.exports = { 'at-rule-no-unknown': null, // we're using LESS 'scss/at-rule-no-unknown': null, // we're using LESS 'csstree/validator': null, // this triggers issues with unknown at rules too. - 'selector-pseudo-class-no-unknown': [ + 'selector-pseudo-element-no-unknown': [ true, { // In Vue 2.6 and later, `::v-deep` is used for deep selectors. // This rule allows `::v-deep` to prevent linting errors. - ignorePseudoClasses: ['v-deep'], + ignorePseudoElements: ['v-deep'], } ] }, diff --git a/contentcuration/contentcuration/frontend/shared/views/LazyListGroup.vue b/contentcuration/contentcuration/frontend/shared/views/LazyListGroup.vue index fed6b82d09..761d0f611c 100644 --- a/contentcuration/contentcuration/frontend/shared/views/LazyListGroup.vue +++ b/contentcuration/contentcuration/frontend/shared/views/LazyListGroup.vue @@ -120,5 +120,5 @@ width: $icon-width; padding: 0 $icon-padding; } - + diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownEditor/ImagesMenu/ImagesMenu.vue b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownEditor/ImagesMenu/ImagesMenu.vue index 0f66355bc6..6129831cb5 100644 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownEditor/ImagesMenu/ImagesMenu.vue +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/MarkdownEditor/ImagesMenu/ImagesMenu.vue @@ -235,56 +235,56 @@ From a33d1059b2d039f9cdbd7baf6c54162134958a5d Mon Sep 17 00:00:00 2001 From: adibmbrk Date: Tue, 11 Feb 2025 19:57:47 +0000 Subject: [PATCH 12/14] Remove build tooling --- .pre-commit-config.yaml | 2 +- package.json | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 03ae517775..cf207da455 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -22,4 +22,4 @@ repos: description: This hook handles all frontend linting for Kolibri Studio entry: yarn run lint-frontend:format language: system - files: \.(js|vue|scss|less|css)$ + files: \.(js|vue|scss|css)$ diff --git a/package.json b/package.json index 85f82526a4..68c73b2aef 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "description": "Frontend build tools and development utilities for Kolibri Studio", "scripts": { "lint:py": "flake8 --exit-zero", - "lint-frontend": "kolibri-tools lint --pattern 'contentcuration/contentcuration/frontend/**/*.{js,vue,scss,less,css}' --ignore '**/dist/**,**/node_modules/**,**/static/**'", + "lint-frontend": "kolibri-tools lint --pattern 'contentcuration/contentcuration/frontend/**/*.{js,vue,scss,css}' --ignore '**/dist/**,**/node_modules/**,**/static/**'", "lint-frontend:format": "yarn run lint-frontend --write", "lint-frontend:watch": "yarn run lint-frontend --monitor", "lint-frontend:watch:format": "yarn run lint-frontend --monitor --write", @@ -115,8 +115,6 @@ "jest-environment-jsdom-sixteen": "^1.0.3", "jest-serializer-vue": "^3.1.0", "kolibri-tools": "0.16.0-dev.3", - "less": "^3.0.1", - "less-loader": "^11.1.3", "npm-run-all": "^4.1.3", "stylus": "^0.63.0", "stylus-loader": "^7.1.3", From f5803dd15f1c90da20bfb7382d12756cac9852c9 Mon Sep 17 00:00:00 2001 From: adibmbrk Date: Thu, 20 Feb 2025 03:06:21 +0000 Subject: [PATCH 13/14] Fix review suggestions --- .stylelintrc.js | 2 -- .../frontend/accounts/pages/Create.vue | 6 ++++-- .../contentcuration/frontend/accounts/pages/Main.vue | 2 +- .../administration/components/ClipboardChip.vue | 7 ------- .../administration/pages/Users/EmailUsersDialog.vue | 2 +- .../components/AnswersEditor/AnswersEditor.vue | 4 ++-- .../components/ContentNodeListItem/index.vue | 4 ++-- .../channelEdit/components/edit/DetailsTabView.vue | 2 -- .../frontend/settings/pages/Storage/index.vue | 6 +++--- .../contentcuration/frontend/shared/styles/main.scss | 4 ++-- .../frontend/shared/views/LazyListGroup.vue | 4 ++-- .../MarkdownEditor/plugins/image-upload/style.scss | 4 ++-- .../shared/views/ResizableNavigationDrawer.vue | 2 +- .../contentcuration/frontend/shared/views/Tabs.vue | 4 ++-- .../shared/views/files/ImageOnlyThumbnail.vue | 12 ++++++------ .../frontend/shared/views/files/Thumbnail.vue | 12 ++++++------ 16 files changed, 34 insertions(+), 43 deletions(-) diff --git a/.stylelintrc.js b/.stylelintrc.js index 0b9f00d378..88bbd1b144 100644 --- a/.stylelintrc.js +++ b/.stylelintrc.js @@ -8,8 +8,6 @@ module.exports = { * Inline comments explain why rule is ignored */ 'selector-max-id': null, // This would require a major refactor - 'at-rule-no-unknown': null, // we're using LESS - 'scss/at-rule-no-unknown': null, // we're using LESS 'csstree/validator': null, // this triggers issues with unknown at rules too. 'selector-pseudo-element-no-unknown': [ true, diff --git a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue index 8c4aa90ad2..1f6e4b53d5 100644 --- a/contentcuration/contentcuration/frontend/accounts/pages/Create.vue +++ b/contentcuration/contentcuration/frontend/accounts/pages/Create.vue @@ -568,7 +568,9 @@ margin-top: 8px !important; } - .policy-checkbox { + .policy-checkbox ::v-deep .v-input__slot { + margin-bottom: 4px !important; + label { color: var(--v-grey-darken1) !important; } @@ -592,7 +594,7 @@ display: flex; margin-left: 40px; - .span { + span { margin-left: 2px; font-size: 16px; } diff --git a/contentcuration/contentcuration/frontend/accounts/pages/Main.vue b/contentcuration/contentcuration/frontend/accounts/pages/Main.vue index 0867315f8b..bfcafae57e 100644 --- a/contentcuration/contentcuration/frontend/accounts/pages/Main.vue +++ b/contentcuration/contentcuration/frontend/accounts/pages/Main.vue @@ -210,7 +210,7 @@ .main { overflow: auto; - // stylelint-disable-next-line custom-property-pattern + /* stylelint-disable-next-line custom-property-pattern */ background-color: var(--v-backgroundColor-base); } diff --git a/contentcuration/contentcuration/frontend/administration/components/ClipboardChip.vue b/contentcuration/contentcuration/frontend/administration/components/ClipboardChip.vue index 02bbd301f7..59785dd642 100644 --- a/contentcuration/contentcuration/frontend/administration/components/ClipboardChip.vue +++ b/contentcuration/contentcuration/frontend/administration/components/ClipboardChip.vue @@ -67,11 +67,4 @@ text-overflow: ellipsis; } - .VBtn { - &:hover::before, - &:focus::before { - background-color: transparent; - } - } - diff --git a/contentcuration/contentcuration/frontend/administration/pages/Users/EmailUsersDialog.vue b/contentcuration/contentcuration/frontend/administration/pages/Users/EmailUsersDialog.vue index 3510b8ce30..242baecb8d 100644 --- a/contentcuration/contentcuration/frontend/administration/pages/Users/EmailUsersDialog.vue +++ b/contentcuration/contentcuration/frontend/administration/pages/Users/EmailUsersDialog.vue @@ -250,7 +250,7 @@ \ No newline at end of file diff --git a/contentcuration/contentcuration/frontend/shared/styles/main.scss b/contentcuration/contentcuration/frontend/shared/styles/main.scss index 777a8b3668..50000d3755 100644 --- a/contentcuration/contentcuration/frontend/shared/styles/main.scss +++ b/contentcuration/contentcuration/frontend/shared/styles/main.scss @@ -32,7 +32,7 @@ html { body { font-family: 'Noto Sans', Verdana, sans-serif; letter-spacing: 0.03em; - // stylelint-disable-next-line custom-property-pattern + /* stylelint-disable-next-line custom-property-pattern */ background-color: var(--v-backgroundColor-base); * { @@ -54,7 +54,7 @@ body { } } -// RTL-related rules +/* RTL-related rules */ /*! rtl:begin:ignore */ [dir='rtl'] { diff --git a/contentcuration/contentcuration/frontend/shared/views/LazyListGroup.vue b/contentcuration/contentcuration/frontend/shared/views/LazyListGroup.vue index 761d0f611c..61b977d820 100644 --- a/contentcuration/contentcuration/frontend/shared/views/LazyListGroup.vue +++ b/contentcuration/contentcuration/frontend/shared/views/LazyListGroup.vue @@ -82,7 +82,7 @@ $icon-padding: 16px; $icon-width: 25px; - $header-width: calc(2 * #{$icon-padding} + #{$icon-width}); + $header-width: calc(2 * $icon-padding + $icon-width); .list-group { box-sizing: border-box; @@ -108,7 +108,7 @@ } .header-content.has-icon { - width: calc(100% - #{$header-width}); + width: calc(100% - $header-width); } .list-group.open > .list-group-header .v-icon { diff --git a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss index 1c7a80af79..9cea4ca8c3 100644 --- a/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss +++ b/contentcuration/contentcuration/frontend/shared/views/MarkdownEditor/plugins/image-upload/style.scss @@ -53,11 +53,11 @@ img { // TUI will automatically move cursor inside button, // so don't allow clicking on elements inside the button - * { + ::v-deep * { pointer-events: none; } - .v-btn__content { + ::v-deep .v-btn__content { height: min-content; } diff --git a/contentcuration/contentcuration/frontend/shared/views/ResizableNavigationDrawer.vue b/contentcuration/contentcuration/frontend/shared/views/ResizableNavigationDrawer.vue index 39628b1c50..44cd24802d 100644 --- a/contentcuration/contentcuration/frontend/shared/views/ResizableNavigationDrawer.vue +++ b/contentcuration/contentcuration/frontend/shared/views/ResizableNavigationDrawer.vue @@ -204,7 +204,7 @@ transition: background 0.2s ease; &:hover, - .dragging& { + &.dragging { background: var(--v-secondary-base) !important; } } diff --git a/contentcuration/contentcuration/frontend/shared/views/Tabs.vue b/contentcuration/contentcuration/frontend/shared/views/Tabs.vue index 1678384eca..07ca152b6d 100644 --- a/contentcuration/contentcuration/frontend/shared/views/Tabs.vue +++ b/contentcuration/contentcuration/frontend/shared/views/Tabs.vue @@ -111,7 +111,7 @@ diff --git a/contentcuration/contentcuration/frontend/shared/views/files/ImageOnlyThumbnail.vue b/contentcuration/contentcuration/frontend/shared/views/files/ImageOnlyThumbnail.vue index da9b1e9f95..d9d0a09391 100644 --- a/contentcuration/contentcuration/frontend/shared/views/files/ImageOnlyThumbnail.vue +++ b/contentcuration/contentcuration/frontend/shared/views/files/ImageOnlyThumbnail.vue @@ -169,18 +169,18 @@ overflow: hidden; // Don't show alt text outside of img boundaries .caption + & { - height: calc(100% - #{$caption-height}); + height: calc(100% - $caption-height); } } $svg-scale: 1.25; - $svg-width: calc(100% * 9 / 16 / #{$svg-scale}); - $svg-top: calc((100% * 9 / 16 / 2) - (#{$svg-width} / 2)); + $svg-width: calc(100% * 9 / 16 / $svg-scale); + $svg-top: calc((100% * 9 / 16 / 2) - ($svg-width / 2)); svg.thumbnail-image { top: 0; - left: calc(50% - (#{$svg-width} / 4)); - width: calc(#{$svg-width} / 4); + left: calc(50% - ($svg-width / 4)); + width: calc($svg-width / 4); margin: 0 auto; overflow: visible; @@ -216,7 +216,7 @@ } .caption + & { - top: calc((#{$caption-height} / 2) + #{$svg-top}); + top: calc(($caption-height / 2) + $svg-top); } .icon-only & { diff --git a/contentcuration/contentcuration/frontend/shared/views/files/Thumbnail.vue b/contentcuration/contentcuration/frontend/shared/views/files/Thumbnail.vue index fb09161cc0..bf90e481b2 100644 --- a/contentcuration/contentcuration/frontend/shared/views/files/Thumbnail.vue +++ b/contentcuration/contentcuration/frontend/shared/views/files/Thumbnail.vue @@ -212,18 +212,18 @@ overflow: hidden; // Don't show alt text outside of img boundaries .caption + & { - height: calc(100% - #{$caption-height}); + height: calc(100% - $caption-height); } } $svg-scale: 1.25; - $svg-width: calc(100% * 9 / 16 / #{$svg-scale}); - $svg-top: calc((100% * 9 / 16 / 2) - (#{$svg-width} / 2)); + $svg-width: calc(100% * 9 / 16 / $svg-scale); + $svg-top: calc((100% * 9 / 16 / 2) - ($svg-width / 2)); svg.thumbnail-image { top: 0; - left: calc(50% - (#{$svg-width} / 4)); - width: calc(#{$svg-width} / 4); + left: calc(50% - ($svg-width / 4)); + width: calc($svg-width / 4); margin: 0 auto; overflow: visible; @@ -259,7 +259,7 @@ } .caption + & { - top: calc((#{$caption-height} / 2) + #{$svg-top}); + top: calc(($caption-height / 2) + $svg-top); } .icon-only & { From 6a09524f7cf76c4fd14595de4684e2393d2c3e7a Mon Sep 17 00:00:00 2001 From: adibmbrk Date: Thu, 20 Feb 2025 22:16:05 +0000 Subject: [PATCH 14/14] Removed less from webpack config --- webpack.config.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/webpack.config.js b/webpack.config.js index 3e1432d31a..fb0ef0dec9 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -101,10 +101,6 @@ module.exports = (env = {}) => { test: /\.styl(us)?$/, use: baseCssLoaders.concat('stylus-loader'), }, - { - test: /\.less?$/, - use: baseCssLoaders.concat('less-loader'), - }, ], }, resolve: { @@ -116,7 +112,7 @@ module.exports = (env = {}) => { vuetify: path.resolve('node_modules', 'vuetify'), static: staticFilesDir, }, - extensions: ['.js', '.vue', '.css', '.less'], + extensions: ['.js', '.vue', '.css'], modules: [rootNodeModules], }, resolveLoader: {