Skip to content

chore(divider): remove ConstraintLayout dependency - #2166

Open
soulcramer wants to merge 3 commits into
mainfrom
chore/remove-constraint-layout
Open

chore(divider): remove ConstraintLayout dependency#2166
soulcramer wants to merge 3 commits into
mainfrom
chore/remove-constraint-layout

Conversation

@soulcramer

Copy link
Copy Markdown
Collaborator

📋 Changes

  • Replaces the ConstraintLayout-based label layout in Divider with Row/Column + weight.
  • The alignment-side line is fixed at 40.dp; the other side uses weight(1f) with a 40.dp minimum; the label uses weight(1f, fill = false). Public API, enums, and no-label paths are unchanged.
  • Removes the constraintlayout dependency from spark/build.gradle.kts and its transitive View-system tail (appcompat, fragment, drawerlayout, viewpager, emoji2, ...) from the runtime classpath.

Adds two new Paparazzi cases to DividerScreenshot for the empty-label and oversized-label edge cases that first motivated the ConstraintLayout layout in #1208.

🤔 Context

constraintlayout is the last Android-only dependency in the spark module. Removing it is a prerequisite for the KMP extraction tracked in #1928.

✅ Checklist

  • I have reviewed the submitted code.
  • I have tested on a phone device/emulator.

@soulcramer soulcramer added this to the KMP milestone Aug 14, 2026
@soulcramer soulcramer self-assigned this Aug 14, 2026
@soulcramer soulcramer added enhancement New feature or request component Related to a component labels Aug 14, 2026
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

🚨 UI regression detected! Checkout the paparazzi-delta artifact.
If these changes are expected, you can either:

  • manually run the gradlew cleanRecordPaparazziRelease and commit the new golden images
  • or ask @spark-ui-bot paparazzi golden images in this PR

@github-actions

This comment has been minimized.

@github-actions

This comment has been minimized.

soulcramer and others added 2 commits August 14, 2026 21:18
The labelled divider was the only ConstraintLayout consumer in spark.
ConstraintLayout is Android-only and blocks making the module KMP
compatible.

Reimplement the label layout with Row/Column + weight: the alignment
side line gets a fixed 40.dp width, the other side weight(1f) with a
40.dp minimum, and the label a weight(1f, fill = false) so it yields
space back to the lines. This keeps the public API, enums, and the
no-label paths unchanged, and matches the previous output pixel for
pixel (Paparazzi passed without re-recording).

Removing the dependency also drops its transitive View-system tail
(appcompat, fragment, drawerlayout, viewpager, emoji2, ...) from the
runtime classpath.

Add empty-label and oversized-label screenshot cases to guard the two
regressions that first motivated the ConstraintLayout layout (#1208).
@soulcramer
soulcramer marked this pull request as ready for review August 14, 2026 19:20
@soulcramer
soulcramer requested review from a team and SimonMarquis as code owners August 14, 2026 19:20
@soulcramer
soulcramer force-pushed the chore/remove-constraint-layout branch from 8ac4be6 to d221fec Compare August 14, 2026 19:20

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

The divider seems to not extend like we want...

@soulcramer soulcramer added the LLM Mainly built by a LLM label Aug 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component Related to a component enhancement New feature or request LLM Mainly built by a LLM

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants