Skip to content

Fix dark mode in the dev test server - #45

Merged
dqnykamp merged 1 commit into
Doenet:mainfrom
dqnykamp:dev-server-dark-mode
Jul 13, 2026
Merged

Fix dark mode in the dev test server#45
dqnykamp merged 1 commit into
Doenet:mainfrom
dqnykamp:dev-server-dark-mode

Conversation

@dqnykamp

Copy link
Copy Markdown
Member

Summary

Completes the dark-mode support started in #32 for the dev test server, which had two gaps. All changes are dev-only (under dev/); nothing shipped under src/ changes.

Embedded documents rendered black-on-black

dev/testActivity.json pinned DoenetML 0.7.4, so each embedded DoenetViewer iframe loaded a @doenet/standalone bundle that predates dark mode. The iframe wrapper darkened the iframe body, but the document's own text stayed in light-mode colors → black-on-black.

Bumped all documents to 0.7.20-dev.332 — the latest dev build, which includes the dark-mode work and matches the installed @doenet/doenetml-iframe@0.7.20-dev.332. (The stable 0.7.20 release predates the dark-mode work, so it is not sufficient.)

Dev harness chrome stayed light

dev/App.tsx now themes the harness chrome to follow the selected darkMode:

  • The header box and its controls track the resolved theme instead of being hardcoded light.
  • The page backdrop is synced to the viewer's dark --canvas (#121212) so the area around/below the activities matches instead of showing a lighter black.
  • The "show/hide controls" and "Reset" buttons are pinned to the resolved selection. dev/index.css keys <button> backgrounds off the OS prefers-color-scheme, which drifted out of sync with the selection (white background under a dark selection → white-on-white).

🤖 Generated with Claude Code

The dev harness did not fully honor dark mode:

- dev/testActivity.json pinned DoenetML 0.7.4, so each embedded
  DoenetViewer loaded a @doenet/standalone bundle that predates dark
  mode. The iframe body was darkened but the document text stayed in
  light-mode colors (black-on-black). Bump to 0.7.20-dev.332, the
  latest dev build, which includes dark-mode support and matches the
  installed @doenet/doenetml-iframe. The stable 0.7.20 release predates
  the dark-mode work, so it is not sufficient.

- dev/App.tsx: theme the harness chrome to follow the selected darkMode
  instead of being hardcoded light. Theme the header box and controls,
  sync the page backdrop to the viewer's --canvas color so the area
  around the activities matches, and pin the chrome buttons' colors to
  the selection (dev/index.css keys button backgrounds off the OS
  prefers-color-scheme, which drifted out of sync and produced
  white-on-white).

Dev-only; no changes to shipped code under src/.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dqnykamp
dqnykamp merged commit aea4428 into Doenet:main Jul 13, 2026
4 checks passed
@dqnykamp
dqnykamp deleted the dev-server-dark-mode branch July 13, 2026 17:38
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.

1 participant