Skip to content

feat(config): add select_after_create option for shape and text creation - #37

Merged
shadowmkj merged 3 commits into
mainfrom
feat/config-select-after-create
Nov 14, 2026
Merged

shadowmkj merged 3 commits into
mainfrom
feat/config-select-after-create

Conversation

@shadowmkj

Copy link
Copy Markdown
Owner

Summary

This PR introduces a new configuration option, select_after_create, allowing users to control whether newly created shapes and text elements are automatically selected. It updates the Rust backend configuration engine, Lua generator/parser, core input routers, and provides full UI toggle support in the settings modal.

Key Changes

  • Configuration & Backend: Added select_after_create (defaulting to true) to the Rust AppOptions struct, Lua configuration evaluator, and Lua script generator.
  • Frontend Core Logic: Updated PointerRouter (for shapes) and textCommit (for text elements) to conditionally select newly created items based on the configuration setting.
  • UI & Settings: Added an "Auto-Select Created Elements" toggle switch under the general settings panel, preventing switch compression and ensuring clean alignment.
  • Testing: Added unit tests for Lua script evaluation/generation, general settings UI interactions, text commit behavior, and pointer routing options.

Verification & Testing

  • Ran unit tests for Lua config engine (cargo test) to ensure round-trip correctness of select_after_create.
  • Ran frontend test suite (vitest) verifying GeneralTab, SettingsModal, textCommit, and PointerRouter handle the new configuration correctly when toggled.

@shadowmkj
shadowmkj merged commit 3ef6ece into main Nov 14, 2026
2 checks passed
@shadowmkj
shadowmkj deleted the feat/config-select-after-create branch November 14, 2026 15:01
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