Repository navigation
Edit: an open text edit stands down the Project-panel Clear redirect (#2227) - #2263
Conversation
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Guard Project Clear during text editing crates/ui-egui/src/menus/entries.rs, crates/ui-egui/src/menus/invoke.rs, crates/ui-egui/tests/it/ui_project_delete.rs |
The menu entry is disabled during an active text edit. Invoking the command in that state does not route to project deletion. The integration test checks that the composition, project, and text edit remain unchanged. |
Priority:
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix · Severity of issue fixed: Medium
Suggested reviewers: aiongg
Merge Risk: 
Minimal · up to 63f16
-
The change preserves the composition during text editing, with no unresolved merge-blocking risk identified.
Pre-merge checks: 
4
-
Full details: Title check
-
Explanation
The title states that an open text edit now stops the Project-panel Clear redirect. The raw summary confirms this: edit.clear is disabled during a text edit in entries.rs, and invoke.rs returns Value::Null in that state, plus a new test covers it. The title matches the main change. The title does not name the Render Queue path, but the PR objectives describe it as unchanged, so that omission is acceptable. The title's issue reference (
#2227) conflicts with the PR objectives, which name the PR as#2263and cite#2227as the linked issue. The title is accurate in substance.
Full details: Linked Issues check
-
Explanation
Issue
#2227requires the Project-panel Clear redirect to stand down during an open text edit, or to use delete confirmation.menus::invokenow returnsValue::Nullwithout deleting when the Project panel has focus andtext_editis active.entry_enabledalso disablesedit.clearin that state. The added integration test verifies that the composition, project, and text edit remain unchanged.
Full details: Out of Scope Changes check
-
Explanation
The changes are limited to the Project-panel
edit.clearenabled-state check, its matchinginvokeredirect, and a focused regression test. These changes directly implement and verify issue#2227. No unrelated behavior is identified.
-
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
…-panel Clear redirect (storytold#2227) (@SusieeTheLinuxUser) # Conflicts: # crates/ui-egui/src/menus.rs
…also with Project focused (storytold#2227) storytold#2263 made Edit ▸ Clear with the Project panel focused do nothing during a text edit, and greyed it out, so the composition being typed into isn't deleted. Main's stand-down rule from storytold#2096 handles every other Project-panel redirect another way: the redirect steps aside and the command acts on the edit. Clear now follows that one rule: during an edit it falls through to the engine's Clear, which deletes the selected text as it does from any other panel or through engine.execute. The composition survives, the edit stays open and the menu item stays enabled. With no edit open, Clear with Project focused still deletes the Project selection.
|
I recovered this topic from the closed integration batch #2284 onto upstream bc4b48f, preserving its batch follow-ups and contributor attribution. I have not opened a competing replacement PR or changed your branch; this is available for updating the existing PR. Original #2263 refreshed to current modules, plus batch fix 2168565: Clear deletes selected text while editing, rather than deleting the composition or becoming a no-op. Standalone CI verified, October 27: the full upstream CI gate passed on this exact recovery commit, independently of the other recovery branches. CI run. This includes formatting, strict workspace/all-target Clippy with warnings denied, workspace lib/bin/integration tests, GPU tests, doctests, PDF dependency checks, layering, asset checks, WebAssembly checks, and the unchanged-lockfile check. The test log records 3772 passing nextest tests and 233 passing GPU tests. The standard upstream configuration retains its 31 existing opt-in/ignored tests; no additional tests were disabled for this recovery. The fork's workflow-registration blocker is resolved. The recovery branch contains this topic only, based directly on bc4b48f; it does not require the other batch topics to pass CI. Its published commit is unchanged from the original recovery note. Normal upstream CI will still run when the author or a maintainer adopts it. |
|
Hi @SusieeTheLinuxUser, thanks for this PR! Most of the conflict comes from the shared module layout (#2491), which moved or split files this PR touches:
When you rebase, please also make sure it fits the other recent changes:
CI ( |
…torytold#2227) Edit > Clear follows panel focus: with the Project panel focused it redirects to project.delete, which removes the selection at once when nothing uses it. With a text edit open, that deletes the composition being typed into — the user is working in it — and undo restores the item but not the active composition. During a text edit the redirect stands down (Clear does nothing) and the Edit menu's Clear entry is disabled, mirroring how Deselect All stands down in storytold#2096. Co-Authored-By: GLM-5.3-Flash <noreply@z.ai>
7c21ba3 to
63f1698
Compare
|
Merged, thank you @SusieeTheLinuxUser! It landed on |
Fixes #2227
What was wrong
Edit ▸ Clear follows panel focus. With the Project panel focused, it redirects to
project.delete, which removes the Project selection straight away when nothing uses it (thedelete_items::guardprompt only opens for items compositions use). If a text edit was open in the canvas while the Project panel kept focus, Clear deleted the composition being typed into, without asking. Undo brought the item back but not the active composition.What changed
In
crates/ui-egui/src/menus/(split in #2491):invoke.rs,invoke: whileapp.session.state.text_editis open, the Project-paneledit.clearredirect stands down. It returnsOkand deletes nothing.entries.rs,entry_enabled: with the Project panel focused, the Clear entry is disabled during a text edit. This mirrors how Deselect All stands down in the [Bug Report] [EffectCraft] Deselect All doesn't work properly while a text layer is being edited (Cmd/Ctrl+Shift+A selects the text, F2 is dropped, and the command leaves the edit open) #2096 work.The Render Queue redirect and every other
edit.clearpath are unchanged.Tests
ui_project_delete::clear_with_the_project_focused_stands_down_during_a_text_edit. Setup: the active composition is selected in the Project panel, a text edit is open, and the Project panel has focus. It sends Clear throughmenus::invoke, the path the menu, the shortcut and the control channel share. It then checks that the composition survives, the project is unchanged and the text edit stays open.Run:
cargo test -p effectcraft-ui-egui --test it clear_with_the_project_focused_stands_downCounts
cargo test -p effectcraft-ui-egui(rebased onto origin/main @ 990fa66): lib 312 passed, 0 failed, 3 ignored. Integration: 604 passed, 0 failed, 12 ignored.cargo clippy -p effectcraft-ui-egui --all-targets -- -D warningsandcargo fmt --check: clean.Written by GLM-5.3-Flash in ZCode, then reviewed with Claude Code and by me (@SusieeTheLinuxUser) before submitting.
🤖 Generated with Claude Code
Summary by CodeRabbit