fix crash on windows when resize browser to specific width#96170
fix crash on windows when resize browser to specific width#96170apeyada wants to merge 2 commits into
Conversation
|
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9a9128314a
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| + if (settledPair) { | ||
| + if (size === settledPair[0] || size === settledPair[1]) { | ||
| + return settledPair[0]; |
There was a problem hiding this comment.
Clear the latch when the scrollbar is gone
In web classic-scrollbar lists after an oscillation is detected, this branch returns the smaller width for both members of the latched pair. If the list contents later shrink or row wrapping changes so the scrollbar legitimately disappears without a window resize, the DOM will keep measuring the larger member of the pair, but boundedSize remains pinned to the smaller value until some third width is observed. That leaves FlashList laid out as if a scrollbar still exists, causing a persistent right-side gap or even an unnecessary scrollbar after filtering/removing items.
Useful? React with 👍 / 👎.
|
@aimane-chnaif Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b270e546fc
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| +const BOUNDED_SIZE_HISTORY_LENGTH = 8; | ||
| +// Number of times the size must flip between the two values before it counts as an oscillation. | ||
| +// A resize drag sweeps through fresh values and never returns to a previous one, so it never flips. | ||
| +const MIN_OSCILLATION_FLIPS = 2; |
There was a problem hiding this comment.
Require another flip before latching scrollbar widths
With MIN_OSCILLATION_FLIPS = 2, the detector latches after a single A -> B -> A excursion. On web with classic scrollbars, a transient content/filter/loading change can make the scrollbar appear once and then disappear without any oscillation; this now creates scrollbarOscillationPair and immediately pins the current no-scrollbar measurement to the smaller scrollbar width until some third width is observed. Requiring at least one more flip, or otherwise distinguishing one-off scrollbar changes from repeated ping-pong, would avoid leaving these lists laid out as if a scrollbar still exists.
Useful? React with 👍 / 👎.
Explanation of Change
Fixed Issues
$ #95719
PROPOSAL: #95719 (comment)
Tests
Offline tests
Same as Tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari