Skip to content

Comments

Fix bullet em units#2667

Merged
kropp merged 2 commits intojb-mainfrom
CMP-9453-fix-bullet-em-units
Jan 13, 2026
Merged

Fix bullet em units#2667
kropp merged 2 commits intojb-mainfrom
CMP-9453-fix-bullet-em-units

Conversation

@kropp
Copy link
Member

@kropp kropp commented Jan 7, 2026

Changed the textIndent conversion to use the overloaded toPx(density, fontSize) extension function that properly handles both Em and Sp units. This matches the pattern already used for placeholder conversion in the same file (lines 566-572).

Fixes CMP-9453

Testing

SkikoParagraphTest.bullet_withEmUnits_shouldNotCrash

Release Notes

Fixes - Multiple Platforms

  • Fixed exception thrown when using Bullets with Em units

Fixed IllegalStateException "Only Sp can convert to Px" when using
Bullets with Em units (e.g., Bullet.DefaultIndentation) in Compose
desktop. The textIndent conversion now uses toPx(density, fontSize)
which properly handles both Em and Sp units, matching the pattern
used for placeholder conversion elsewhere in the file.

Added regression test to verify Bullets with Em units work correctly.
@kropp kropp requested a review from MatkovIvan January 7, 2026 13:44
@kropp kropp force-pushed the CMP-9453-fix-bullet-em-units branch from 0b6a5d1 to 061f3b2 Compare January 7, 2026 15:05
@kropp kropp force-pushed the CMP-9453-fix-bullet-em-units branch from 061f3b2 to 8a69021 Compare January 7, 2026 15:19
@kropp kropp merged commit f8d8f37 into jb-main Jan 13, 2026
25 of 26 checks passed
@kropp kropp deleted the CMP-9453-fix-bullet-em-units branch January 13, 2026 08:36
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