Skip to content

Implement SLDS 2 Cosmos theme with dark mode support#1752

Open
paustint wants to merge 5 commits into
mainfrom
feat/slds-2
Open

Implement SLDS 2 Cosmos theme with dark mode support#1752
paustint wants to merge 5 commits into
mainfrom
feat/slds-2

Conversation

@paustint
Copy link
Copy Markdown
Contributor

@paustint paustint commented May 30, 2026

Introduce the SLDS 2 Cosmos theme with support for dark mode. Update styles and configurations to align with the new theme, ensuring a cohesive user experience across the application. Adjustments include changes to color schemes and the integration of new design tokens.

image image

Copilot AI review requested due to automatic review settings May 30, 2026 19:09
Copy link
Copy Markdown
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

Adopts SLDS 2 (Cosmos) as the design system across all Jetstream apps, adds a Light/Dark/Match-Device color-scheme preference (per-user via Jotai/localforage in the main app/desktop/canvas, and via chrome.storage in the browser extension), and replaces app-level main.scss files plus inline SCSS token references with a shared CSS library (@jetstream/ui-styles/main.css) that uses native CSS nesting and --slds-g-* design tokens.

Changes:

  • Swap SLDS 1 CSS for @salesforce-ux/design-system-2/dist/css/bundled/slds2.cosmos.css in every app entry, remove sass/sass-loader, and consolidate styles into libs/shared/ui-styles/src/main.css; data-table styles ported to native CSS and re-themed against SLDS 2 tokens / slds-color-scheme--* body classes.
  • Introduce ColorScheme type, ThemeApplier/ExtensionThemeApplier to toggle slds-color-scheme--{light,dark,system} on body (or scoped container), add Theme menu items in HeaderNavbar and a Theme select in the extension popup, plus a MonacoEditor/MonacoDiffEditor wrapper that derives Monaco theme from the same preference.
  • Replace hard-coded surface/border/text colors throughout components with var(--slds-g-color-*) tokens, add slds-icon_container class and icon-name attribute for SLDS 2 icon theming, and make QueryHistory embedded to share a parent button group.

Reviewed changes

Copilot reviewed 87 out of 89 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json, pnpm-lock.yaml, tsconfig.base.json Add design-system-2 dep, drop sass/sass-loader, map @jetstream/ui-styles/main.css.
libs/shared/ui-styles/* New shared CSS library replacing per-app SCSS.
libs/shared/ui-core/src/app/ThemeApplier.tsx, MonacoEditor.tsx, HeaderNavbar.tsx, index.ts Theme application, Monaco theme wrapper, theme menu items.
libs/shared/ui-core/src/{record,query,orgs,mass-update-records,AppHome}/* Switch to MonacoEditor wrapper, use SLDS card class, token-based colors, icon container additions.
libs/shared/ui-app-state/src/lib/ui-app-state.ts Default new local preferences colorScheme: 'light'.
libs/types/src/lib/types.ts Add ColorScheme type and field on UserProfilePreferences.
libs/ui/src/lib/{data-table,popover,form/context-menu,widgets,layout}/* RDG theming via body scheme classes, popover/menu/icon updates, token-based colors.
libs/features/{query,salesforce-api,manage-permissions,load-records,formula-evaluator,deploy,debug-log-viewer,create-object-and-fields,anon-apex}/* Replace @monaco-editor/react direct usage with MonacoEditor, swap hard-coded colors for tokens, minor button/badge tweaks.
libs/icon-factory/src/lib/icon-factory.tsx + new icons Register ColorSwatch, DesktopAndPhone, LightBulb utility icons for theme menu.
apps/jetstream{,-desktop-client,-canvas}/* Adopt SLDS 2 CSS, mount ThemeApplier, initial slds-color-scheme--light body class, drop per-app main.scss.
apps/jetstream-web-extension/* Extension colorScheme storage, ExtensionThemeApplier, popup theme select, content-script scoped theming + PortalProvider, inverse logo.
apps/landing/* Convert index.scssindex.css and SCSS comments → CSS comments.
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

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

Comment thread libs/features/salesforce-api/src/SalesforceApiRequest.tsx Outdated
Copilot AI review requested due to automatic review settings May 31, 2026 14:19
Copy link
Copy Markdown
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copilot AI review requested due to automatic review settings May 31, 2026 16:36
@socket-security
Copy link
Copy Markdown

socket-security Bot commented May 31, 2026

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @react-email/ui is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: package.jsonnpm/@react-email/ui@6.4.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@react-email/ui@6.4.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm js-yaml is 85.0% likely obfuscated

Confidence: 0.85

Location: Package overview

From: package.jsonnpm/js-yaml@4.2.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/js-yaml@4.2.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

Copy link
Copy Markdown
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

Copilot reviewed 99 out of 101 changed files in this pull request and generated 1 comment.

Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (1)

libs/shared/ui-styles/src/main.css:100

  • Both .bg-color-gray-light and .bg-color-gray-dark reference the same CSS variable (--slds-g-color-neutral-base-95), only differing in the fallback. As soon as the SLDS 2 token is defined (the normal case when the stylesheet is loaded), the two classes resolve to the same color and the visual distinction between "gray-light" and "gray-dark" that existed in the previous SCSS ($color-gray-3 vs $color-background-dark) is lost. .bg-color-gray-dark should map to a darker neutral token (e.g. --slds-g-color-neutral-base-80 or similar) so the two utility classes stay visually distinct in both light and dark schemes.

Comment thread apps/jetstream-web-extension/src/utils/extension.store.ts Outdated
Copilot AI review requested due to automatic review settings June 1, 2026 13:34
Copy link
Copy Markdown
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.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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