Skip to content

fix: Time selection reliability - #22854

Merged
jeromelaban merged 1 commit into
masterfrom
dev/mazi/selectingtime
Mar 19, 2026
Merged

jeromelaban merged 1 commit into
masterfrom
dev/mazi/selectingtime

Conversation

@MartinZikmund

Copy link
Copy Markdown
Member

…croll events

Intermediate ViewChanged Balance calls (added for fast-scrolling virtualization) were firing SelectionChanged before scroll animations settled. This caused keyboard-driven selection (e.g. SelectItemByIndex) to proceed from stale scroll positions, accumulating drift over many key presses and making SelectingTimeSetsSelectedTime flaky on Android Skia.

GitHub Issue: closes #

PR Type:

What is the current behavior? 🤔

What is the new behavior? 🚀

PR Checklist ✅

Please check if your PR fulfills the following requirements:

Other information ℹ️

…croll events

Intermediate ViewChanged Balance calls (added for fast-scrolling
virtualization) were firing SelectionChanged before scroll animations
settled. This caused keyboard-driven selection (e.g. SelectItemByIndex)
to proceed from stale scroll positions, accumulating drift over many
key presses and making SelectingTimeSetsSelectedTime flaky on Android
Skia.

Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
Copilot AI review requested due to automatic review settings March 19, 2026 11:39

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.

Pull request overview

This PR improves LoopingSelector time selection reliability by preventing SelectionChanged from firing during intermediate ScrollViewer.ViewChanged updates, which previously could cause keyboard-driven selection flows to operate on transient scroll positions and drift over repeated inputs.

Changes:

  • Suppress selection updates while balancing during intermediate ViewChanged events by temporarily setting _skipSelectionChangeUntilFinalViewChanged.
  • Preserve the prior value of _skipSelectionChangeUntilFinalViewChanged via a try/finally to avoid leaking state across calls.
  • Expand inline documentation explaining the drift scenario and why selection changes are suppressed until the final event.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@unodevops

Copy link
Copy Markdown
Contributor

@unodevops

Copy link
Copy Markdown
Contributor

⚠️⚠️ The build 202512 has failed on Uno.UI - CI.

@jeromelaban
jeromelaban merged commit 434cb85 into master Mar 19, 2026
43 of 45 checks passed
@jeromelaban
jeromelaban deleted the dev/mazi/selectingtime branch March 19, 2026 17:35
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Apr 30, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants