Skip to content

test: Verify Slider thumb reaches end of track at Value=Maximum=1#23025

Open
MartinZikmund wants to merge 1 commit intomasterfrom
dev/mazi/repro/12401
Open

test: Verify Slider thumb reaches end of track at Value=Maximum=1#23025
MartinZikmund wants to merge 1 commit intomasterfrom
dev/mazi/repro/12401

Conversation

@MartinZikmund
Copy link
Copy Markdown
Member

Closes #12401

Summary

Issue #12401 reports that on the Gallery InfoBadge Opacity Slider (with Minimum=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 horizontal Slider of known width and asserts that the HorizontalDecreaseRect spans 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.csGiven_Slider_ThumbAtMaximum_12401.When_Value_At_Maximum_One_Thumb_Reaches_End_12401

Notes

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.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 Slider with Maximum=1 and asserts the decrease-rect spans the full trackable length (within 1 px).
  • Adds a small Slider subclass to capture the HorizontalThumb and HorizontalDecreaseRect template parts for measurement assertions.

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

@unodevops
Copy link
Copy Markdown
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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Gallery][Wasm/Android/iOS/Skia.Gtk]Infobadge- Slider thumb not going to the end for Opacity max 1.

3 participants