Skip to content

Add user dark mode toggle#2617

Closed
bell-kevin wants to merge 9 commits intoinstructure:masterfrom
bell-kevin:master
Closed

Add user dark mode toggle#2617
bell-kevin wants to merge 9 commits intoinstructure:masterfrom
bell-kevin:master

Conversation

@bell-kevin
Copy link
Copy Markdown
Contributor

Motivation

  • Provide a simple, user-facing dark mode option for the app shell so non-InstUI parts are readable in dark palettes.
  • Persist the user preference across page loads so toggling dark mode is a one-time action for users.

Description

  • Updated ui/boot/index.js to add a floating dark mode toggle button that appears after DOMContentLoaded and toggles between Enable dark mode / Disable dark mode.
  • Added localStorage persistence using the key canvas_theme_preference and restore logic on startup to reapply the chosen theme.
  • Added setDarkModeStyle, applyDarkMode, and renderDarkModeToggle to inject lightweight global dark CSS and to drive InstUI career-dark theme overrides via loadCareerTheme when dark mode is enabled.
  • Scoped changes to only runtime JS so existing stylesheets are not modified; the implementation falls back safely when career theme resources are not available.

Adds a floating toggle that enables a dark palette

and persists the preference in localStorage.

refs none

flag=none

test plan:

- enable dark mode with the new toggle

- refresh and verify preference persists
@bell-kevin
Copy link
Copy Markdown
Contributor Author

#2512

Retry install after clearing yarn cache when package\narchives are corrupt in CI. This reduces flaky shard\nfailures unrelated to code changes.\n\nrefs none\nflag=none\n\ntest plan:\n- ruby -e "require 'yaml'; YAML.load_file('.github/workflows/frontend.yml')"
Retry frontend yarn install after cache corruption
Retry yarn install up to 3 times after cache cleanup and\nclear fake timers in vitest teardown to avoid post-test\ndocument access errors.\n\nrefs NO-JIRA\nflag=none\n\ntest plan:\n- ruby -e "require 'yaml'; YAML.load_file('.github/workflows/frontend.yml')"\n- yarn test ui/features/assignments_show_student/react/components/AttemptType/__tests__/FilePreview.test.jsx
…yarn-install

Harden frontend CI install retries and flush fake timers in Vitest teardown
@bell-kevin bell-kevin closed this Apr 15, 2026
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