Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: update dependencies and replace SCSS variables with CSS #240

Open
wants to merge 3 commits into
base: rg-release/redwood.master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// eslint-disable-next-line import/no-extraneous-dependencies
const path = require('path');
// eslint-disable-next-line import/no-extraneous-dependencies
const { createConfig } = require('@openedx/frontend-build');
Expand Down
19,666 changes: 12,525 additions & 7,141 deletions package-lock.json

Large diffs are not rendered by default.

23 changes: 12 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"snapshot": "TZ=UTC fedx-scripts jest --updateSnapshot",
"start": "fedx-scripts webpack-dev-server --progress",
"start:with-theme": "paragon install-theme && npm start && npm install",
"test": "TZ=UTC fedx-scripts jest --coverage --passWithNoTests",
"types": "tsc --noEmit"
"test": "TZ=UTC jest --coverage --passWithNoTests",
"types": "tsc --noEmit",
"replace-variables": "paragon replace-variables -p src -t usage"
},
"husky": {
"hooks": {
Expand All @@ -41,12 +42,12 @@
"@dnd-kit/sortable": "^8.0.0",
"@dnd-kit/utilities": "^3.2.2",
"@edx/brand": "npm:@openedx/brand-openedx@^1.2.2",
"@edx/frontend-component-ai-translations": "^2.0.0",
"@edx/frontend-component-footer": "^13.0.2",
"@edx/frontend-component-header": "^5.1.0",
"@edx/frontend-component-ai-translations": "npm:@raccoongang/frontend-component-ai-translations@^2.0.0-tokens.2",
"@edx/frontend-component-footer": "npm:@raccoongang/frontend-component-footer@^13.2.0-tokens.4",
"@edx/frontend-component-header": "npm:@raccoongang/frontend-component-header@^5.0.2-tokens.4",
"@edx/frontend-enterprise-hotjar": "^2.0.0",
"@edx/frontend-lib-content-components": "2.5.3",
"@edx/frontend-platform": "7.0.1",
"@edx/frontend-lib-content-components": "npm:@raccoongang/frontend-lib-content-components@^2.5.3-tokens.3",
"@edx/frontend-platform": "npm:@raccoongang/frontend-platform@^7.1.2-tokens.2",
"@edx/openedx-atlas": "^0.6.0",
"@fortawesome/fontawesome-svg-core": "1.2.36",
"@fortawesome/free-brands-svg-icons": "5.15.4",
Expand All @@ -64,8 +65,8 @@
"@openedx-plugins/course-app-teams": "file:plugins/course-apps/teams",
"@openedx-plugins/course-app-wiki": "file:plugins/course-apps/wiki",
"@openedx-plugins/course-app-xpert_unit_summary": "file:plugins/course-apps/xpert_unit_summary",
"@openedx/frontend-plugin-framework": "^1.1.0",
"@openedx/paragon": "^22.2.1",
"@openedx/frontend-plugin-framework": "npm:@raccoongang/frontend-plugin-framework@^1.1.2-tokens.2",
"@openedx/paragon": "23.0.0",
"@reduxjs/toolkit": "1.9.7",
"@tanstack/react-query": "4.36.1",
"classnames": "2.2.6",
Expand Down Expand Up @@ -98,11 +99,11 @@
},
"devDependencies": {
"@edx/browserslist-config": "1.2.0",
"@edx/react-unit-test-utils": "^2.0.0",
"@edx/react-unit-test-utils": "npm:@raccoongang/react-unit-test-utils@^2.0.0-tokens.2",
"@edx/reactifex": "^1.0.3",
"@edx/stylelint-config-edx": "2.3.0",
"@edx/typescript-config": "^1.0.1",
"@openedx/frontend-build": "13.1.0",
"@openedx/frontend-build": "npm:@raccoongang/frontend-build@^13.1.4-tokens.2",
"@testing-library/jest-dom": "5.17.0",
"@testing-library/react": "12.1.5",
"@testing-library/react-hooks": "^8.0.1",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
@import "~@edx/brand/paragon/variables";
@import "~@openedx/paragon/scss/core/utilities-only";

.summary-radio {
display: flex;
align-items: center;
width: 100%;
border-width: $border-width;
border-color: $border-color;
border-radius: $border-radius;
border-width: var(--pgn-size-border-width);
border-color: var(--pgn-color-border);
border-radius: var(--pgn-size-border-radius-base);
border-style: solid;

&:has(input:checked) {
Expand All @@ -27,10 +24,10 @@
}

.reset-units-button {
color: $link-color;
border-width: $border-width;
border-color: $border-color;
border-radius: $border-radius;
color: var(--pgn-color-link-base);
border-width: var(--pgn-size-border-width);
border-color: var(--pgn-color-border);
border-radius: var(--pgn-size-border-radius-base);
border-style: solid;
}

Expand Down
24 changes: 12 additions & 12 deletions src/advanced-settings/scss/AdvancedSettings.scss
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
bottom: 0;
width: 100%;
padding: 0 .625rem;
z-index: $zindex-modal;
z-index: var(--pgn-elevation-modal-zindex);
}

.alert-proctoring-error {
Expand Down Expand Up @@ -66,13 +66,13 @@
.setting-sidebar-supplementary {
.setting-sidebar-supplementary-about {
.setting-sidebar-supplementary-about-title {
font: normal $font-weight-bold 1.125rem/1.5rem $font-family-base;
color: $headings-color;
font: normal var(--pgn-typography-font-weight-bold) 1.125rem/1.5rem var(--pgn-typography-font-family-base);
color: var(--pgn-color-headings-base);
margin-bottom: 1.25rem;
}

.setting-sidebar-supplementary-about-descriptions {
font: normal $font-weight-normal .875rem/1.5rem $font-family-base;
font: normal var(--pgn-typography-font-weight-normal) .875rem/1.5rem var(--pgn-typography-font-family-base);
color: $text-color-base;
}
}
Expand All @@ -81,16 +81,16 @@
list-style: none;

.setting-sidebar-supplementary-other-link {
font: normal $font-weight-normal .875rem/1.5rem $font-family-base;
font: normal var(--pgn-typography-font-weight-normal) .875rem/1.5rem var(--pgn-typography-font-family-base);
line-height: 1.5rem;
color: $info-500;
color: var(--pgn-color-info-500);
margin-bottom: .5rem;
}
}

.setting-sidebar-supplementary-other-title {
font: normal $font-weight-bold 1.125rem/1.5rem $font-family-base;
color: $headings-color;
font: normal var(--pgn-typography-font-weight-bold) 1.125rem/1.5rem var(--pgn-typography-font-family-base);
color: var(--pgn-color-headings-base);
margin-bottom: 1.25rem;
}
}
Expand All @@ -102,7 +102,7 @@
display: inline-block;
margin-right: 5px;
margin-bottom: 5px;
color: $danger;
color: var(--pgn-color-danger-base);
}

.modal-error-item-title {
Expand All @@ -113,12 +113,12 @@

.modal-popup-content {
max-width: 200px;
color: $white;
background-color: $black;
color: var(--pgn-color-white);
background-color: var(--pgn-color-black);
filter: drop-shadow(0 2px 4px rgba(0 0 0 / .15));
font-weight: 400;
}

.pgn__modal-popup__arrow::after {
border-top-color: $black;
border-top-color: var(--pgn-color-black);
}
2 changes: 1 addition & 1 deletion src/advanced-settings/scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$text-color-base: $gray-700;
$text-color-base: var(--pgn-color-gray-700);
50 changes: 25 additions & 25 deletions src/assets/scss/_form.scss
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.form-group-custom {
.pgn__form-label {
font: normal $font-weight-bold .75rem/1.25rem $font-family-base;
color: $gray-500;
font: normal var(--pgn-typography-font-weight-bold) .75rem/1.25rem var(--pgn-typography-font-family-base);
color: var(--pgn-color-gray-500);
margin-bottom: .5rem;
}

.pgn__form-control-description,
.pgn__form-text {
font: normal $font-weight-normal .75rem/1.25rem $font-family-base;
color: $gray-500;
font: normal var(--pgn-typography-font-weight-normal) .75rem/1.25rem var(--pgn-typography-font-family-base);
color: var(--pgn-color-gray-500);
margin-top: .5rem;
}

Expand All @@ -19,12 +19,12 @@

.form-group-custom_isInvalid {
input {
border-color: $form-feedback-invalid-color;
border-color: var(--pgn-color-form-feedback-invalid);
}
}

.feedback-error {
color: $form-feedback-invalid-color;
color: var(--pgn-color-form-feedback-invalid);
}
}

Expand All @@ -34,40 +34,40 @@
.datepicker-custom-control {
display: block;
width: 100%;
font-size: $input-font-size;
font-weight: $input-font-weight;
line-height: $input-line-height;
background: $input-bg;
border-color: $input-border-color;
border-width: $input-border-width;
box-shadow: $input-box-shadow;
border-radius: $input-border-radius;
color: $input-color;
padding: $input-padding-y $input-padding-x;
height: $input-height;
font-size: var(--pgn-typography-form-input-font-size-base);
font-weight: var(--pgn-typography-form-input-font-weight);
line-height: var(--pgn-typography-form-input-line-height-base);
background: var(--pgn-color-form-input-bg-base);
border-color: var(--pgn-color-form-input-border);
border-width: var(--pgn-size-form-input-width-border);
box-shadow: var(--pgn-elevation-form-input-base);
border-radius: var(--pgn-size-form-input-radius-border-base);
color: var(--pgn-color-form-input-base);
padding: var(--pgn-spacing-form-input-padding-y-base) var(--pgn-spacing-form-input-padding-x-base);
height: var(--pgn-size-form-input-height-base);
resize: none;

&:focus,
:focus-visible {
color: $input-focus-color;
background-color: $input-bg;
border-color: $input-focus-border-color;
box-shadow: $input-focus-box-shadow;
color: var(--pgn-color-form-input-focus-base);
background-color: var(--pgn-color-form-input-bg-base);
border-color: var(--pgn-color-form-input-focus-border);
box-shadow: var(--pgn-elevation-form-input-focus);
outline: 0;
}

&::placeholder {
color: $input-placeholder-color;
color: var(--pgn-color-form-input-placeholder);
}
}

.datepicker-custom-control_readonly {
border-color: transparent;
background: $input-disabled-bg;
background: var(--pgn-color-form-input-bg-disabled);
}

.datepicker-custom-control_isInvalid {
border-color: $form-feedback-invalid-color;
border-color: var(--pgn-color-form-feedback-invalid);
}

.datepicker-custom-control-icon {
Expand All @@ -76,7 +76,7 @@
right: 1.188rem;
top: 50%;
transform: translateY(-50%);
color: $black;
color: var(--pgn-color-black);
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/assets/scss/_utilities.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.text-black {
color: $black;
color: var(--pgn-color-black);
}

.h-200px {
Expand Down
2 changes: 1 addition & 1 deletion src/assets/scss/_variables.scss
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
$text-color-base: $gray-700;
$text-color-base: var(--pgn-color-gray-700);
$text-color-weak: #3E3E3C;
8 changes: 4 additions & 4 deletions src/certificates/scss/Certificates.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

.certificates {
.section-title {
color: $black;
color: var(--pgn-color-black);
}

.sub-header-actions {
Expand All @@ -11,7 +11,7 @@

.certificate-details {
.certificate-details__info {
color: $black;
color: var(--pgn-color-black);
justify-content: space-between;
align-items: baseline;
}
Expand All @@ -22,7 +22,7 @@

.certificate-details__info-paragraph-course-number {
flex: 1;
color: $gray-700;
color: var(--pgn-color-gray-700);
text-align: right;
}
}
Expand Down Expand Up @@ -74,7 +74,7 @@
}
}

@media (max-width: map-get($grid-breakpoints, "xl")) {
@media (--pgn-size-breakpoint-max-width-xl) {
.signatory {
display: flex;
flex-direction: column;
Expand Down
2 changes: 1 addition & 1 deletion src/content-tags-drawer/ContentTagsCollapsible.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

.add-tags-button:not([disabled]):hover {
background-color: transparent;
color: $info-900 !important;
color: var(--pgn-color-info-900) !important;
}

.react-select-add-tags__control {
Expand Down
4 changes: 2 additions & 2 deletions src/content-tags-drawer/ContentTagsDrawer.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

.tags-drawer-cancel-button:hover {
background-color: transparent;
color: $gray-300 !important;
color: var(--pgn-color-gray-300) !important;
}

.other-description {
Expand All @@ -25,7 +25,7 @@

.enable-taxonomies-button:not([disabled]):hover {
background-color: transparent;
color: $info-900 !important;
color: var(--pgn-color-info-900) !important;
}
}

Expand Down
6 changes: 3 additions & 3 deletions src/content-tags-drawer/ContentTagsDropDownSelector.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

&:hover {
background-color: transparent;
color: $info-900 !important;
color: var(--pgn-color-info-900) !important;
}
}

Expand All @@ -19,7 +19,7 @@
// In the future, this customizability should be implemented in paragon instead
input.pgn__form-checkbox-input {
&:indeterminate {
@extend :checked; /* stylelint-disable-line scss/at-extend-no-missing-placeholder */
@extend :checked !optional; /* stylelint-disable-line scss/at-extend-no-missing-placeholder */
}
}
}
Expand All @@ -34,6 +34,6 @@
}

.dropdown-selector-tag-actions:focus-visible {
outline: solid 2px $info-900;
outline: solid 2px var(--pgn-color-info-900);
border-radius: 4px;
}
4 changes: 2 additions & 2 deletions src/content-tags-drawer/TagsTree.scss
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@

&:hover {
svg {
color: $gray-900;
color: var(--pgn-color-gray-900);
}
}

&:focus-visible {
border: 2px solid;
border-color: $gray-900;
border-color: var(--pgn-color-gray-900);
}
}
}
4 changes: 2 additions & 2 deletions src/course-checklist/ChecklistSection/ChecklistSection.scss
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@

.assignment-list {
display: inline;
padding-inline-start: map-get($spacers, 1);
padding-inline-start: var(--pgn-spacing-spacer-1);
}

//complete checklist item style
.checklist-item-complete {
box-shadow: -5px 0 0 0 $success-500;
box-shadow: -5px 0 0 0 var(--pgn-color-success-500);
}
Loading
Loading