Skip to content

feat(slider): update Slider to the style configuration API - #1215

Merged
Kyle-Ye merged 10 commits into
mainfrom
feature/slider
Oct 25, 2026
Merged

Kyle-Ye merged 10 commits into
mainfrom
feature/slider

Conversation

@Kyle-Ye

@Kyle-Ye Kyle-Ye commented Oct 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Resolve Slider through SliderStyleConfiguration and automatic platform styles.
  • Add native slider controls, value labels, tick marks, and adjustable accessibility support.
  • Correct macOS labeled-content layout and update Slider API documentation.
  • Add shared Slider examples and UI snapshots for values, step labels, tint, and disabled states.

Closes #1154

Build the slider body from SliderStyleConfiguration and ResolvedSliderStyle.
Store slider marks, round the discrete value count, and add the SPI
initializer that takes a SliderStyleConfiguration.
- Add AccessibilityAdjustmentDirection and accessibilityAdjustableAction(_:)
- Add AccessibilityAdjustableModifier and AccessibilitySliderModifier
- Add accessibility value and set-value action helpers
- Apply AccessibilitySliderModifier in Slider
- Add SPI SliderStyle, SliderStyleConfiguration and View.sliderStyle(_:)
- Replace AnySliderStyle and SliderStyleKey with the style modifier system
- Add SPI SliderMark, SliderMarkBuilder and the Slider marks initializers
- Add SPI AutomaticSliderStyle and SliderStyle.automatic
@Kyle-Ye
Kyle-Ye requested a review from Mx-Iris as a code owner October 25, 2026 04:33
@Kyle-Ye

Kyle-Ye commented Oct 25, 2026

Copy link
Copy Markdown
Member Author

/uitest osui-iag update only-testing=OpenSwiftUIUITests/SliderUITests

@github-actions github-actions Bot added area: accessibility Accessibility APIs, settings, semantics, or behavior. area: example Example apps, previews, sample projects, screenshots, or demo assets. area: view View APIs, modifiers, AnyView, ForEach, DynamicView, and related behavior. type: feature New API, behavior, platform support, or user-facing capability. labels Oct 25, 2026
@tuist

tuist Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

🛠️ Tuist Run Report 🛠️

Tests 🧪

Scheme Status Ran test modules Commit
OpenSwiftUI ✅ 7 1de2dab1b

Builds 🔨

Scheme Status Duration Commit
OpenSwiftUI ✅ 1m 51s 1de2dab1b

@codecov

codecov Bot commented Oct 25, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 16.99605% with 210 lines in your changes missing coverage. Please review.
✅ Project coverage is 26.93%. Comparing base (b930e46) to head (f59fc66).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
...s/OpenSwiftUI/View/Control/Slider/SliderMark.swift 19.75% 65 Missing ⚠️
...urces/OpenSwiftUI/View/Control/Slider/Slider.swift 36.00% 48 Missing ⚠️
...tUI/Accessibility/AccessibilityConfiguration.swift 0.00% 42 Missing ⚠️
.../OpenSwiftUI/View/Control/Slider/SliderStyle.swift 0.00% 19 Missing ⚠️
.../Accessibility/AccessibilityAdjustableAction.swift 0.00% 11 Missing ⚠️
...tUI/View/Control/Slider/AutomaticSliderStyle.swift 0.00% 9 Missing ⚠️
...ftUI/View/Control/Slider/PlatformSliderStyle.swift 0.00% 7 Missing ⚠️
...UI/Accessibility/AccessibilityValueAdditions.swift 0.00% 4 Missing ⚠️
...nSwiftUI/View/Control/Slider/MenuSliderStyle.swift 0.00% 3 Missing ⚠️
Sources/OpenSwiftUI/View/MappedViews.swift 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1215      +/-   ##
==========================================
- Coverage   26.95%   26.93%   -0.03%     
==========================================
  Files         890      893       +3     
  Lines       65866    66058     +192     
==========================================
+ Hits        17756    17794      +38     
- Misses      48110    48264     +154     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Kyle-Ye
Kyle-Ye merged commit 875145a into main Oct 25, 2026
5 of 6 checks passed
@Kyle-Ye
Kyle-Ye deleted the feature/slider branch October 25, 2026 05:53
@github-actions github-actions Bot added the area: tests Test suites, UI tests, fixtures, snapshots, and test support code. label Oct 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: accessibility Accessibility APIs, settings, semantics, or behavior. area: example Example apps, previews, sample projects, screenshots, or demo assets. area: tests Test suites, UI tests, fixtures, snapshots, and test support code. area: view View APIs, modifiers, AnyView, ForEach, DynamicView, and related behavior. type: feature New API, behavior, platform support, or user-facing capability.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Slider to the style configuration API

1 participant