matrix-org / matrix-rich-text-editor

Matrix Rich Text Editor
https://matrix-org.github.io/matrix-rich-text-editor/
Apache License 2.0
84 stars 20 forks source link

[Android] Fix line height changes in `EditorStyledText` #898

Closed jmartinesp closed 7 months ago

jmartinesp commented 7 months ago

When using EditorStyledText for the timeline items in EXA I sometimes saw the line height changing in real time.

This was probably caused by setting this line height before the typeface, since this latter change recalculates the line height too.

While at it, I thought it would be nice to be able to customise includeFontPadding so the text in these components behave the same as the one in Compose.

Also, I think it's probably better to default to the local text style and font color than just setting a default one ourselves? If this is not right, I can revert these changes.

codecov-commenter commented 7 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Comparison is base (8e127b3) 87.39% compared to head (9a480d5) 89.39%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #898 +/- ## ============================================ + Coverage 87.39% 89.39% +2.00% ============================================ Files 166 86 -80 Lines 18987 15324 -3663 Branches 1049 0 -1049 ============================================ - Hits 16593 13699 -2894 + Misses 2093 1625 -468 + Partials 301 0 -301 ``` | [Flag](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/898/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | Coverage Δ | | |---|---|---| | [uitests](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/898/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | `?` | | | [uitests-android](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/898/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | `?` | | | [uitests-ios](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/898/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | `?` | | | [unittests](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/898/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | `89.39% <ø> (+3.97%)` | :arrow_up: | | [unittests-android](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/898/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | `?` | | | [unittests-ios](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/898/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | `?` | | | [unittests-rust](https://app.codecov.io/gh/matrix-org/matrix-rich-text-editor/pull/898/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org) | `89.39% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=matrix-org#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 7 months ago

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information