Skip to content

feat(web): builtinTagTransformMap add input for x-input-ng#1932

Merged
Sherry-hue merged 1 commit intolynx-family:mainfrom
Sherry-hue:feat/web-builtin-xinputng
Nov 11, 2025
Merged

feat(web): builtinTagTransformMap add input for x-input-ng#1932
Sherry-hue merged 1 commit intolynx-family:mainfrom
Sherry-hue:feat/web-builtin-xinputng

Conversation

@Sherry-hue
Copy link
Copy Markdown
Collaborator

@Sherry-hue Sherry-hue commented Nov 11, 2025

Summary by CodeRabbit

  • New Features

    • Added support for x-input-ng tag as an alternative to x-input across the platform.
  • Tests

    • Added test coverage for the x-input-ng tag variant, including input binding and event validation scenarios.

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 Nov 11, 2025

🦋 Changeset detected

Latest commit: 6fb1fc1

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

This PR includes changesets to release 12 packages
Name Type
@lynx-js/web-core-server Patch
@lynx-js/web-core Patch
@lynx-js/web-explorer Patch
upgrade-rspeedy Patch
@lynx-js/web-rsbuild-server-middleware Patch
@lynx-js/web-constants Patch
@lynx-js/web-mainthread-apis Patch
@lynx-js/web-worker-rpc Patch
@lynx-js/web-worker-runtime Patch
@lynx-js/web-style-transformer Patch
@lynx-js/rspeedy Patch
create-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 Nov 11, 2025

📝 Walkthrough

Walkthrough

Adds support for a new 'x-input-ng' tag alias that maps to 'x-input' across the web platform layers, with corresponding version bumps for three packages and a test case validating the bindinput behavior of the new tag variant.

Changes

Cohort / File(s) Summary
Version Management
.changeset/light-actors-wonder.md
Adds patch version bumps for @lynx-js/web-core-server, @lynx-js/web-core, and @lynx-js/web-explorer packages.
Tag Transformation Mapping
packages/web-platform/web-core-server/src/createLynxView.ts, packages/web-platform/web-core/src/apis/LynxView.ts
Introduces new tag alias entry mapping 'x-input-ng' to 'x-input' in builtinTagTransformMap and tagMap for consistent rendering across platform layers.
Test Coverage
packages/web-platform/web-tests/tests/react.spec.ts
Adds new test case basic-element-x-input-ng-bindinput validating input event handling for x-input-ng variant.
Test Component
packages/web-platform/web-tests/tests/react/basic-element-x-input-ng-bindinput/index.jsx
Implements React test component for x-input-ng with bindinput event validation, event detail object structure verification, and result state tracking.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

  • The tag mapping additions are repetitive and follow consistent patterns across files
  • Test additions are straightforward without complex logic
  • Primary focus: verify tag alias correctness and test component event handling structure

Possibly related PRs

  • #1907: Modifies the same tag transformation mechanism by adding input-related tag aliases (complements the 'x-input-ng' -> 'x-input' mapping approach).
  • #1703: Updates packages/web-platform/web-core-server/src/createLynxView.ts, the same file modified in this PR for tag mapping expansion.

Suggested reviewers

  • PupilTong
  • colinaaa

Poem

🐰 A new tag hops into view, x-input-ng so spry,
Maps to x-input with care, watch it flutter and fly,
Tests dance with bindinput events, all validated with glee,
Three packages bump their patches—a version harmony! ✨

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat(web): builtinTagTransformMap add input for x-input-ng' is directly related to the main change in the changeset: adding a new mapping entry for 'x-input-ng' to 'x-input' in builtinTagTransformMap across multiple packages.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

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.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a1e4e19 and 6fb1fc1.

📒 Files selected for processing (5)
  • .changeset/light-actors-wonder.md (1 hunks)
  • packages/web-platform/web-core-server/src/createLynxView.ts (1 hunks)
  • packages/web-platform/web-core/src/apis/LynxView.ts (1 hunks)
  • packages/web-platform/web-tests/tests/react.spec.ts (1 hunks)
  • packages/web-platform/web-tests/tests/react/basic-element-x-input-ng-bindinput/index.jsx (1 hunks)
🧰 Additional context used
📓 Path-based instructions (1)
.changeset/*.md

📄 CodeRabbit inference engine (AGENTS.md)

For contributions, generate and commit a Changeset describing your changes

Files:

  • .changeset/light-actors-wonder.md
🧠 Learnings (6)
📓 Common learnings
Learnt from: Sherry-hue
Repo: lynx-family/lynx-stack PR: 1820
File: packages/web-platform/web-tests/tests/react.spec.ts:834-856
Timestamp: 2025-10-11T06:16:12.517Z
Learning: In packages/web-platform/web-tests/tests/react.spec.ts, the tests `basic-bindmouse` and `basic-mts-bindtouchstart` are NOT duplicates despite having similar test structures. They test different event types: `basic-bindmouse` validates mouse events (mousedown, mouseup, mousemove) with mouse-specific properties (button, buttons, x, y, pageX, pageY, clientX, clientY), while `basic-mts-bindtouchstart` validates touch events (touchstart) with touch arrays (touches, targetTouches, changedTouches). The similar test structure is coincidental and follows testing conventions.
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, private packages (marked with "private": true in package.json) like lynx-js/react-transform don't require meaningful changeset entries even when their public APIs change, since they are not published externally and only affect internal development.

Applied to files:

  • packages/web-platform/web-core-server/src/createLynxView.ts
  • packages/web-platform/web-core/src/apis/LynxView.ts
  • .changeset/light-actors-wonder.md
📚 Learning: 2025-07-16T06:26:22.230Z
Learnt from: PupilTong
Repo: lynx-family/lynx-stack PR: 1029
File: packages/web-platform/web-core-server/src/createLynxView.ts:0-0
Timestamp: 2025-07-16T06:26:22.230Z
Learning: In the lynx-stack SSR implementation, each createLynxView instance is used to render once and then discarded. There's no reuse of the same instance for multiple renders, so event arrays and other state don't need to be cleared between renders.

Applied to files:

  • packages/web-platform/web-core/src/apis/LynxView.ts
📚 Learning: 2025-10-11T06:16:12.517Z
Learnt from: Sherry-hue
Repo: lynx-family/lynx-stack PR: 1820
File: packages/web-platform/web-tests/tests/react.spec.ts:834-856
Timestamp: 2025-10-11T06:16:12.517Z
Learning: In packages/web-platform/web-tests/tests/react.spec.ts, the tests `basic-bindmouse` and `basic-mts-bindtouchstart` are NOT duplicates despite having similar test structures. They test different event types: `basic-bindmouse` validates mouse events (mousedown, mouseup, mousemove) with mouse-specific properties (button, buttons, x, y, pageX, pageY, clientX, clientY), while `basic-mts-bindtouchstart` validates touch events (touchstart) with touch arrays (touches, targetTouches, changedTouches). The similar test structure is coincidental and follows testing conventions.

Applied to files:

  • packages/web-platform/web-tests/tests/react/basic-element-x-input-ng-bindinput/index.jsx
  • packages/web-platform/web-tests/tests/react.spec.ts
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
Repo: lynx-family/lynx-stack PR: 1736
File: .changeset/spotty-experts-smoke.md:1-3
Timestamp: 2025-09-12T09:43:04.847Z
Learning: In the lynx-family/lynx-stack repository, empty changeset files (containing only `---\n\n---`) are used for internal changes that modify src/** files but don't require meaningful release notes, such as private package changes or testing-only modifications. This satisfies CI requirements without generating user-facing release notes.

Applied to files:

  • .changeset/light-actors-wonder.md
📚 Learning: 2025-08-19T11:25:36.127Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1558
File: .changeset/solid-squids-fall.md:2-2
Timestamp: 2025-08-19T11:25:36.127Z
Learning: In the lynx-family/lynx-stack repository, changesets should use the exact package name from package.json#name, not generic or unscoped names. Each package has its own specific scoped name (e.g., "lynx-js/react-transform" for packages/react/transform).

Applied to files:

  • .changeset/light-actors-wonder.md
🧬 Code graph analysis (1)
packages/web-platform/web-tests/tests/react.spec.ts (1)
packages/web-platform/web-tests/tests/react/basic-element-x-input-ng-bindinput/index.jsx (1)
  • result (8-8)
🔇 Additional comments (4)
packages/web-platform/web-core-server/src/createLynxView.ts (1)

85-85: LGTM! Tag alias mapping added correctly.

The new 'x-input-ng' to 'x-input' mapping is properly placed and follows the existing pattern in the builtinTagTransformMap.

packages/web-platform/web-core/src/apis/LynxView.ts (1)

424-424: LGTM! Client-side tag mapping added correctly.

The mapping mirrors the server-side implementation, ensuring consistent tag transformation across rendering contexts.

.changeset/light-actors-wonder.md (1)

1-7: LGTM! Changeset properly documents the feature addition.

The changeset correctly specifies patch version bumps for the affected packages and provides a clear description of the new tag alias mapping.

packages/web-platform/web-tests/tests/react.spec.ts (1)

3027-3039: LGTM! Test case properly validates the new tag alias.

The test follows the established pattern for input bindinput tests and appropriately validates that x-input-ng functions identically to x-input through the tag mapping. Based on learnings.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 11, 2025

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 Nov 11, 2025

CodSpeed Performance Report

Merging #1932 will not alter performance

Comparing Sherry-hue:feat/web-builtin-xinputng (6fb1fc1) with main (a1e4e19)

Summary

✅ 63 untouched
⏩ 3 skipped1

Footnotes

  1. 3 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 Nov 11, 2025

Web Explorer

#6201 Bundle Size — 366.77KiB (~+0.01%).

6fb1fc1(current) vs a1e4e19 main#6193(baseline)

Bundle metrics  Change 2 changes Regression 1 regression
                 Current
#6201
     Baseline
#6193
Regression  Initial JS 146.22KiB(+0.02%) 146.2KiB
No change  Initial CSS 32.22KiB 32.22KiB
Change  Cache Invalidation 39.86% 0%
No change  Chunks 8 8
No change  Assets 8 8
No change  Modules 220 220
No change  Duplicate Modules 16 16
No change  Duplicate Code 3.21% 3.21%
No change  Packages 4 4
No change  Duplicate Packages 0 0
Bundle size by type  Change 1 change Regression 1 regression
                 Current
#6201
     Baseline
#6193
Regression  JS 240.74KiB (~+0.01%) 240.72KiB
No change  Other 93.8KiB 93.8KiB
No change  CSS 32.22KiB 32.22KiB

Bundle analysis reportBranch Sherry-hue:feat/web-builtin-xinp...Project dashboard


Generated by RelativeCIDocumentationReport issue

@Sherry-hue Sherry-hue merged commit eee83b6 into lynx-family:main Nov 11, 2025
112 of 117 checks passed
colinaaa pushed a commit that referenced this pull request Nov 23, 2025
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @lynx-js/rspeedy@0.12.0

### Minor Changes

- Bump Rsbuild v1.6.7 with Rspack v1.6.4.
([#1905](#1905))

### Patch Changes

-   Updated dependencies \[]:
    -   @lynx-js/web-rsbuild-server-middleware@0.18.4

## @lynx-js/devtool-mcp-server@0.4.1

### Patch Changes

- Export `registerTool` and `defineTool`.
([#1931](#1931))

- Fix failed to connect to client.
([#1931](#1931))

## @lynx-js/react@0.114.5

### Patch Changes

- Reduce `__SetInlineStyles` element API call when attrs in spread not
changed ([#1919](#1919))

## @lynx-js/web-constants@0.18.4

### Patch Changes

-   Updated dependencies \[]:
    -   @lynx-js/web-worker-rpc@0.18.4

## @lynx-js/web-core@0.18.4

### Patch Changes

- feat: builtinTagTransformMap add `'x-input-ng': 'x-input'`
([#1932](#1932))

-   Updated dependencies \[]:
    -   @lynx-js/web-constants@0.18.4
    -   @lynx-js/web-mainthread-apis@0.18.4
    -   @lynx-js/web-worker-rpc@0.18.4
    -   @lynx-js/web-worker-runtime@0.18.4

## @lynx-js/web-core-server@0.18.4

### Patch Changes

- feat: builtinTagTransformMap add `'x-input-ng': 'x-input'`
([#1932](#1932))

- chore: minor bundle output change
([#1946](#1946))

    the timing of loading wasm chunk has been changed

## @lynx-js/web-elements@0.8.11

### Patch Changes

- fix: when estimated-main-axis-size-px is not set, should use the
height of list
([#1930](#1930))

-   Updated dependencies \[]:
    -   @lynx-js/web-elements-template@0.8.11

## @lynx-js/web-explorer@0.0.13

### Patch Changes

- feat: builtinTagTransformMap add `'x-input-ng': 'x-input'`
([#1932](#1932))

## @lynx-js/web-mainthread-apis@0.18.4

### Patch Changes

-   Updated dependencies \[]:
    -   @lynx-js/web-constants@0.18.4

## @lynx-js/web-worker-runtime@0.18.4

### Patch Changes

-   Updated dependencies \[]:
    -   @lynx-js/web-constants@0.18.4
    -   @lynx-js/web-mainthread-apis@0.18.4
    -   @lynx-js/web-worker-rpc@0.18.4

## create-rspeedy@0.12.0



## upgrade-rspeedy@0.12.0



## @lynx-js/web-elements-template@0.8.11



## @lynx-js/web-rsbuild-server-middleware@0.18.4



## @lynx-js/web-worker-rpc@0.18.4

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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