Skip to content

Commit

Permalink
Merge branch 'master' into replace-gapi
Browse files Browse the repository at this point in the history
  • Loading branch information
RichDom2185 authored Mar 1, 2024
2 parents 254f9f0 + 9f7b414 commit 6ce1f9f
Show file tree
Hide file tree
Showing 10 changed files with 90 additions and 68 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
"moment": "^2.29.4",
"normalize.css": "^8.0.1",
"phaser": "^3.55.2",
"query-string": "^8.0.0",
"query-string": "^9.0.0",
"re-resizable": "^6.9.9",
"react": "^18.2.0",
"react-ace": "^10.1.0",
Expand Down
14 changes: 6 additions & 8 deletions src/commons/assessment/Assessment.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import {
} from '@blueprintjs/core';
import { IconNames } from '@blueprintjs/icons';
import { Tooltip2 } from '@blueprintjs/popover2';
import classNames from 'classnames';
import { sortBy } from 'lodash';
import React, { useMemo, useState } from 'react';
import { useDispatch } from 'react-redux';
Expand Down Expand Up @@ -91,7 +92,7 @@ const Assessment: React.FC<AssessmentProps> = props => {
// tslint:disable-next-line:jsx-no-lambda
onClick={() => setBetchaAssessment(overview)}
>
<span className="custom-hidden-xxxs">Finalize</span>
<span>Finalize</span>
<span className="custom-hidden-xxs"> Submission</span>
</Button>
);
Expand Down Expand Up @@ -140,10 +141,8 @@ const Assessment: React.FC<AssessmentProps> = props => {
dispatch(acknowledgeNotifications(filterNotificationsByAssessment(overview.id)))
}
>
<span className="custom-hidden-xxxs" data-testid="Assessment-Attempt-Button">
{label}
</span>
<span className="custom-hidden-xxs">{optionalLabel}</span>
<span data-testid="Assessment-Attempt-Button">{label}</span>
<span className="custom-hidden-xxxs">{optionalLabel}</span>
</Button>
</NavLink>
);
Expand All @@ -166,11 +165,10 @@ const Assessment: React.FC<AssessmentProps> = props => {
) => {
const showGrade =
overview.gradingStatus === 'graded' || !props.assessmentConfiguration.isManuallyGraded;
const ratio = isMobileBreakpoint ? 5 : 3;
return (
<div key={index}>
<Card className="row listing" elevation={Elevation.ONE}>
<div className={`col-xs-${String(ratio)} listing-picture`}>
<div className={classNames('listing-picture', !isMobileBreakpoint && 'col-xs-3')}>
<NotificationBadge
className="badge"
notificationFilter={filterNotificationsByAssessment(overview.id)}
Expand All @@ -182,7 +180,7 @@ const Assessment: React.FC<AssessmentProps> = props => {
src={overview.coverImage ? overview.coverImage : defaultCoverImage}
/>
</div>
<div className={`col-xs-${String(12 - ratio)} listing-text`}>
<div className={classNames('listing-text', !isMobileBreakpoint && 'col-xs-9')}>
{makeOverviewCardTitle(overview, index, renderGradingStatus)}
<div className="listing-xp">
<H6>
Expand Down
63 changes: 23 additions & 40 deletions src/commons/assessment/__tests__/__snapshots__/Assessment.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
className="row listing bp5-card bp5-elevation-1"
>
<div
className="col-xs-3 listing-picture"
className="listing-picture col-xs-3"
>
<img
alt="Assessment"
Expand All @@ -148,7 +148,7 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
/>
</div>
<div
className="col-xs-9 listing-text"
className="listing-text col-xs-9"
>
<div
className="listing-header"
Expand Down Expand Up @@ -194,9 +194,7 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
<span
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
>
<span>
Finalize
</span>
<span
Expand Down Expand Up @@ -321,7 +319,7 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
className="row listing bp5-card bp5-elevation-1"
>
<div
className="col-xs-3 listing-picture"
className="listing-picture col-xs-3"
>
<img
alt="Assessment"
Expand All @@ -330,7 +328,7 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
/>
</div>
<div
className="col-xs-9 listing-text"
className="listing-text col-xs-9"
>
<div
className="listing-header"
Expand Down Expand Up @@ -376,9 +374,7 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
<span
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
>
<span>
Finalize
</span>
<span
Expand Down Expand Up @@ -498,13 +494,12 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
data-testid="Assessment-Attempt-Button"
>
Continue
</span>
<span
className="custom-hidden-xxs"
className="custom-hidden-xxxs"
>
Attempt
</span>
Expand All @@ -521,7 +516,7 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
className="row listing bp5-card bp5-elevation-1"
>
<div
className="col-xs-3 listing-picture"
className="listing-picture col-xs-3"
>
<img
alt="Assessment"
Expand All @@ -530,7 +525,7 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
/>
</div>
<div
className="col-xs-9 listing-text"
className="listing-text col-xs-9"
>
<div
className="listing-header"
Expand Down Expand Up @@ -576,9 +571,7 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
<span
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
>
<span>
Finalize
</span>
<span
Expand Down Expand Up @@ -705,13 +698,12 @@ exports[`Assessment page does not show attempt Button for upcoming assessments f
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
data-testid="Assessment-Attempt-Button"
>
Review
</span>
<span
className="custom-hidden-xxs"
className="custom-hidden-xxxs"
>
Attempt
</span>
Expand Down Expand Up @@ -888,7 +880,7 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
className="row listing bp5-card bp5-elevation-1"
>
<div
className="col-xs-3 listing-picture"
className="listing-picture col-xs-3"
>
<img
alt="Assessment"
Expand All @@ -897,7 +889,7 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
/>
</div>
<div
className="col-xs-9 listing-text"
className="listing-text col-xs-9"
>
<div
className="listing-header"
Expand Down Expand Up @@ -931,9 +923,7 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
<span
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
>
<span>
Finalize
</span>
<span
Expand Down Expand Up @@ -1007,13 +997,12 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
data-testid="Assessment-Attempt-Button"
>
Attempt
</span>
<span
className="custom-hidden-xxs"
className="custom-hidden-xxxs"
/>
</span>
</button>
Expand Down Expand Up @@ -1069,7 +1058,7 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
className="row listing bp5-card bp5-elevation-1"
>
<div
className="col-xs-3 listing-picture"
className="listing-picture col-xs-3"
>
<img
alt="Assessment"
Expand All @@ -1078,7 +1067,7 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
/>
</div>
<div
className="col-xs-9 listing-text"
className="listing-text col-xs-9"
>
<div
className="listing-header"
Expand Down Expand Up @@ -1112,9 +1101,7 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
<span
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
>
<span>
Finalize
</span>
<span
Expand Down Expand Up @@ -1198,13 +1185,12 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
data-testid="Assessment-Attempt-Button"
>
Continue
</span>
<span
className="custom-hidden-xxs"
className="custom-hidden-xxxs"
>
Attempt
</span>
Expand All @@ -1221,7 +1207,7 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
className="row listing bp5-card bp5-elevation-1"
>
<div
className="col-xs-3 listing-picture"
className="listing-picture col-xs-3"
>
<img
alt="Assessment"
Expand All @@ -1230,7 +1216,7 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
/>
</div>
<div
className="col-xs-9 listing-text"
className="listing-text col-xs-9"
>
<div
className="listing-header"
Expand Down Expand Up @@ -1264,9 +1250,7 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
<span
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
>
<span>
Finalize
</span>
<span
Expand Down Expand Up @@ -1357,13 +1341,12 @@ exports[`Assessment page with multiple loaded missions renders correctly 1`] = `
className="bp5-button-text"
>
<span
className="custom-hidden-xxxs"
data-testid="Assessment-Attempt-Button"
>
Review
</span>
<span
className="custom-hidden-xxs"
className="custom-hidden-xxxs"
>
Attempt
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,7 @@ const SicpNavigationBar: React.FC = () => {
return (
<>
<Omnibar
className="sicp-search-bar"
isOpen={isOmnibarOpen}
inputProps={{
disabled: omnibarMode === 'submenu',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
exports[`Navbar renders correctly 1`] = `
<React.Fragment>
<Blueprint5.Omnibar
className="sicp-search-bar"
inputProps={
Object {
"disabled": false,
Expand Down
Loading

0 comments on commit 6ce1f9f

Please sign in to comment.