fix(web): EnrichedText textAlignment rendering#689
Merged
hejsztynx merged 4 commits intoJul 10, 2026
Conversation
Contributor
There was a problem hiding this comment.
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
prepareHtmlForWebto 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.
exploIF
approved these changes
Jul 10, 2026
kacperzolkiewski
approved these changes
Jul 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
text-align. Modified the rendering so it displays correctly now<li>text</li>did not allow the web to properly applytext-alignto the content, as it needs<p>. Now it wraps it as so:<li><p>text</p></li>as a part ofprepareHtmlForWebEnrichedTextvisual testsScreenshots / Videos
Before:
After:
Compatibility
Checklist