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: replace text in Progress Tab #13

Closed
wants to merge 2 commits into from
Closed
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
10,282 changes: 4,119 additions & 6,163 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@
"url": "https://github.com/openedx/frontend-app-learning/issues"
},
"dependencies": {
"@edx/brand": "npm:@edx/brand-openedx@1.2.0",
"@edx/frontend-component-footer": "^12.0.0",
"@edx/frontend-component-header": "^4.0.0",
"@edx/frontend-lib-special-exams": "^2.16.1",
"@edx/frontend-platform": "^4.2.0",
"@edx/paragon": "20.28.4",
"@edx/brand": "npm:@edx/brand-edx.org@2.2.0-alpha.16",
"@edx/frontend-component-footer": "^12.6.0",
"@edx/frontend-component-header": "^4.10.1",
"@edx/frontend-lib-special-exams": "https://github.com/open-craft/frontend-lib-special-exams/releases/download/v2.16.2-tokens-release/edx-frontend-lib-special-exams-1.14.0.tgz",
"@edx/frontend-platform": "https://github.com/open-craft/frontend-platform/releases/download/v6.2.0-pre-token-asu-moe/edx-frontend-platform-6.2.0.tgz",
"@edx/paragon": "22.0.0-alpha.13",
"@fortawesome/fontawesome-svg-core": "1.3.0",
"@fortawesome/free-brands-svg-icons": "5.15.4",
"@fortawesome/free-regular-svg-icons": "5.15.4",
Expand Down Expand Up @@ -64,7 +64,7 @@
},
"devDependencies": {
"@edx/browserslist-config": "1.1.1",
"@edx/frontend-build": "^12.8.27",
"@edx/frontend-build": "github:open-craft/frontend-build#asu-moe/palm-css",
"@edx/reactifex": "2.1.1",
"@pact-foundation/pact": "9.17.3",
"@testing-library/jest-dom": "5.16.5",
Expand Down
6 changes: 2 additions & 4 deletions src/course-home/outline-tab/Section.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
@import "~@edx/brand/paragon/variables";
@import "~@edx/paragon/scss/core/core";
@import "~@edx/brand/paragon/overrides";


.section .collapsible-body {
/* Internal SequenceLink components will have padding instead so when
Expand All @@ -11,5 +9,5 @@
}

.section-selected > .collapsible-trigger {
background-color: $light-300;
background-color: var(--pgn-color-light-300);
}
6 changes: 1 addition & 5 deletions src/course-home/outline-tab/SequenceLink.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
@import "~@edx/brand/paragon/variables";
@import "~@edx/paragon/scss/core/core";
@import "~@edx/brand/paragon/overrides";

.sequence-link-selected {
background-color: $light-300;
background-color: var(--pgn-color-light-300);
}
18 changes: 7 additions & 11 deletions src/course-home/outline-tab/widgets/FlagButton.scss
Original file line number Diff line number Diff line change
@@ -1,22 +1,18 @@
@import "~@edx/brand/paragon/variables";
@import "~@edx/paragon/scss/core/core";
@import "~@edx/brand/paragon/overrides";

.flag-button {
background-color: $white;
border: 1px solid $light-400;
background-color: var(--pgn-color-white);
border: 1px solid var(--pgn-color-light-400);
border-radius: .2rem;
box-shadow: 0 0 0 2px $light-400;
box-shadow: 0 0 0 2px var(--pgn-color-light-400);

&:hover {
border: 1px solid $primary-300;
box-shadow: 0 0 0 2px $white;
border: 1px solid var(--pgn-color-primary-300);
box-shadow: 0 0 0 2px var(--pgn-color-white);
}
}

.flag-button-selected {
border: 1px solid $primary-300;
box-shadow: 0 0 0 2px $primary-300;
border: 1px solid var(--pgn-color-primary-300);
box-shadow: 0 0 0 2px var(--pgn-color-primary-300);
pointer-events: none;
}

Expand Down
8 changes: 4 additions & 4 deletions src/course-home/outline-tab/widgets/ProctoringInfoPanel.scss
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
.outline-sidebar-proctoring-panel {
border: 1px solid $dark-500;
border-top: 5px solid $brand-600;
border: 1px solid var(--pgn-color-dark-500);
border-top: 5px solid var(--pgn-color-brand-600);
}
.proctoring-onboarding-success {
border-top: 5px solid $primary-500;
border-top: 5px solid var(--pgn-color-primary-500);
}
.proctoring-onboarding-submitted {
border-top: 5px solid $dark-500;
border-top: 5px solid var(--pgn-color-dark-500);
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ import {
FormattedDate, FormattedMessage, injectIntl, intlShape,
} from '@edx/frontend-platform/i18n';

import { Button, Card } from '@edx/paragon';
import { Button, Card, Hyperlink } from '@edx/paragon';
import { getConfig } from '@edx/frontend-platform';
import { useModel } from '../../../generic/model-store';
import { COURSE_EXIT_MODES, getCourseExitMode } from '../../../courseware/course/course-exit/utils';
import { DashboardLink, IdVerificationSupportLink, ProfileLink } from '../../../shared/links';
import { IdVerificationSupportLink } from '../../../shared/links';
import { requestCert } from '../../data/thunks';
import messages from './messages';

Expand Down Expand Up @@ -82,9 +82,20 @@ const CertificateStatus = ({ intl }) => {
gradeEventName = Object.entries(gradeRange).length > 1 ? 'passing_grades' : 'passing';
}

const dashboardLink = <DashboardLink />;
const idVerificationSupportLink = <IdVerificationSupportLink />;
const profileLink = <ProfileLink />;
const certificatesHelpLink = (
<Hyperlink
variant="muted"
isInline
destination="https://eshemoeasu.my.site.com/help/s/article/Learn-about-printing-saving-or-sharing-your-certificate"
>
<FormattedMessage
id="progress.certificateStatus.certificatesHelpLink"
defaultMessage="Learn about printing, saving, or sharing your certificate."
description="Redirects learners to Certificate Help docs"
/>
</Hyperlink>
);

// Some learners have a valid ("downloadable") certificate without being in a passing
// state (e.g. learners who have been added to a course's allowlist), so we need to
Expand Down Expand Up @@ -133,12 +144,9 @@ const CertificateStatus = ({ intl }) => {
body = (
<FormattedMessage
id="progress.certificateStatus.downloadableBody"
defaultMessage="
Showcase your accomplishment on LinkedIn or your resumé today.
You can download your certificate now and access it any time from your
{dashboardLink} and {profileLink}."
defaultMessage="Showcase your accomplishment. {certificatesHelpLink}"
description="Recommending an action for learner when course certificate is available"
values={{ dashboardLink, profileLink }}
values={{ certificatesHelpLink }}
/>
);
if (certWebViewUrl) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,18 @@

.donut-chart-label {
font: {
family: $font-family-sans-serif;
family: var(--pgn-typography-font-family-sans-serif);
size: .2rem;
weight: $font-weight-normal;
weight: var(--pgn-typography-font-weight-normal);
}
text-anchor: middle;
}

.donut-chart-number {
font: {
family: $font-family-monospace;
family: var(--pgn-typography-font-family-monospace);
size: .5rem;
weight: $font-weight-bold;
weight: var(--pgn-typography-font-weight-bold);
}
line-height: 1rem;
text-anchor: middle;
Expand All @@ -29,7 +29,7 @@
}

.donut-chart-text {
fill: $primary-500;
fill: var(--pgn-color-primary-500);
-moz-transform: translateY(0.25em);
-ms-transform: translateY(0.25em);
-webkit-transform: translateY(0.25em);
Expand All @@ -56,7 +56,7 @@

.donut-ring, .donut-segment, .donut-hole {
&.complete-stroke {
stroke: $info-500;
stroke: var(--pgn-color-info-500);
}

&.divider-stroke {
Expand All @@ -65,10 +65,10 @@
}

&.incomplete-stroke {
stroke: $light-300;
stroke: var(--pgn-color-light-300);
}

&.locked-stroke {
stroke: $primary-500;
stroke: var(--pgn-color-primary-500);
}
}
20 changes: 10 additions & 10 deletions src/course-home/progress-tab/grades/course-grade/GradeBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,24 @@
}

.grade-bar__base {
fill: $light-300;
fill: var(--pgn-color-light-300);
}

.grade-bar__divider {
fill: $primary-500;
fill: var(--pgn-color-primary-500);
width: 1px;
}

.grade-bar--passing {
fill: $primary-500;
fill: var(--pgn-color-primary-500);
}

.grade-bar--current-passing {
fill: $success-500;
fill: var(--pgn-color-success-500);
}

.grade-bar--current-non-passing {
fill: $accent-b;
fill: var(--pgn-color-accent-b);
}
}

Expand All @@ -31,22 +31,22 @@

#minimum-grade-tooltip {
.arrow::after {
border-bottom-color: $primary-500;
border-bottom-color: var(--pgn-color-primary-500);
}
}

#passing-grade-tooltip {
.arrow::after {
border-top-color: $success-500;
border-top-color: var(--pgn-color-success-500);
}

background: $success-500;
background: var(--pgn-color-success-500);
}

#non-passing-grade-tooltip {
.arrow::after {
border-top-color: $accent-b;
border-top-color: var(--pgn-color-accent-b);
}

background: $accent-b;
background: var(--pgn-color-accent-b);
}
1 change: 0 additions & 1 deletion src/courseware/course/celebration/CelebrationModal.scss
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
justify-content: center;

button {
@extend .btn-primary;
font-size: 1.2rem;
width: 50%;
}
Expand Down
44 changes: 21 additions & 23 deletions src/courseware/course/sequence/Unit.jsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { getConfig } from '@edx/frontend-platform';
import { injectIntl, intlShape } from '@edx/frontend-platform/i18n';
import { AppContext, ErrorPage } from '@edx/frontend-platform/react';
import { Modal } from '@edx/paragon';
import { ModalDialog } from '@edx/paragon';
import PropTypes from 'prop-types';
import React, {
Suspense, useCallback, useContext, useEffect, useLayoutEffect, useState,
Expand Down Expand Up @@ -196,29 +196,27 @@
<ErrorPage />
)}
{modalOptions.open && (
<Modal
body={(
<>
{modalOptions.body
? <div className="unit-modal">{ modalOptions.body }</div>
: (
<iframe
title={modalOptions.title}
allow={IFRAME_FEATURE_POLICY}
frameBorder="0"
src={modalOptions.url}
style={{
width: '100%',
height: '100vh',
}}
/>
)}
</>
)}
<ModalDialog
onClose={() => { setModalOptions({ open: false }); }}
open
dialogClassName="modal-lti"
/>
isOpen={open}

Check failure on line 201 in src/courseware/course/sequence/Unit.jsx

View workflow job for this annotation

GitHub Actions / tests

Unexpected use of 'open'
>
<ModalDialog.Body className="modal-lti">
{modalOptions.body
? <div className="unit-modal">{ modalOptions.body }</div>
: (
<iframe
title={modalOptions.title}
allow={IFRAME_FEATURE_POLICY}
frameBorder="0"
src={modalOptions.url}
style={{
width: '100%',
height: '100vh',
}}
/>
)}
</ModalDialog.Body>
</ModalDialog>
)}
{!shouldDisplayHonorCode && (
<div className="unit-iframe-wrapper">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}

.lock-paywall-container svg {
color: $primary-700;
color: var(--pgn-color-primary-700);
}

@media only screen and (min-width: 992px) and (max-width: 1100px) {
Expand Down
6 changes: 3 additions & 3 deletions src/generic/upgrade-notification/UpgradeNotification.scss
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@
}

.upsell-warning {
background-color: $danger-100;
background-color: var(--pgn-color-danger-100);
}

.upsell-warning-light {
background-color: $warning-100;
background-color: var(--pgn-color-warning-100);
}

.upsell-warning, .upsell-warning-light {
Expand All @@ -37,7 +37,7 @@
}

.discount-info {
border-top: 1px solid $light-400;
border-top: 1px solid var(--pgn-color-light-400);
padding-top: .75rem;
padding-bottom: .75rem;
}
2 changes: 1 addition & 1 deletion src/generic/upsell-bullets/UpsellBullets.scss
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@
}

.upsell-bullet a {
color: $primary-500;
color: var(--pgn-color-primary-500);
}

Loading
Loading