Repository navigation
Add settings for CodeMirror themes and keybindings - #216
Merged
Merged
Conversation
Users can now choose a System, Light, or Dark CodeMirror theme and switch between Standard, Vim, and Emacs keybindings. These preferences persist and synchronize across tabs, while documents remain read-only in every keyboard mode. Keep application settings, their panel, and persistence in the standalone app, which is the only consumer of the CodeMirror preferences. The reusable QueryGraph renderer instead accepts its animation speed explicitly and provides a generic controls slot for host UI. This avoids imposing application state and local-storage behavior on library embedders. The underlying theme setting is intentionally named `theme` so it can eventually style the full application, although the UI currently labels it "CodeMirror theme". System mode follows live browser color-scheme changes, and dark mode uses One Dark. Semantic theme colors keep search controls and linked ranges legible while allowing future themes to provide their own palette. Reconfigure theme and keyboard extensions through CodeMirror compartments instead of recreating the editor. This preserves selection, scrolling, folds, search state, and mode-specific keybinding state when preferences change. Reject document-changing transactions because the third-party modes do not consistently honor CodeMirror's read-only facet. Review consideration: * Do not add a React Flow integration test solely for the direct `additionalControls` and `animationSpeed` prop forwarding. The standalone production build verifies their composition, while focused tests cover animation-duration resolution and the complete settings panel.
vogelsgesang
force-pushed
the
codemirror-settings
branch
from
October 8, 2026 23:26
21424bd to
5aae5cf
Compare
vogelsgesang
commented
Oct 8, 2026
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.
Users can now choose a CodeMirror theme (Light, Dark) and CodeMirror key
bindings (Vim, Emacs).
Currently, the theming option only affects CodeMirror. In the future, we
want to support theming the full application via this setting. In
preparation for that, the underlying setting is already named
theme.while labeling it as "CodeMirror theme" until that broader support exists.
Reconfigure theme and keyboard extensions through CodeMirror compartments
instead of recreating the editor. This preserves selection, scrolling,
folds, search state, and mode-specific keybinding state when preferences
change. Reject document-changing transactions because the third-party modes
do not consistently honor CodeMirror's read-only facet.