Skip to content
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

fix: [IOCOM-2040] Handling of code and pre html blocks in old markdown #6652

Merged
merged 14 commits into from
Feb 3, 2025

Conversation

Vangaorth
Copy link
Contributor

Short description

This PR fixes a problem with the existing markdown component, where text was overflowing or being cut.

Horizontal overflow
Android
Horizontal overflow
iOS
AndroidHorizontal iOSHorizontal
Vertical cut
Android
Vertical cut
iOS
AndroidVertical iOSVertical
Fixed
Android
Fixed
iOS
a b
AndroidFixed iOSFixed

List of changes proposed in this pull request

The problem arises when the input markdown string contains:

  • a tab character (UTF-8), after a newline
  • two or more subsequent newlines with four blank spaces before any text
    Such sequences causes the generated html to wrap the text into a <pre><code>text here</code></pre> block, that causes either horizontal overflow or vertical cutting (or both).
    To fix such problem, a custom styling for pre and code has been added to the markdown's CSS in order to render such blocks as a standard HTML paragraph.

How to test

Using the io-dev-api-server, generate a message containing above cases and check that it is rendered properly.

Copy link
Contributor

github-actions bot commented Jan 29, 2025

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

Copy link
Contributor

github-actions bot commented Jan 29, 2025

Jira Pull Request Link

This Pull Request refers to Jira issues:

@Vangaorth Vangaorth changed the title [IOCOM-2040] Handling of code and pre html blocks in old markdown fix: [IOCOM-2040] Handling of code and pre html blocks in old markdown Jan 29, 2025
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 49.99%. Comparing base (11a5ba5) to head (0d55193).
Report is 2 commits behind head on master.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #6652   +/-   ##
=======================================
  Coverage   49.99%   49.99%           
=======================================
  Files        1544     1544           
  Lines       32163    32163           
  Branches     7292     7239   -53     
=======================================
  Hits        16079    16079           
- Misses      16033    16046   +13     
+ Partials       51       38   -13     
Files with missing lines Coverage Δ
ts/components/ui/Markdown/utils.ts 62.96% <ø> (ø)

... and 13 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 11a5ba5...0d55193. Read the comment docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants