Skip to content

Experimental Changes to Avalonia#4562

Draft
taooceros wants to merge 5 commits into
avalonia-migration-minimalfrom
avalonia-last-query-mode
Draft

Experimental Changes to Avalonia#4562
taooceros wants to merge 5 commits into
avalonia-migration-minimalfrom
avalonia-last-query-mode

Conversation

@taooceros

@taooceros taooceros commented Jul 5, 2026

Copy link
Copy Markdown
Member

Summary

  • honor Settings.LastQueryMode in Avalonia MainViewModel.Show() / Hide() instead of always clearing QueryText
  • keep query text mutations hidden from the user: hide before Empty/action-keyword reset/rewrite, and stage show while the window is transparent
  • fix the remaining visible selection motion by making QueryTextFocusRequest own the first visible show: Show() / ShowWithInjectedQuery(...) now raise the focus request before MainWindowVisibility = true, so the IsVisible binding cannot reveal the window before staging
  • for hidden-window shows, force the TextBox.Text target to the ViewModel query text, wait until DispatcherPriority.ContextIdle before applying focus/selection, then reveal at render priority
  • for LastQueryMode.Selected, apply the pre-hide select-all request while MainWindowVisibility is still true, then hide; next show uses focus-only mode when selection is already prepared
  • keep selection/caret updates in the existing QueryTextFocusRequest path; no DWM cloak is used
  • add focused Avalonia ViewModel tests for LastQueryMode behavior plus show/hide visibility ordering

Verification

  • dotnet test Flow.Launcher.Test/Flow.Launcher.Test.csproj --no-restore --filter FullyQualifiedName~Flow.Launcher.Test.Avalonia.MainViewModelLastQueryModeTest
    • Passed: 10, Failed: 0, Skipped: 0
  • dotnet build Flow.Launcher.Avalonia/Flow.Launcher.Avalonia.csproj -c Debug --no-restore
    • Build succeeded: 12 warnings, 0 errors

@github-actions github-actions Bot added this to the 2.2.0 milestone Jul 5, 2026
@taooceros taooceros changed the title Honor LastQueryMode in Avalonia Experimental Changes to Avalonia Jul 5, 2026
@taooceros taooceros force-pushed the avalonia-last-query-mode branch 6 times, most recently from 8209c38 to f787603 Compare July 5, 2026 22:52
@taooceros taooceros force-pushed the avalonia-migration-minimal branch from cd86075 to 3e7be8e Compare July 5, 2026 22:54
@taooceros taooceros force-pushed the avalonia-last-query-mode branch from f787603 to 7640806 Compare July 5, 2026 22:54
@taooceros taooceros force-pushed the avalonia-migration-minimal branch from 3e7be8e to 88ea811 Compare July 6, 2026 04:03
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