Skip to content

fix(web): EnrichedText textAlignment rendering#689

Merged
hejsztynx merged 4 commits into
mainfrom
@ksienkiewicz/fix-web-list-markers-in-text-alignment
Jul 10, 2026
Merged

fix(web): EnrichedText textAlignment rendering#689
hejsztynx merged 4 commits into
mainfrom
@ksienkiewicz/fix-web-list-markers-in-text-alignment

Conversation

@hejsztynx

Copy link
Copy Markdown
Collaborator

Summary

  • the main issue was that the previous way of rendering list markers did not consider the text-align . Modified the rendering so it displays correctly now
  • the native format <li>text</li> did not allow the web to properly apply text-align to the content, as it needs <p>. Now it wraps it as so: <li><p>text</p></li> as a part of prepareHtmlForWeb
  • provided additional EnrichedText visual tests

Screenshots / Videos

Before:

image

After:

image

Compatibility

OS Implemented
iOS
Android
Web

Checklist

  • E2E tests are passing
  • Required E2E tests have been added (if applicable)

Copilot AI review requested due to automatic review settings July 9, 2026 13:56
@hejsztynx hejsztynx marked this pull request as draft July 9, 2026 13:56

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the web rendering pipeline for EnrichedText to improve text-align behavior in list items by normalizing <li> content structure and adjusting list-marker/layout CSS, and adds Playwright visual coverage for alignment cases.

Changes:

  • Update prepareHtmlForWeb to parse HTML and wrap bare <li> content in <p> elements before rendering on web.
  • Rework list CSS (unordered, ordered, checkbox) to improve marker/layout alignment and empty-item rendering.
  • Add a wide-mode toggle to the web test screen and introduce Playwright visual tests for alignment scenarios.

Reviewed changes

Copilot reviewed 4 out of 24 changed files in this pull request and generated 6 comments.

File Description
src/web/normalization/prepareHtmlForWeb.ts Parse and normalize list HTML for web rendering (wrap <li> contents, mutate checkbox lists).
src/web/EnrichedText.css Adjust list-item layout/marker rendering for alignment correctness across list types.
apps/example-web/src/testScreens/TestEnrichedText.tsx Add width toggle to support alignment-focused visual testing.
.playwright/tests/enrichedTextTextAlignmentVisual.spec.ts Add visual regression coverage for text alignment across blocks and list types.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/web/normalization/prepareHtmlForWeb.ts
Comment thread src/web/normalization/prepareHtmlForWeb.ts
Comment thread src/web/EnrichedText.css
Comment thread src/web/EnrichedText.css
Comment thread src/web/EnrichedText.css Outdated
Comment thread src/web/EnrichedText.css
@hejsztynx hejsztynx marked this pull request as ready for review July 9, 2026 14:34
@hejsztynx hejsztynx merged commit 3a5d492 into main Jul 10, 2026
8 checks passed
@hejsztynx hejsztynx deleted the @ksienkiewicz/fix-web-list-markers-in-text-alignment branch July 10, 2026 07:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants