Skip to content

fix(web): xmarkdown create img incorrectly#2540

Merged
Sherry-hue merged 1 commit intolynx-family:mainfrom
Sherry-hue:fix/markdown-slot-img
Apr 29, 2026
Merged

fix(web): xmarkdown create img incorrectly#2540
Sherry-hue merged 1 commit intolynx-family:mainfrom
Sherry-hue:fix/markdown-slot-img

Conversation

@Sherry-hue
Copy link
Copy Markdown
Collaborator

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

Summary by CodeRabbit

  • Bug Fixes
    • Fixed x-markdown component to correctly render inline-view images and badges during typewriter animation mode, ensuring they appear as expected when content is animated.

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 29, 2026

🦋 Changeset detected

Latest commit: 860a366

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

@Sherry-hue Sherry-hue force-pushed the fix/markdown-slot-img branch from bd16231 to 860a366 Compare April 29, 2026 03:36
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 29, 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: 0420fc75-5214-45c3-a3e0-f1a74047a56d

📥 Commits

Reviewing files that changed from the base of the PR and between e4ace87 and 860a366.

📒 Files selected for processing (4)
  • .changeset/neat-beds-film.md
  • packages/web-platform/web-elements/src/elements/XMarkdown/XMarkdownAttributes.ts
  • packages/web-platform/web-elements/tests/fixtures/x-markdown/typewriter-inlineview.html
  • packages/web-platform/web-elements/tests/x-markdown.spec.ts

📝 Walkthrough

Walkthrough

This PR introduces a patch-version release for @lynx-js/web-elements that fixes inline view injection during XMarkdown's typewriter animation mode. A call to #injectInlineViews is added to the typewriter rendering path, with supporting test fixture and spec to validate the behavior.

Changes

Cohort / File(s) Summary
Release note
.changeset/neat-beds-film.md
Changeset entry recording patch-version bump for the xmarkdown image creation fix.
XMarkdown implementation
packages/web-platform/web-elements/src/elements/XMarkdown/XMarkdownAttributes.ts
Added #injectInlineViews(root) call to typewriter rendering path following HTML content updates, ensuring inline-view placeholders are processed during incremental updates, not only full renders.
Test coverage
packages/web-platform/web-elements/tests/fixtures/x-markdown/typewriter-inlineview.html, packages/web-platform/web-elements/tests/x-markdown.spec.ts
New test fixture validating typewriter-mode behavior with inline views and corresponding Playwright test asserting correct inline view tracking and absence of inline-view images.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • PupilTong

Poem

🐰✨ Typewriter words now dance so bright,
With inline views injected just right,
No more forgotten placeholders in time,
Each keystroke carries views sublime! 📝🎬

🚥 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): xmarkdown create img incorrectly' directly addresses the main issue being fixed - xmarkdown incorrectly creating images. It clearly summarizes the primary change across all files (fix, test fixture, and test).
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
Review rate limit: 6/8 reviews remaining, refill in 13 minutes and 26 seconds.

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

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ All tests successful. No failed tests found.

📢 Thoughts on this report? Let us know!

@codspeed-hq
Copy link
Copy Markdown

codspeed-hq Bot commented Apr 29, 2026

Merging this PR will not alter performance

✅ 81 untouched benchmarks
⏩ 26 skipped benchmarks1


Comparing Sherry-hue:fix/markdown-slot-img (860a366) with main (e4ace87)

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.

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 29, 2026

React MTF Example

#825 Bundle Size — 196.54KiB (0%).

860a366(current) vs e4ace87 main#817(baseline)

Bundle metrics  no changes
                 Current
#825
     Baseline
#817
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.08% 44.08%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#825
     Baseline
#817
No change  IMG 111.23KiB 111.23KiB
No change  Other 85.31KiB 85.31KiB

Bundle analysis reportBranch Sherry-hue:fix/markdown-slot-imgProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 29, 2026

React Example

#7693 Bundle Size — 225.38KiB (0%).

860a366(current) vs e4ace87 main#7685(baseline)

Bundle metrics  no changes
                 Current
#7693
     Baseline
#7685
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.57% 44.57%
No change  Packages 2 2
No change  Duplicate Packages 0 0
Bundle size by type  no changes
                 Current
#7693
     Baseline
#7685
No change  IMG 145.76KiB 145.76KiB
No change  Other 79.63KiB 79.63KiB

Bundle analysis reportBranch Sherry-hue:fix/markdown-slot-imgProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 29, 2026

React External

#809 Bundle Size — 680.27KiB (0%).

860a366(current) vs e4ace87 main#801(baseline)

Bundle metrics  no changes
                 Current
#809
     Baseline
#801
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
#809
     Baseline
#801
No change  Other 680.27KiB 680.27KiB

Bundle analysis reportBranch Sherry-hue:fix/markdown-slot-imgProject dashboard


Generated by RelativeCIDocumentationReport issue

@relativeci
Copy link
Copy Markdown

relativeci Bot commented Apr 29, 2026

Web Explorer

#9266 Bundle Size — 900.03KiB (~+0.01%).

860a366(current) vs e4ace87 main#9258(baseline)

Bundle metrics  Change 2 changes
                 Current
#9266
     Baseline
#9258
No change  Initial JS 44.46KiB 44.46KiB
No change  Initial CSS 2.22KiB 2.22KiB
Change  Cache Invalidation 16.16% 0%
No change  Chunks 9 9
No change  Assets 11 11
Change  Modules 227(-0.44%) 228
No change  Duplicate Modules 11 11
No change  Duplicate Code 27.29% 27.29%
No change  Packages 10 10
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#9266
     Baseline
#9258
Regression  JS 495.9KiB (~+0.01%) 495.88KiB
No change  Other 401.92KiB 401.92KiB
No change  CSS 2.22KiB 2.22KiB

Bundle analysis reportBranch Sherry-hue:fix/markdown-slot-imgProject dashboard


Generated by RelativeCIDocumentationReport issue

@Sherry-hue Sherry-hue merged commit c1db603 into lynx-family:main Apr 29, 2026
105 of 110 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