You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 857d0ee
Browse filesBrowse the repository at this point in the historyBrowse files
fix(mobile): keep an inline chip on its line without stretching the bubble
A chip is taller than the lowercase band it sits in, and both platforms grow
the line to fit it: React Native raises the line's ascent around an inline
view, and TextKit sizes the fragment to the attachment. The chip rode above
the words and the message gained a gap on top that no amount of moving the
chip could remove — a transform or margin shifts only the drawn pixels and
leaves the line box where it was.
Size the box from the paragraph font instead of the chip. Android reports an
inline box no taller than the font's ascent and hangs the bitmap off it, which
text does not clip; iOS centres the attachment on the run font's ascender and
descender, the rule the composer's span already used. The line then measures
exactly as tall as a line of plain text.
Two smaller faults surfaced alongside. A run whose whole text is U+FFFC became
a bare attachment carrying no font or paragraph style, so a chip opening a
paragraph dropped its line height; the placeholder is now a zero-width space
and the iOS attachment string keeps the run's attributes. And the attachment
container rendered even when empty, so its parent gap padded every bubble
without attachments.
Measured on device: iOS bubble padding 18.0/9.7pt becomes 11.0/11.0pt, Android
14.9/12.6dp becomes 10.6/10.3dp against the 10dp the bubble asks for.
Copy file name to clipboardExpand all lines: apps/mobile/modules/t3-markdown-text/android/src/main/java/expo/modules/t3markdowntext/T3MarkdownTextSelectionModule.kt
0 commit comments