feat(web): builtinTagTransformMap add input for x-input#1907
feat(web): builtinTagTransformMap add input for x-input#1907Sherry-hue merged 1 commit intolynx-family:mainfrom
Conversation
🦋 Changeset detectedLatest commit: b8d73e6 The changes in this PR will be included in the next version bump. This PR includes changesets to release 9 packages
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 |
📝 WalkthroughWalkthroughThis pull request introduces HTML input element support by mapping the 'input' tag to 'x-input' in the tag transformation system across web-core-server and web-core packages, with corresponding test coverage for input binding behavior. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10–15 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/web-platform/web-tests/tests/react/basic-element-input-bindinput/index.jsx (1)
25-25: Consider: selectionStart used twice in result string.Line 25 uses
selectionStarttwice instead of using bothselectionStartandselectionEnd. This matches the existing x-input test behavior (as shown in the relevant code snippets), so it's consistent with the current test suite. However, if the intent is to display both selection boundaries, consider using${value}-${selectionStart}-${selectionEnd}instead.Note: This would require updating both this test and the corresponding x-input test for consistency.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
.changeset/seven-coats-appear.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-input-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/seven-coats-appear.md
🧠 Learnings (6)
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#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/seven-coats-appear.mdpackages/web-platform/web-core/src/apis/LynxView.ts
📚 Learning: 2025-09-12T09:43:04.847Z
Learnt from: gaoachao
PR: lynx-family/lynx-stack#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:
.changeset/seven-coats-appear.mdpackages/web-platform/web-core-server/src/createLynxView.tspackages/web-platform/web-core/src/apis/LynxView.ts
📚 Learning: 2025-07-22T09:23:07.797Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:23:07.797Z
Learning: In the lynx-family/lynx-stack repository, changesets are only required for meaningful changes to end-users such as bugfixes and features. Internal/development changes like chores, refactoring, or removing debug info do not need changeset entries.
Applied to files:
.changeset/seven-coats-appear.md
📚 Learning: 2025-07-22T09:26:16.722Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#1330
File: .changeset/olive-animals-attend.md:1-3
Timestamp: 2025-07-22T09:26:16.722Z
Learning: In the lynx-family/lynx-stack repository, CI checks require changesets when files matching the pattern "src/**" are modified (as configured in .changeset/config.json). For internal changes that don't need meaningful changesets, an empty changeset file is used to satisfy the CI requirement while not generating any release notes.
Applied to files:
.changeset/seven-coats-appear.md
📚 Learning: 2025-08-19T11:25:36.127Z
Learnt from: colinaaa
PR: lynx-family/lynx-stack#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/seven-coats-appear.md
📚 Learning: 2025-10-11T06:16:12.517Z
Learnt from: Sherry-hue
PR: lynx-family/lynx-stack#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.spec.tspackages/web-platform/web-tests/tests/react/basic-element-input-bindinput/index.jsx
🧬 Code graph analysis (2)
packages/web-platform/web-tests/tests/react.spec.ts (1)
packages/web-platform/web-tests/tests/react/basic-element-input-bindinput/index.jsx (1)
result(8-8)
packages/web-platform/web-tests/tests/react/basic-element-input-bindinput/index.jsx (1)
packages/web-platform/web-tests/tests/react/basic-element-x-input-bindinput/index.jsx (1)
App(6-40)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: build / Build (Windows)
- GitHub Check: build / Build (Ubuntu)
- GitHub Check: test-rust / Test (Ubuntu)
🔇 Additional comments (5)
packages/web-platform/web-core-server/src/createLynxView.ts (1)
84-84: LGTM! Consistent mapping addition.The
'input': 'x-input'mapping follows the established pattern for tag transformations and enables proper server-side rendering of input elements.packages/web-platform/web-core/src/apis/LynxView.ts (1)
423-423: LGTM! Client-side mapping completes the feature.The
'input': 'x-input'mapping in the client-side tagMap mirrors the server-side change, ensuring consistent input element rendering across both contexts..changeset/seven-coats-appear.md (1)
1-7: LGTM! Changeset properly documents the feature.The changeset appropriately bumps patch versions for the affected packages and clearly describes the input-to-x-input transformation feature.
packages/web-platform/web-tests/tests/react.spec.ts (1)
3006-3015: LGTM! Test validates input-to-x-input transformation.The new test appropriately verifies that plain
inputelements now behave identically tox-inputelements through the tag transformation mapping. The test structure correctly mirrors the existing x-input test to ensure feature parity.packages/web-platform/web-tests/tests/react/basic-element-input-bindinput/index.jsx (1)
30-34: LGTM! Input element properly configured for bindinput test.The plain
inputelement correctly uses thebindinputhandler and initial value, validating that the input-to-x-input transformation enables the expected behavior.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CodSpeed Performance ReportMerging #1907 will degrade performances by 8.76%Comparing Summary
Benchmarks breakdown
Footnotes
|
React Example#6039 Bundle Size — 237.5KiB (0%).b8d73e6(current) vs b736b6e main#6035(baseline) Bundle metrics
|
| Current #6039 |
Baseline #6035 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
0% |
|
0 |
0 |
|
4 |
4 |
|
165 |
165 |
|
67 |
67 |
|
46.77% |
46.77% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #6039 |
Baseline #6035 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
91.74KiB |
91.74KiB |
Bundle analysis report Branch Sherry-hue:feat/web-builtin-inpu... Project dashboard
Generated by RelativeCI Documentation Report issue
Web Explorer#6035 Bundle Size — 365.24KiB (~+0.01%).b8d73e6(current) vs b736b6e main#6031(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch Sherry-hue:feat/web-builtin-inpu... Project dashboard Generated by RelativeCI Documentation Report issue |
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.11.8 ### Patch Changes - feat: support web preview in rspeedy dev ([#1891](#1891)) - print URLs with labels - Updated dependencies \[]: - @lynx-js/web-rsbuild-server-middleware@0.18.2 ## @lynx-js/react-rsbuild-plugin@0.11.3 ### Patch Changes - Updated dependencies \[[`96545dd`](96545dd)]: - @lynx-js/template-webpack-plugin@0.9.1 - @lynx-js/css-extract-webpack-plugin@0.6.4 - @lynx-js/react-webpack-plugin@0.7.1 - @lynx-js/react-alias-rsbuild-plugin@0.11.3 ## @lynx-js/web-constants@0.18.2 ### Patch Changes - Updated dependencies \[]: - @lynx-js/web-worker-rpc@0.18.2 ## @lynx-js/web-core@0.18.2 ### Patch Changes - feat: builtinTagTransformMap add `'input': 'x-input'` ([#1907](#1907)) - Updated dependencies \[]: - @lynx-js/web-constants@0.18.2 - @lynx-js/web-mainthread-apis@0.18.2 - @lynx-js/web-worker-rpc@0.18.2 - @lynx-js/web-worker-runtime@0.18.2 ## @lynx-js/web-core-server@0.18.2 ### Patch Changes - feat: builtinTagTransformMap add `'input': 'x-input'` ([#1907](#1907)) ## @lynx-js/web-explorer@0.0.11 ### Patch Changes - feat: builtinTagTransformMap add `'input': 'x-input'` ([#1907](#1907)) ## @lynx-js/web-mainthread-apis@0.18.2 ### Patch Changes - Updated dependencies \[]: - @lynx-js/web-constants@0.18.2 - @lynx-js/web-style-transformer@0.18.2 ## @lynx-js/web-worker-runtime@0.18.2 ### Patch Changes - Updated dependencies \[]: - @lynx-js/web-constants@0.18.2 - @lynx-js/web-mainthread-apis@0.18.2 - @lynx-js/web-worker-rpc@0.18.2 ## @lynx-js/template-webpack-plugin@0.9.1 ### Patch Changes - Remove `compiler.hooks.initialize` as [it's not called in child compilers](https://github.com/web-infra-dev/rspack/blob/aa4ad886b900770787ecddd625d3e24a51b6b99c/packages/rspack/src/rspack.ts#L78). ([#1898](#1898)) ## create-rspeedy@0.11.8 ## @lynx-js/react-alias-rsbuild-plugin@0.11.3 ## upgrade-rspeedy@0.11.8 ## @lynx-js/web-rsbuild-server-middleware@0.18.2 ## @lynx-js/web-style-transformer@0.18.2 ## @lynx-js/web-worker-rpc@0.18.2 Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Summary by CodeRabbit
Release Notes
New Features
Tests
Chores
Checklist