Bug: HTML bullet lists render an extra bullet and have suboptimal spacing
Slack thread: https://expensify.slack.com/archives/C090U774ZH7/p1777346806172969
Problem
When Concierge sends HTML containing <ul>/<li> bullet lists, two issues appear:
- Extra bullet: An empty extra bullet renders at the end of the list
- Spacing: The overall styling/spacing of bullet lists feels off
Root Cause (Extra Bullet)
Concierge sends HTML like:
<ul><li>Item 1</li><li>Item 2</li><li>Item 3</li><br/></ul>
Note the <br/> tag inside the <ul> but outside any <li>. The rendering pipeline converts <ul>/<li> to custom <bullet-list>/<bullet-item> tags via ExpensiMark, but the orphaned <br/> remains inside the <bullet-list> container. The react-native-render-html library then renders this as an additional empty bullet.
Relevant Code
- ExpensiMark (in
expensify-common): Transforms <ul>/<li> → <bullet-list>/<bullet-item> — may need to strip orphaned <br/> tags inside <ul> during transformation
src/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx: Defines custom element models for bullet-list and bullet-item, and has existing whitespace filtering logic (domVisitors.onText) that prevents empty bullets from whitespace — but doesn't handle <br/> tags
src/components/HTMLEngineProvider/HTMLRenderers/BulletItemRenderer.tsx: Renders individual bullet items with CONST.DOT_SEPARATOR (•)
Expected Behavior
- The
<br/> inside <ul> should not create an extra bullet
- Bullet list spacing should follow design recommendations
Suggested Fix
Either:
- Strip
<br/> tags that are direct children of <ul> during the ExpensiMark HTML-to-custom-tag transformation
- Add a
domVisitors.onElement handler in BaseHTMLEngineProvider.tsx to remove <br> nodes that are direct children of <bullet-list>
The spacing issue should be addressed with design input on the correct marginVertical, paddingLeft, and line-height values for bullet-list and bullet-item.
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022048969288184722028
- Upwork Job ID: 2048969288184722028
- Last Price Increase: 2026-04-28
- Automatic offers:
- aimane-chnaif | Reviewer | 111254189
Issue Owner
Current Issue Owner: @mallenexpensify
Bug: HTML bullet lists render an extra bullet and have suboptimal spacing
Slack thread: https://expensify.slack.com/archives/C090U774ZH7/p1777346806172969
Problem
When Concierge sends HTML containing
<ul>/<li>bullet lists, two issues appear:Root Cause (Extra Bullet)
Concierge sends HTML like:
Note the
<br/>tag inside the<ul>but outside any<li>. The rendering pipeline converts<ul>/<li>to custom<bullet-list>/<bullet-item>tags via ExpensiMark, but the orphaned<br/>remains inside the<bullet-list>container. The react-native-render-html library then renders this as an additional empty bullet.Relevant Code
expensify-common): Transforms<ul>/<li>→<bullet-list>/<bullet-item>— may need to strip orphaned<br/>tags inside<ul>during transformationsrc/components/HTMLEngineProvider/BaseHTMLEngineProvider.tsx: Defines custom element models forbullet-listandbullet-item, and has existing whitespace filtering logic (domVisitors.onText) that prevents empty bullets from whitespace — but doesn't handle<br/>tagssrc/components/HTMLEngineProvider/HTMLRenderers/BulletItemRenderer.tsx: Renders individual bullet items withCONST.DOT_SEPARATOR(•)Expected Behavior
<br/>inside<ul>should not create an extra bulletSuggested Fix
Either:
<br/>tags that are direct children of<ul>during the ExpensiMark HTML-to-custom-tag transformationdomVisitors.onElementhandler inBaseHTMLEngineProvider.tsxto remove<br>nodes that are direct children of<bullet-list>The spacing issue should be addressed with design input on the correct
marginVertical,paddingLeft, and line-height values forbullet-listandbullet-item.Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @mallenexpensify