Repository navigation
Check Spelling: Enter and Escape close the dialog like Done (#14179) - #14328
Draft
TrevorBrown-dev wants to merge 1 commit into
Draft
TrevorBrown-dev wants to merge 1 commit into
TrevorBrown-dev wants to merge 1 commit into
Conversation
…d#14179) spelling_window now consumes Enter and Escape before its widgets and the canvas see them and runs Done (close_spelling), keeping every change made so far. Enter also runs Done while the focus is in Change To (it does not run Change); Enter on a focused button keeps that button's action. Nothing is consumed while a modal dialog sits above. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Model-Effort: Opus 5.5 drove; Opus 5.5 briefed; Sonnet 5.5 wrote at medium
Contributor
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
This branch has not been deployed
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.
Fixes #14179. With Check Spelling open, Enter and Escape did nothing; now both run Done (the dialog closes and the changes made so far stay), and Enter in Change To does not run Change.
Fix
crates/ui-egui/src/panels/type_panels_ui.rs:spelling_windowconsumes Enter and Escape before the widgets and the canvas see them (only while no modal dialog is above) and runs the samedoneaction as the Done button (close_spelling). Enter on a focused button keeps that button's own action.crates/ui-egui/src/panels.rs: one line,#[cfg(test)] mod type_spell_keys_tests;, next totype_flyout_tests(outside "Where": needed to declare the new test file).Tab order is not measured and is unchanged.
Verified
crates/ui-egui/src/panels/type_spell_keys_tests.rs, red on main:Escape closed Check Spellingassertion fails (dialog still open).Enter closed Check Spellingassertion fails (dialog still open).-p photocraft-ui-egui --lib spell: 19 passed. clippy--all-targets -D warningsand fmt are clean. No local font failure hit this filter.🤖 Generated with Claude Code -- driver Opus 5.5, implementation Sonnet 5.5 (effort medium)