Skip to content

Quick Search: work around a UI glitch - #1874

Merged
cyanzhong merged 1 commit into
mainfrom
develop
Nov 12, 2026
Merged

cyanzhong merged 1 commit into
mainfrom
develop

Conversation

@cyanzhong

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The deferred newDocument: handling bypasses the menu item's target and responder chain, potentially creating a standard document instead of invoking the validated handler.

1 open issue
What changed in this PR

This PR works around an incorrect animation origin when Quick Search creates the first document by deferring the New action until after palette dismissal.

Changes:

  • Adds an injectable menu-action handler to QuickSearchController, preserving normal dispatch by default.
  • Defers standard New execution to the main queue in the application-specific handler.
  • Extends activation tests to verify handler invocation for enabled actions and rejection of disabled actions.
File Description
MarkEditMac/​Sources/​Main/​Application/​AppDelegate+QuickSearch.swift Defers New to avoid the document animation glitch.
MarkEditMac/​Modules/​Tests/​QuickSearchMenuTests.swift Checks custom dispatch invocation and disabled-action rejection.
MarkEditMac/​Modules/​Sources/​QuickSearchUI/​QuickSearchController.swift Adds and invokes the configurable menu-action handler.

Review effort: Balanced

@cyanzhong
cyanzhong merged commit 3c9d2ea into main Nov 12, 2026
1 check passed
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.

2 participants