Skip to content

Split uikit into core + M3 / foundation backends with slots - #21

Merged
rinekri merged 10 commits into
masterfrom
backend-split
Nov 9, 2026
Merged

rinekri merged 10 commits into
masterfrom
backend-split

Conversation

@rinekri

@rinekri rinekri commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

Builds on #20 (its commits are included) and replaces the all-or-nothing Material 3 removal with a choice of backend.

Modules

  • uikit-core: configurations, UikitConfiguration, shared state types (UikitSliderState, SelectableDates, DatePickerState, …), slot state classes, and the M3-free components (TextField, TextFieldArea, PageIndicator, shimmer).
  • uikit-components: Material 3 backend (same artifact id, so existing apps just bump the version).
  • uikit-components-foundation: the WIP: remove Material 3 and rewrite components from scratch #20 rewrite, no Material 3 or Accompanist.

Both backends share the package ru.kode.uikit.components and the same API. Depending on both fails with duplicate classes on purpose.

Slots

Checkbox.box, RadioButton.indicator, Button.loadingIndicator, ModalBottomSheet.dragHandle (showHandle deprecated), TextFieldDatePicker.title/headline, plus the existing slider thumb/track. Defaults are in Uikit*Defaults (UikitDatePickerDefaults.Title/.Headline for the date picker). A day-cell slot is not offered: Material 3's DatePicker has no hook for it.

Screenshots

The sample has a backend flavor dimension (material3, foundation) and both flavors share sample/src/test/snapshots.

  • verifyRoborazziMaterial3Debug: 17/17. The M3 goldens are byte-identical to the pre-split ones.
  • verifyRoborazziFoundationDebug: 17/17. The foundation backend ports Material 3 1.4.0's drawing and layout code (checkbox, radio, indeterminate spinner, slider track with thumb gap and stop dots, date picker layout, sheet scrim and window), with no Material 3 dependency.
  • The sheet test now gives its M3 Text an explicit colour, because only the M3 sheet provides M3's LocalContentColor. The M3 render is unchanged. This is listed under known differences in the CHANGELOG, together with the slider limits: the thumb gap comes from the configuration, and no step ticks are drawn.

Other

  • Version 0.3.0 (0.2.0 is already released), CHANGELOG, README "Choose a backend".
  • CI assembles all three library modules and verifies the screenshots for both backends (blocking).
  • Spotless excludes .claude/ (local worktrees).

Not for merge or release yet.

- uikit-core: configurations, shared state types, slot states and the
  M3-free components (TextField, TextFieldArea, PageIndicator, shimmer)
- uikit-components: Material3 backend restored from comp-preview, adapted
  to the core state types; renders byte-identically to the old goldens
- uikit-components-foundation: the foundation rewrite, no M3/Accompanist
- Slots: Checkbox.box, RadioButton.indicator, Button.loadingIndicator,
  ModalBottomSheet.dragHandle (showHandle deprecated)
- sample: backend flavor dimension sharing one set of goldens
- Version 0.3.0, CHANGELOG, README backend section, CI for all modules
Inset the track by half a thumb, pad to the 48dp touch size, draw the thumb gap with inside corners and the stop indicator, matching the Material3 backend screenshots.
@rinekri
rinekri marked this pull request as ready for review November 9, 2026 15:01
@rinekri
rinekri merged commit 9e63999 into master Nov 9, 2026
2 checks passed
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.

1 participant