Skip to content

Commit 1bfb102

Browse files
feat!: add design tokens support (#556)
BREAKING CHANGE: Pre-design-tokens theming is no longer supported. Co-authored-by: Diana Olarte <[email protected]>
1 parent 16b9a3b commit 1bfb102

File tree

9 files changed

+2288
-983
lines changed

9 files changed

+2288
-983
lines changed

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,5 @@ APP_ID=''
2323
MFE_CONFIG_API_URL=''
2424
ENABLE_VERIFIABLE_CREDENTIALS=''
2525
SUPPORT_URL_VERIFIABLE_CREDENTIALS=''
26+
# Fallback in local style files
27+
PARAGON_THEME_URLS={}

.env.development

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,5 @@ APP_ID=''
2424
MFE_CONFIG_API_URL=''
2525
ENABLE_VERIFIABLE_CREDENTIALS='true'
2626
SUPPORT_URL_VERIFIABLE_CREDENTIALS=''
27+
# Fallback in local style files
28+
PARAGON_THEME_URLS={}

.env.test

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,4 @@ USER_INFO_COOKIE_NAME='edx-user-info'
2020
SUPPORT_URL_LEARNER_RECORDS=''
2121
ENABLE_VERIFIABLE_CREDENTIALS='true'
2222
SUPPORT_URL_VERIFIABLE_CREDENTIALS=''
23+
PARAGON_THEME_URLS={}

package-lock.json

Lines changed: 2253 additions & 961 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
"@fortawesome/free-regular-svg-icons": "6.7.2",
4545
"@fortawesome/free-solid-svg-icons": "6.7.2",
4646
"@fortawesome/react-fontawesome": "0.2.2",
47-
"@openedx/frontend-plugin-framework": "^1.2.0",
48-
"@openedx/paragon": "^22.2.2",
47+
"@openedx/frontend-plugin-framework": "^1.6.0",
48+
"@openedx/paragon": "^23.4.2",
4949
"ajv": "^8.12.0",
5050
"ajv-keywords": "^5.1.0",
5151
"babel-polyfill": "6.26.0",
Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,23 @@
11
.program-record-wrapper {
2-
@extend .my-4\.5;
2+
margin-top: calc(var(--pgn-spacing-spacer-base) * 2) !important;
33

44
.back-to-records:hover {
55
background: none;
66
}
77

88
.program-record-nav {
9-
@extend .d-flex, .justify-content-between, .mb-3;
9+
display: flex !important;
10+
justify-content: space-between !important;
11+
margin-bottom: var(--pgn-spacing-spacer-base) !important;
1012

1113
.program-record-actions {
12-
@extend .d-flex;
14+
display: flex !important;
1315
gap: 0.5rem;
1416
}
1517

1618
.download-record {
17-
@extend .d-flex, .flex-row-reverse;
19+
display: flex !important;
20+
flex-direction: row-reverse !important;
1821
}
1922
}
2023

@@ -23,15 +26,17 @@
2326
.program-record-header {
2427

2528
.program-headings {
26-
@extend .d-flex, .justify-content-between;
27-
color: $primary-500;
29+
display: flex !important;
30+
justify-content: space-between !important;
31+
color: var(--pgn-color-primary-500);
2832

2933
h4 {
3034
color: inherit;
3135
}
3236

3337
.program-title {
34-
@extend .d-flex, .flex-column;
38+
display: flex !important;
39+
flex-direction: column !important;
3540

3641
.heading-label {
3742
text-transform: capitalize;
@@ -44,20 +49,22 @@
4449
}
4550

4651
.program-status {
47-
@extend .d-flex, .align-items-center;
52+
display: flex !important;
53+
align-items: center !important;
4854
gap: 0.5rem;
4955

5056
span.badge {
51-
@extend .d-flex;
57+
display: flex !important;
5258
}
5359

5460
span.updated {
55-
@extend .small;
61+
font-size: var(--pgn-typography-font-size-sm);
62+
font-weight: var(--pgn-typography-font-weight-normal);
5663
}
5764
}
5865

5966
.learner-info {
60-
@extend .d-flex;
67+
display: flex !important;
6168
gap: 0.25rem;
6269
}
6370
}
@@ -68,6 +75,6 @@
6875
}
6976

7077
.help {
71-
color: $primary-500;
78+
color: var(--pgn-color-primary-500);
7279
}
7380
}

src/components/ProgramRecordSendModal/SendLearnerRecordModal.scss

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
.send-record-modal {
2-
@extend .d-flex, .flex-column;
2+
display: flex !important;
3+
flex-direction: column !important;
34

45
> div:nth-child(2) {
5-
@extend .d-flex, .flex-column;
6-
color: $primary-500;
6+
display: flex !important;
7+
flex-direction: column !important;
8+
color: var(--pgn-color-primary-500);
79
}
810

911
> div:nth-child(3) {
1012
overflow: hidden;
1113
}
1214

1315
.checkbox-group {
14-
@extend .d-flex, .flex-column;
16+
display: flex !important;
17+
flex-direction: column !important;
1518

1619
> div {
1720
width: 100%;

src/index.scss

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
@import "~@edx/brand/paragon/fonts";
2-
@import "~@edx/brand/paragon/variables";
3-
@import "~@openedx/paragon/scss/core/core";
4-
@import "~@edx/brand/paragon/overrides";
1+
@use "@openedx/paragon/styles/css/core/custom-media-breakpoints" as paragonCustomMediaBreakpoints;
52

63
@import './components/index.scss';
74

src/setupTest.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import messages from './i18n';
1515
jest.mock('@edx/frontend-platform/react/hooks', () => ({
1616
...jest.requireActual('@edx/frontend-platform/react/hooks'),
1717
useTrackColorSchemeChoice: jest.fn(),
18+
useParagonTheme: () => [{ isThemeLoaded: true }, jest.fn()],
1819
}));
1920

2021
mergeConfig(envConfig);

0 commit comments

Comments
 (0)