-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Android] Fix: split editor and message mode in html parsing #27
[Android] Fix: split editor and message mode in html parsing #27
Conversation
When we translated HTML to spans in Android, we want the paragraph tags (`<p>`) to translate to a double line break ( `\n\n`) since Android doesn't have support for inter-paragraph spacing and we need to simulate this by using this workaround. However, this is not something we can support in the actual editor since it would break the index matching, add new points in the text that can be selected, removed, etc. and would make it crash. So we end up having to differentiate between HTML parsing for the editor and HTML parsing to display in messages to support this change. Also, this means the rendering on the editor and what's rendered later for the sent message might not match 1:1 as until now.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #27 +/- ##
==========================================
- Coverage 90.16% 89.33% -0.83%
==========================================
Files 179 104 -75
Lines 22240 18008 -4232
Branches 291 291
==========================================
- Hits 20053 16088 -3965
+ Misses 2184 1917 -267
Partials 3 3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
c894cf6
to
1d5ddc2
Compare
I had to also workaround the NDK version selection, which for some reason didn't work in CI anymore... |
1d5ddc2
to
717f285
Compare
717f285
to
3799726
Compare
Quality Gate passedIssues Measures |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
When we translate HTML to spans in Android, we want the paragraph tags (
<p>
) to translate to a double line break (\n\n
) since Android doesn't have support for inter-paragraph spacing and we need to simulate this by using this workaround.However, this is not something we can support in the actual editor since it would break the index matching, add new points in the text that can be selected, removed, etc. and would make it crash.
So we end up having to differentiate between HTML parsing for the editor and HTML parsing to display in messages to support this change. Also, this means the rendering on the editor and what's rendered later for the sent message might not match 1:1 as until now.