Use sensible first-float window sizing#1073
Use sensible first-float window sizing#1073wieslawsoltes merged 3 commits intowieslawsoltes:masterfrom
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: cb2b53ce22
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
|
||
| private static double ResolveFloatingSize(double dockableSize, double ownerSize, double fallbackSize) | ||
| { | ||
| if (IsValidSize(dockableSize) && dockableSize > MinimumTrackedFloatingSize) |
There was a problem hiding this comment.
Avoid discarding persisted float sizes under 32px
The new ResolveFloatingSize threshold treats any tracked size <= 32 as uninitialized, so FloatDockable/FloatAllDockables now overwrite legitimate small persisted dimensions every time a dockable is floated again. In practice, if a user intentionally resizes a floating tool/document window to something narrow (for example 24px) and later docks then re-floats it, this code forces owner/default sizing instead of restoring the saved size, which is a regression from the previous NaN-only fallback behavior.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Addressed in 926f6bd0.
I narrowed the heuristic so we only treat clearly bogus initial tracked sizes as uninitialized by dropping the cutoff from 32 to 16. That preserves legitimate small persisted float sizes like 24x24 while still fixing the first-float tiny-window case.
I also added a regression test covering the preserved-small-size case:
FloatDockable_PreservesSmallTrackedDocumentBoundsAboveTinyThreshold
And re-ran the focused sizing tests.
Summary
Testing