Skip to content

fix(web): line-height of markdown-style should be added#2509

Merged
Sherry-hue merged 1 commit intolynx-family:mainfrom
Sherry-hue:fix/markdown-style
Apr 22, 2026
Merged

fix(web): line-height of markdown-style should be added#2509
Sherry-hue merged 1 commit intolynx-family:mainfrom
Sherry-hue:fix/markdown-style

Conversation

@Sherry-hue
Copy link
Copy Markdown
Collaborator

@Sherry-hue Sherry-hue commented Apr 22, 2026

Summary by CodeRabbit

  • Bug Fixes

    • Fixed line-height values in markdown-style formatting to include explicit px unit suffix.
  • Tests

    • Updated test assertions to verify correct line-height CSS property rendering.

Checklist

  • Tests updated (or not required).
  • Documentation updated (or not required).
  • Changeset added, and when a BREAKING CHANGE occurs, it needs to be clearly marked (or not required).

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 22, 2026

🦋 Changeset detected

Latest commit: 830d8e7

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 10 packages
Name Type
@lynx-js/web-elements Patch
upgrade-rspeedy Patch
@lynx-js/web-core Patch
@lynx-js/web-rsbuild-server-middleware Patch
@lynx-js/template-webpack-plugin Patch
@lynx-js/react-rsbuild-plugin Patch
create-rspeedy Patch
@lynx-js/web-worker-rpc Patch
@lynx-js/react-alias-rsbuild-plugin Patch
@lynx-js/rspeedy Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 22, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 26798d32-934b-4b64-aacb-0a148861147d

📥 Commits

Reviewing files that changed from the base of the PR and between eec539a and 830d8e7.

📒 Files selected for processing (4)
  • .changeset/tiny-pianos-enter.md
  • packages/web-platform/web-elements/src/elements/XMarkdown/XMarkdownAttributes.ts
  • packages/web-platform/web-elements/tests/fixtures/x-markdown/style.html
  • packages/web-platform/web-elements/tests/x-markdown.spec.ts
💤 Files with no reviewable changes (1)
  • packages/web-platform/web-elements/src/elements/XMarkdown/XMarkdownAttributes.ts

📝 Walkthrough

Walkthrough

This change ensures line-height CSS values in the XMarkdown component render with explicit px units rather than as unitless numbers. The fix removes line-height from the unitless CSS properties whitelist, updates test fixtures to include lineHeight values, and adds assertions to verify correct styling application.

Changes

Cohort / File(s) Summary
Changeset Metadata
.changeset/tiny-pianos-enter.md
Added patch-level changeset entry documenting the line-height px unit fix for @lynx-js/web-elements.
Core Implementation
packages/web-platform/web-elements/src/elements/XMarkdown/XMarkdownAttributes.ts
Removed 'line-height' from unitlessCssProperties whitelist to ensure numeric lineHeight values include px suffix when serialized.
Test Coverage
packages/web-platform/web-elements/tests/fixtures/x-markdown/style.html, packages/web-platform/web-elements/tests/x-markdown.spec.ts
Extended test fixture with lineHeight: 24 property for link elements and added assertion to verify the rendered line-height is 24px.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Suggested reviewers

  • PupilTong

Poem

🐰 A line-height fix, so precise and neat,
With pixels explicit, the units complete,
No unitless tricks, just px so clear,
Testing confirms what we hold dear!
*hops happily*

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix(web): line-height of markdown-style should be added' clearly and specifically describes the main change: adding line-height support to markdown-style with an explicit px unit.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 22, 2026

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
4210 1 4209 95
View the top 1 failed test(s) by shortest run time
tests/lynx.spec.ts > kitten-lynx testing framework
Stack Traces | 11.2s run time
Error: Failed to connect to Lynx: no client found for com.lynx.explorer on device "emulator-5554".
 ❯ Function.connect src/Lynx.ts:155:13
 ❯ tests/lynx.spec.ts:46:12

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 22, 2026

Merging this PR will improve performance by 17.26%

⚡ 1 improved benchmark
✅ 80 untouched benchmarks
⏩ 26 skipped benchmarks1

Performance Changes

Benchmark BASE HEAD Efficiency
transform 1000 view elements 46.8 ms 39.9 ms +17.26%

Comparing Sherry-hue:fix/markdown-style (830d8e7) with main (ea5e30e)2

Open in CodSpeed

Footnotes

  1. 26 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

  2. No successful run was found on main (eec539a) during the generation of this report, so ea5e30e was used instead as the comparison base. There might be some changes unrelated to this pull request in this report.

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 22, 2026

React External

#641 Bundle Size — 674.83KiB (0%).

830d8e7(current) vs 1d4abfc main#638(baseline)

Bundle metrics  no changes
                 Current
#641
     Baseline
#638
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 17 17
No change  Duplicate Modules 5 5
No change  Duplicate Code 8.59% 8.59%
No change  Packages 0 0
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#641
     Baseline
#638
No change  Other 674.83KiB 674.83KiB

Bundle analysis reportBranch Sherry-hue:fix/markdown-styleProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 22, 2026

React Example

#7523 Bundle Size — 224.41KiB (0%).

830d8e7(current) vs 1d4abfc main#7520(baseline)

Bundle metrics  no changes
                 Current
#7523
     Baseline
#7520
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 4 4
No change  Modules 179 179
No change  Duplicate Modules 69 69
No change  Duplicate Code 44.51% 44.51%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#7523
     Baseline
#7520
No change  IMG 145.76KiB 145.76KiB
No change  Other 78.65KiB 78.65KiB

Bundle analysis reportBranch Sherry-hue:fix/markdown-styleProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 22, 2026

React MTF Example

#655 Bundle Size — 195.57KiB (0%).

830d8e7(current) vs 1d4abfc main#652(baseline)

Bundle metrics  no changes
                 Current
#655
     Baseline
#652
No change  Initial JS 0B 0B
No change  Initial CSS 0B 0B
No change  Cache Invalidation 0% 0%
No change  Chunks 0 0
No change  Assets 3 3
No change  Modules 173 173
No change  Duplicate Modules 66 66
No change  Duplicate Code 44% 44%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#655
     Baseline
#652
No change  IMG 111.23KiB 111.23KiB
No change  Other 84.34KiB 84.34KiB

Bundle analysis reportBranch Sherry-hue:fix/markdown-styleProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 22, 2026

Web Explorer

#9095 Bundle Size — 899.87KiB (~+0.01%).

830d8e7(current) vs 1d4abfc main#9092(baseline)

Bundle metrics  Change 1 change
                 Current
#9095
     Baseline
#9092
No change  Initial JS 44.46KiB 44.46KiB
No change  Initial CSS 2.22KiB 2.22KiB
Change  Cache Invalidation 29.2% 43.7%
No change  Chunks 9 9
No change  Assets 11 11
No change  Modules 230 230
No change  Duplicate Modules 11 11
No change  Duplicate Code 27.2% 27.2%
No change  Packages 10 10
No change  Duplicate Packages 0 0
Bundle size by type  Change 2 changes Regression 1 regression Improvement 1 improvement
                 Current
#9095
     Baseline
#9092
Improvement  JS 495.64KiB (~-0.01%) 495.65KiB
Regression  Other 402.02KiB (+0.02%) 401.92KiB
No change  CSS 2.22KiB 2.22KiB

Bundle analysis reportBranch Sherry-hue:fix/markdown-styleProject dashboard


Generated by RelativeCIDocumentationReport issue

@Sherry-hue Sherry-hue merged commit b0247f9 into lynx-family:main Apr 22, 2026
77 of 81 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants