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

feat: [IOCOM-2096] New lines on messages' IOMarkdown, when a br tag is encountered #6783

Merged
merged 5 commits into from
Mar 5, 2025

Conversation

Vangaorth
Copy link
Contributor

@Vangaorth Vangaorth commented Mar 4, 2025

Short description

This PR adds support for multiple br tags on the rendering rules of messages, when using IOMarkdown.
Simulator Screenshot - iPhone 16 - 2025-03-04 at 18 07 34

List of changes proposed in this pull request

  • br occurrences are converted into new line characters (only in message and precondition's markdown)
  • Html node restored on message and precondition's markdown
  • Rendering rules code refactored in order to be shared between standard and custom rules

How to test

Using the io-dev-api-server, check that every br produces a new line. You can use the following markdown

The first line<br>the second line<br/><br />a third line<br/><br/><br/>What we want is more lines<br/>\n<br/>\n<br/>\n<br/>Don't we?

Copy link
Contributor

github-actions bot commented Mar 4, 2025

Jira Pull Request Link

This Pull Request refers to Jira issues:

Copy link
Contributor

github-actions bot commented Mar 4, 2025

PR Title Validation for conventional commit type

All good! PR title follows the conventional commit type.

Copy link

codecov bot commented Mar 4, 2025

Codecov Report

Attention: Patch coverage is 56.81818% with 19 lines in your changes missing coverage. Please review.

Project coverage is 51.01%. Comparing base (f66da68) to head (39f7d92).
Report is 2 commits behind head on master.

Files with missing lines Patch % Lines
...tures/common/components/IOMarkdown/customRules.tsx 33.33% 12 Missing ⚠️
ts/components/IOMarkdown/renderRules.tsx 72.00% 7 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #6783      +/-   ##
==========================================
+ Coverage   50.99%   51.01%   +0.02%     
==========================================
  Files        1579     1579              
  Lines       32706    32725      +19     
  Branches     7361     7367       +6     
==========================================
+ Hits        16679    16696      +17     
- Misses      15982    15984       +2     
  Partials       45       45              
Files with missing lines Coverage Δ
ts/components/IOMarkdown/index.tsx 100.00% <ø> (ø)
.../messages/components/Home/PreconditionsContent.tsx 79.06% <100.00%> (+0.49%) ⬆️
ts/components/IOMarkdown/renderRules.tsx 68.29% <72.00%> (+2.23%) ⬆️
...tures/common/components/IOMarkdown/customRules.tsx 51.61% <33.33%> (+7.16%) ⬆️

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 d9f6a9b...39f7d92. Read the comment docs.

Copy link
Contributor

@CrisTofani CrisTofani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Vangaorth Vangaorth added this pull request to the merge queue Mar 5, 2025
Merged via the queue into master with commit a3d4e93 Mar 5, 2025
22 checks passed
@Vangaorth Vangaorth deleted the IOCOM-2096_brMarkdown branch March 5, 2025 09:50
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