Skip to content

Conversation

@levadadenys
Copy link
Contributor

[Design2-341-1] Pt.1 Replace all DSCO Typography usages with MUI Typography across all dashboard pages

This probably will produce eyes diffs (that's why this ticket is divided into several PRs), however the only expected diffs are caused by mui Typography font-smoothing. Spacing and sizing diffs are not expected and needed to be reviewed.

In case of any emergencies feel free to revert.

Links

Testing story

Deployment strategy

Follow-up work

Privacy

Security

Caching

PR Creation Checklist:

  • Tests provide adequate coverage
  • Privacy impacts have been documented
  • Security impacts have been documented
  • Code is well-commented
  • New features are translatable or updates will not break translations
  • Relevant documentation has been added or updated
  • User impact is well-understood and desirable
  • Follow-up work items (including potential tech debt) are tracked and linked

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR is part 1 of migrating dashboard pages away from DSCO typography components to MUI’s Typography, aiming to standardize typography rendering (notably font-smoothing) across the app.

Changes:

  • Replaced DSCO typography components (Heading*, Body*Text, StrongText, EmText, Overline*Text) with MUI Typography variants across multiple dashboard/UI surfaces.
  • Added gutterBottom in many places to preserve DSCO-like vertical spacing using the project’s customized MUI typography overrides.
  • Updated related Storybook stories to render MUI Typography variants directly.

Reviewed changes

Copilot reviewed 43 out of 43 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
apps/src/sharedComponents/footer/CopyrightDialog/index.tsx Swap DSCO heading/body text to MUI Typography variants.
apps/src/sharedComponents/card/CardHeader/index.tsx Replace DSCO Typography usage with MUI Typography for card titles.
apps/src/sharedComponents/UploadsDisabledModal.tsx Use MUI Typography for modal copy text.
apps/src/sharedComponents/InfoHelpTip.jsx Replace DSCO body text with MUI Typography in tooltip content.
apps/src/sharedComponents/FlaggedImageModal.tsx Convert DSCO body text to MUI Typography in modal and list items.
apps/src/legacySharedComponents/Headings.story.jsx Update headings Storybook story to use MUI Typography.
apps/src/aichat/views/teacherFeedback/ProfanityFeedbackFooter.tsx Replace EmText with MUI Typography using custom em variant.
apps/src/aichat/views/presentation/PresentationView.tsx Convert header typography to MUI Typography.
apps/src/aichat/views/presentation/ModelCardRow.tsx Replace DSCO heading/body text with MUI Typography in collapsible row.
apps/src/aichat/views/modelCustomization/MultiInputCustomization.tsx Convert strong text usage to MUI Typography with strong variant.
apps/src/aichat/views/modelCustomization/ModelDescriptionPanel.tsx Replace DSCO strong/body text with MUI Typography.
apps/src/aichat/views/modelCustomization/FieldLabel.tsx Replace DSCO nested body/strong typography with MUI Typography.
apps/src/aichat/views/modelCustomization/CompareModelsDialog.tsx Convert dialog header to MUI Typography.
apps/src/aichat/views/assets/FilePreview.tsx Replace StrongText with MUI Typography (strong variant).
apps/src/aichat/views/accessControls/AiChatAccessControls.tsx Convert headers and row labels to MUI Typography.
apps/src/aichat/views/TeacherOnboardingModal.tsx Replace DSCO typography wrappers with MUI Typography in onboarding modal.
apps/src/aichat/views/ChatDisabled.tsx Replace DSCO body text with MUI Typography.
apps/src/aiTutor/views/legacyLabs/AiTutorContainer.tsx Convert DSCO body text header to MUI Typography.
apps/src/aiDifferentiation/welcome/AiDiffWelcome.tsx Replace DSCO typography across welcome flow with MUI Typography.
apps/src/aiDifferentiation/personalization/components/personalizationResults/PersonalizationResultsInfoBox.tsx Convert DSCO body text to MUI Typography for info box.
apps/src/aiDifferentiation/personalization/components/personalizationResults/PersonalizationResultsHeader.tsx Convert overline/header/body DSCO typography to MUI Typography.
apps/src/aiDifferentiation/personalization/components/personalizationResults/PersonalizationResultsColumnSuperpowers.tsx Replace DSCO heading with MUI Typography.
apps/src/aiDifferentiation/personalization/components/personalizationResults/PersonalizationResultsColumnArrows.tsx Replace DSCO heading with MUI Typography.
apps/src/aiDifferentiation/personalization/components/personalizationResults/PersonalizationResultsColumnAiSupport.tsx Replace DSCO heading with MUI Typography.
apps/src/aiDifferentiation/personalization/components/personalizationQuestion/PersonalizationQuestion.tsx Convert question/subhead typography to MUI Typography.
apps/src/aiDifferentiation/personalization/components/personalizationInterstitial/PersonalizationInterstitial.tsx Replace DSCO heading with MUI Typography.
apps/src/aiDifferentiation/personalization/components/PersonalizationProgressBar.tsx Convert DSCO progress text to MUI Typography.
apps/src/aiDifferentiation/personalization/components/PersonalizationInformationBox.tsx Replace DSCO body text with MUI Typography.
apps/src/aiDifferentiation/personalization/components/PersonalizationAnswers.tsx Replace DSCO strong/body text with MUI Typography.
apps/src/aiDifferentiation/notifications/Notification.tsx Convert DSCO body/strong typography to MUI Typography.
apps/src/aiDifferentiation/notifications/EmptyNotificationList.tsx Replace DSCO body text with MUI Typography.
apps/src/aiDifferentiation/AiDiffSidebar.tsx Replace DSCO overline with MUI Typography (overline3 variant).
apps/src/aiDifferentiation/AiDiffChatHeader.tsx Convert DSCO body/strong typography to MUI Typography.
apps/src/aiComponentLibrary/warningModal/ChatWarningModal.tsx Convert DSCO heading/body/strong patterns to MUI Typography.
apps/src/aiComponentLibrary/aiTutorVersionFileChip/AiTutorVersionFileChip.tsx Replace DSCO body text with MUI Typography.
apps/src/aiComponentLibrary/aiTutorVersionActionNotification/AiTutorVersionActionNotification.tsx Replace DSCO body text with MUI Typography for commit description section.
apps/src/accounts/TurnOffAiDiff.tsx Replace DSCO typography with MUI Typography in account settings panel.
apps/src/accounts/SyncOmniAuthSectionControl.jsx Replace legacy Heading1 usage with MUI Typography.
apps/src/accounts/SchoolInformation/index.tsx Replace DSCO Heading2 with MUI Typography with preserved semantics.
apps/src/accounts/ChangeEmail/ChangeEmailModal.jsx Replace DSCO Heading3 with MUI Typography.
apps/src/accounts/ChangeEmail/ChangeEmailForm.tsx Replace DSCO Typography with MUI Typography (body3).
apps/src/accounts/AccountUnlinkWarningModal/index.tsx Replace DSCO Typography instances with MUI Typography.
apps/src/accounts/AccountInformation/index.tsx Replace DSCO Heading2 with MUI Typography with preserved semantics.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +61 to +65
<Typography variant="body2" gutterBottom>
<SafeMarkdown
markdown={aichatI18n.teacherOnboardingModal_aiChatBullet()}
/>
</BodyTwoText>
</Typography>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typography variant="body2" renders a <p> by default, but SafeMarkdown typically returns a <div> wrapper. This results in invalid HTML (<p><div>…</div></p>). Consider setting component="div" on this Typography (or remove the Typography wrapper and style the SafeMarkdown container) to keep the DOM valid.

Copilot uses AI. Check for mistakes.
Comment on lines +68 to +72
<Typography variant="body2" gutterBottom>
<SafeMarkdown
markdown={aichatI18n.teacherOnboardingModal_userViewBullet()}
/>
</BodyTwoText>
</Typography>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typography variant="body2" renders a <p> by default, but SafeMarkdown typically returns a <div> wrapper. This results in invalid HTML (<p><div>…</div></p>). Consider setting component="div" on this Typography (or remove the Typography wrapper and style the SafeMarkdown container) to keep the DOM valid.

Copilot uses AI. Check for mistakes.
Comment on lines +49 to +54
<Typography variant="body2" gutterBottom>
<SafeMarkdown
unwrapped
markdown={i18n.aiTeachingAssistantSettingsDescription()}
/>
</BodyTwoText>
</Typography>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typography variant="body2" renders a <p> by default. Since SafeMarkdown with unwrapped can still produce block-level elements (e.g., <p>, <ul>), wrapping it in a paragraph risks invalid nesting and unexpected spacing. Use component="div" for the wrapper Typography (or render SafeMarkdown without a Typography parent) to ensure valid markup for any markdown output.

Copilot uses AI. Check for mistakes.
Comment on lines +63 to 67
<Typography variant="body4" gutterBottom>
<div>
<strong>What changed:</strong>
</div>
<div>{commitDescription}</div>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typography variant="body4" renders a <p> by default, but it contains <div> children. This is invalid HTML (<div> inside <p>) and may affect layout/styling. Switch this Typography to component="div" (or replace the inner <div>s with inline elements) so the DOM structure is valid.

Copilot uses AI. Check for mistakes.
Comment on lines +47 to +51
<Typography variant="body2" gutterBottom>
<SafeMarkdown
markdown={aichatI18n.teacherOnboardingModal_instructionsBullet()}
/>
</BodyTwoText>
</Typography>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typography variant="body2" renders a <p> by default, but SafeMarkdown typically returns a <div> wrapper. This results in invalid HTML (<p><div>…</div></p>). Consider setting component="div" on this Typography (or remove the Typography wrapper and style the SafeMarkdown container) to keep the DOM valid.

Copilot uses AI. Check for mistakes.
Comment on lines +54 to +58
<Typography variant="body2" gutterBottom>
<SafeMarkdown
markdown={aichatI18n.teacherOnboardingModal_modelCustomizationBullet()}
/>
</BodyTwoText>
</Typography>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typography variant="body2" renders a <p> by default, but SafeMarkdown typically returns a <div> wrapper. This results in invalid HTML (<p><div>…</div></p>). Consider setting component="div" on this Typography (or remove the Typography wrapper and style the SafeMarkdown container) to keep the DOM valid.

Copilot uses AI. Check for mistakes.
Comment on lines 21 to +24
<label htmlFor={id}>
<BodyThreeText className={styles.fieldLabel}>
<StrongText>{label}</StrongText>
</BodyThreeText>
<Typography className={styles.fieldLabel} variant="body3" gutterBottom>
<Typography variant="strong">{label}</Typography>
</Typography>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This Typography is rendered inside a <label>, but variant="body3" maps to a <p> by default. A <label> should only contain phrasing content, and a <p> is not valid there. Set component="span" (and if you need block layout, use display="block"/CSS) to keep the label markup valid.

Copilot uses AI. Check for mistakes.
Comment on lines +75 to +77
<Typography className={style.optionTitle} variant="body2" gutterBottom>
<Typography variant="strong">{title}</Typography>
</Typography>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These Typography components are rendered inside a native <button>, but variant="body2" maps to a <p> by default, which is not valid button content (buttons should contain phrasing content). Use component="span" (and apply block display via CSS if needed) for typography within buttons.

Copilot uses AI. Check for mistakes.
<Typography
className={style.optionDescription}
variant="body3"
gutterBottom
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This description Typography is also inside a native <button>, and variant="body3" maps to a <p> by default. To avoid invalid button markup and inconsistent browser styling, render it as component="span" (and use CSS for layout/spacing rather than relying on <p> semantics).

Suggested change
gutterBottom
gutterBottom
component="span"

Copilot uses AI. Check for mistakes.
Comment on lines +72 to 76
className={moduleStyles.expandedContent}
variant="body3"
gutterBottom
>
<div>{expandedContentToDisplay}</div>
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Typography with variant="body3" will render a <p> by default, but it currently contains a <div> child (<div>{expandedContentToDisplay}</div>). This produces invalid HTML (a <div> inside a <p>) and can cause layout/accessibility quirks. Use component="div" on the wrapper Typography (or remove the inner <div> and render the content directly) so block content like <ul>/<div> is valid.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

@lfryemason lfryemason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, it would be great if you can be on deck to look at the eyes diffs when this merges

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants