Skip to content

Compose: Migrate DaxSlider - #9753

Merged
0nko merged 5 commits into
developfrom
feature/ondrej/migrate-slider-to-compose
Sep 11, 2026
Merged

Compose: Migrate DaxSlider#9753
0nko merged 5 commits into
developfrom
feature/ondrej/migrate-slider-to-compose

Conversation

@0nko

@0nko 0nko commented Sep 9, 2026

Copy link
Copy Markdown
Member

Task/Issue URL: https://app.asana.com/1/137249556945/project/1207418217763355/task/1211670072079719?focus=true

Description

Adds the Compose DaxSlider to the ADS.

Also adds the NoRawM3SliderUsage lint rule (errors on raw Material3 Slider outside the design-system modules; the legacy View com.google.android.material.slider.Slider is untouched) and a showcase in the ADS internal catalog.

Steps to test this PR

ADS catalog

  • Open Settings → "Android Design System Preview" → Interactive tab
  • Scroll to the Slider section
  • Verify the VIEW label above the existing Material slider, and a COMPOSE label above three DaxSlider rows
  • Verify the Compose rows are: a continuous slider at ~30%, a stepped slider (70–170, 9 steps) at 100, and a disabled slider at ~30%
  • Drag the first two sliders and verify the thumb follows the drag, the stepped one snaps between steps
  • Verify the disabled slider is dimmed and does not respond to drags
  • Confirm the above in both light and dark themes

Note

Low Risk
New design-system component and lint enforcement only; no production feature flows or security-sensitive logic changed.

Overview
Introduces DaxSlider, a Compose design-system slider that wraps Material3 Slider with DuckDuckGo theme colors, a custom thumb, track height from tokens, and no value labels, ticks, or stop indicators. It supports continuous and stepped ranges, disabled state (dimmed via alpha), and onValueChangeFinished.

The ADS internal catalog Slider section now shows the legacy View Material Slider and a COMPOSE block with three interactive DaxSlider examples (continuous, stepped 70–170, disabled), wired through SliderComponentViewHolder with theme support.

Adds NoRawM3SliderUsage lint (error on androidx.compose.material3.Slider outside design-system modules; View com.google.android.material.slider.Slider unchanged), registered in DuckDuckGoIssueRegistry, with unit tests.

Reviewed by Cursor Bugbot for commit 041f2e7. Bugbot is set up for automated code reviews on this repo. Configure here.

@mikescamell mikescamell self-assigned this Sep 9, 2026

@mikescamell mikescamell 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.

A few Compose API suggestions.

0nko and others added 2 commits September 9, 2026 18:17
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…rate-slider-to-compose

# Conflicts:
#	android-design-system/design-system-internal/src/main/java/com/duckduckgo/common/ui/internal/ui/component/ComponentViewHolder.kt
@0nko

0nko commented Sep 9, 2026

Copy link
Copy Markdown
Member Author

Thanks @mikescamell! I've addressed all your comments.

@mikescamell mikescamell 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.

LGTM! Nice work

@0nko
0nko added this pull request to the merge queue Sep 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Sep 10, 2026
@0nko
0nko added this pull request to the merge queue Sep 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Sep 10, 2026
@0nko
0nko added this pull request to the merge queue Sep 10, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to no response for status checks Sep 10, 2026
@0nko
0nko added this pull request to the merge queue Sep 11, 2026
Merged via the queue into develop with commit d0d49bb Sep 11, 2026
21 checks passed
@0nko
0nko deleted the feature/ondrej/migrate-slider-to-compose branch September 11, 2026 13:53
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.

2 participants