Add user dark mode toggle#2617
Closed
bell-kevin wants to merge 9 commits intoinstructure:masterfrom
Closed
Conversation
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
Add user dark mode toggle
Contributor
Author
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
ui/boot/index.jsto add a floating dark mode toggle button that appears afterDOMContentLoadedand toggles betweenEnable dark mode/Disable dark mode.canvas_theme_preferenceand restore logic on startup to reapply the chosen theme.setDarkModeStyle,applyDarkMode, andrenderDarkModeToggleto inject lightweight global dark CSS and to drive InstUI career-dark theme overrides vialoadCareerThemewhen dark mode is enabled.careertheme resources are not available.