test: Verify Slider thumb reaches end of track at Value=Maximum=1#23025
Open
MartinZikmund wants to merge 1 commit intomasterfrom
Open
test: Verify Slider thumb reaches end of track at Value=Maximum=1#23025MartinZikmund wants to merge 1 commit intomasterfrom
MartinZikmund wants to merge 1 commit intomasterfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new Uno UI runtime test to guard against regressions where a Slider configured with a fractional range (Minimum=0, Maximum=1) fails to move its thumb fully to the end when Value=Maximum, as reported in #12401.
Changes:
- Introduces a dedicated runtime test that instantiates a known-width horizontal
SliderwithMaximum=1and asserts the decrease-rect spans the full trackable length (within 1 px). - Adds a small
Slidersubclass to capture theHorizontalThumbandHorizontalDecreaseRecttemplate parts for measurement assertions.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Slider.ThumbAtMaximum_12401.cs
Show resolved
Hide resolved
Contributor
|
🤖 Your WebAssembly Skia Sample App stage site is ready! Visit it here: https://unowasmprstaging.z20.web.core.windows.net/pr-23025/wasm-skia-net9/index.html |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #12401
Summary
Issue #12401 reports that on the Gallery
InfoBadgeOpacitySlider(withMinimum=0 / Maximum=1), the thumb does not travel to the right edge when the value is at the maximum. This test exercises the same fractional-range configuration on a horizontalSliderof known width and asserts that theHorizontalDecreaseRectspans the full trackable length (slider width − thumb width) within 1 px.The test passes on current master (Skia Desktop target) — the thumb reaches the end as expected.
Test(s) added
src/Uno.UI.RuntimeTests/Tests/Windows_UI_Xaml_Controls/Given_Slider.ThumbAtMaximum_12401.cs→Given_Slider_ThumbAtMaximum_12401.When_Value_At_Maximum_One_Thumb_Reaches_End_12401Notes
The issue was reported on WebAssembly, Android, iOS, and Skia GTK. Runtime tests run on Skia only — the fix (or divergence) should still be verified on native WASM/Android/iOS targets where template measurement/arrange differs.