Repository navigation
Key declarations come from metaclass_registry - #314
Merged
Merged
Conversation
KeyDeclarationType, KeyInvocation, KeyTitle and KeyDeclaration live in metaclass_registry.key_declarations (metaclass-registry #14), so a client without Textual declares actions with their keys. EditingMode and VimMode subclass its InputMode and ModalInputMode, which hold which mode a key belongs to; the engine behaviour stays here. Every importer is repointed. bindings_for, Textual's projection of a declaration into bindings, stays here as BindingDeclaration, which DOM key families and NavigationCommand use. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016gZLdupVQyBzHTmHBC9Cyn
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.
Key declarations now come from
metaclass_registry.key_declarations(OpenHCSDev/metaclass-registry#14), and Textual's copy is deleted. A client without Textual (the Qt client) can declare Toad's actions together with their keys.textual/keys.py: KeyDeclarationType, KeyInvocation, KeyTitle and KeyDeclaration are gone (-120 lines). Their abstractbindings_for, Textual's projection of a declaration into bindings, stays here asBindingDeclaration. DOM key families and NavigationCommand use it.EditingMode(InputMode)andVimMode(EditingMode, ModalInputMode): which mode a key belongs to now lives in the shared module, and the engine behaviour (bindings, cursor shape, document edits) stays in_editing.py.modalmoved to the identity classes.Checks:
pytestover the binding, keymap, key, navigation and text_area tests gives 447 passed and 3 failed. The same 3test_editor_statefailures happen on unchanged main (/home/ts/wt/claude-a-textual-base).🤖 Generated with Claude Code
https://claude.ai/code/session_016gZLdupVQyBzHTmHBC9Cyn