fix: add a visible theme toggle to the viewer#81
Merged
Conversation
Adds spec 012 covering expand/collapse node shaping with anchor semantics, no global re-layout, affordance indicator, and reset. Portability of shaped views is deferred to spec 013 (#77).
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.
Closes #80
What changed
This adds a visible dark/light theme toggle to the shared viewer controls so embedded deployments such as Cardano Knowledge Maps expose an in-page way to switch themes.
The change keeps the project aligned with the constitution:
document.documentElement?theme=or persisted preference so the page does not flash in the wrong theme before Halogen mountsImplementation notes
themeto viewer state plus aToggleThemeactionlocalStorageFFI.Themeand extendedFFI.UrlwithgetThemeParam/setThemeParamVerification
nix develop --quiet -c just testnix develop --quiet -c just bundle-lib.theme-toggle-btndata-themeand updates?theme=?theme=darkshows☀with titleSwitch to light themeReviewer focus
automode in the UI