LT-21720: Give unpositioned dialogs centered start positions and owners - #1053
Conversation
Assign the property table passed to UploadToWebonaryDlg to a field so its existing position restore, off-screen clamp, and save actually run, and pass the main window as owner when showing the dialog. Give DictionaryConfigurationManagerDlg a CenterParent start position and clamp its bounds back onto a screen in OnShown. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2dcc497 to
36daa0d
Compare
mark-sil
left a comment
There was a problem hiding this comment.
@mark-sil reviewed 24 files and all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on jasonleenaylor).
thejambi
left a comment
There was a problem hiding this comment.
@thejambi reviewed all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved (waiting on jasonleenaylor).
|
Based on my review of the changes, against some of the notes I had gathered about it -- this one especially should be verified, it may not handle multi-monitor setup well. |
|
Some Claude feedback based on my notes when looking into the issue so far. I wonder if yours would agree with this assessment? Head: 1. Top-level review comment (post as the review summary)
2. Inline —
|
Set CenterParent on ten dialogs that had no positioning code, and CenterScreen on the four FdoUi restore dialogs and the update chooser, which can be shown before any main window exists. Pass an explicit owner at the six ShowDialog call sites that had none, threading an owner parameter through DictionaryConfigurationImportController's DisplayView. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Recenter the Upload to Webonary dialog on its owner's screen in OnShown when the restored position is on a different monitor than the main window. Within-screen position memory is preserved. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
36daa0d to
5815ecc
Compare
thejambi
left a comment
There was a problem hiding this comment.
New changes look good!
@thejambi reviewed 1 file and all commit messages, and made 1 comment.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on jasonleenaylor).
Quick Summary
Partially addresses LT-21720 (remembered window locations misbehaving on multi-monitor setups).
UploadToWebonaryDlgposition persistence: its restore/clamp/save code null-checked aPropertyTableauto-property that the constructor never assigned, so it has been dead since it was written. The property is now a constructor-assigned field, and the dialog is shown with the main window as owner. Per review feedback,OnShownnow recenters the dialog on the owner's screen when the remembered position is on a different monitor, so a modal dialog is never stranded where the user isn't looking.DictionaryConfigurationManagerDlgaCenterParentstart position and clamp its bounds back onto a screen inOnShown— it previously had no positioning code and could open off-screen, leaving the app looking hung (one of the LT-21720 reports).CenterParenton ten (dictionary-configuration child dialogs, Webonary log viewer, the Gecko-hosting MGA/diagnostics/import-marker dialogs, semantic-domains chooser, respeller, concordance dialog) andCenterScreenon five that can be shown before any main window exists (the four FdoUi restore dialogs and the update chooser).ShowDialog()call sites that had none, threading an owner parameter throughDictionaryConfigurationImportController.DisplayView.This PR does not cover the dialogs that persist and restore positions of their own (
BaseGoDlgand its subclasses,ReallySimpleListChooser,InsertEntryDlg's registry restore,FwFindReplaceDlg, the sharedPersistencehelper, and similar) — several of the dialogs named in LT-21720 are in that family, which is follow-up work.CI-ready checklist
.github/commit-guidelines.md(subject ≤ 72 chars, no trailing punctuation; if body present, blank line then ≤ 80-char lines).Docs/workflows/ai-pr-workflow.mdand ranpr-preflightor the equivalent branch-readiness review before requesting review.Src/**folders touched, correspondingAGENTS.mdfiles are updated or explicitly confirmed still accurate.Notes for reviewers (optional)
WinForms' default
WindowsDefaultLocationleaves placement to the OS cascade, which on multi-monitor setups can land a dialog on the wrong screen or entirely off the visible area. Centering on an owner — or on a screen, for dialogs that can appear before any window exists — takes the OS out of the placement decision. The swept dialogs are behavior-neutral one-liners exceptDisplayView, whose new owner parameter has exactly one caller (updated in the same commit).Validation:
build.ps1 -SkipNativeclean;test.ps1onxWorksTestsfiltered to UploadToWebonary + DictionaryConfiguration, all passing after rebasing onto current main.🤖 Generated with Claude Code
This change is