-
Notifications
You must be signed in to change notification settings - Fork 111
feat(web): list estimated-main-axis-size-px supports && autoScroll op… #1911
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(web): list estimated-main-axis-size-px supports && autoScroll op… #1911
Conversation
🦋 Changeset detectedLatest commit: a7b684e The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
📝 WalkthroughWalkthroughAdds an attribute handler Changes
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes
Suggested reviewers
Poem
Pre-merge checks and finishing touches✅ 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 |
c75ede7 to
b3503c1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (3)
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx (1)
1-56: Remove unused import.The
useStateimport on line 4 is not used in this test file.Apply this diff:
-import { root, useEffect, useRef } from '@lynx-js/react'; +import { root, useEffect, useRef } from '@lynx-js/react';Wait, let me check again - the import doesn't include useState. Let me verify from the code...
Actually, looking at the code, line 4 only imports
root, useEffect, useRef- there's no unused import. The test looks clean and consistent with similar test files in the codebase.packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.jsx (1)
4-4: Remove unused import.
useStateis imported but never used in this file.Apply this diff:
-import { root, useRef, useState, useEffect } from '@lynx-js/react'; +import { root, useRef, useEffect } from '@lynx-js/react';packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsx (1)
4-4: Remove unused import.
useStateis imported but never used in this file.Apply this diff:
-import { root, useRef, useState, useEffect } from '@lynx-js/react'; +import { root, useRef, useEffect } from '@lynx-js/react';
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
.changeset/rude-windows-attack.md(1 hunks)packages/web-platform/web-elements/src/XList/ListItem.ts(1 hunks)packages/web-platform/web-elements/src/XList/ListItemAttributes.ts(1 hunks)packages/web-platform/web-elements/src/XList/XList.ts(3 hunks)packages/web-platform/web-elements/src/XList/XListWaterfall.ts(1 hunks)packages/web-platform/web-elements/src/XList/x-list.css(2 hunks)packages/web-platform/web-elements/src/all.ts(1 hunks)packages/web-platform/web-tests/tests/react.spec.ts(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsx(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.jsx(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/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/rude-windows-attack.md
🧠 Learnings (10)
📚 Learning: 2025-09-18T08:12:56.802Z
Learnt from: Sherry-hue
Repo: lynx-family/lynx-stack PR: 1770
File: packages/web-platform/web-mainthread-apis/src/utils/processStyleInfo.ts:316-318
Timestamp: 2025-09-18T08:12:56.802Z
Learning: In packages/web-platform/web-mainthread-apis/src/utils/processStyleInfo.ts, the current implementation uses cardStyleElement.textContent += for lazy component styles. While this could theoretically invalidate rule indices by reparsing the stylesheet, Sherry-hue indicated that UIDs don't repeat for the same element, making this approach acceptable for now. A future optimization to use separate style elements per entry was discussed but deferred to a separate PR to keep the current lazy bundle PR focused.
Applied to files:
packages/web-platform/web-elements/src/all.tspackages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.csspackages/web-platform/web-elements/src/XList/XListWaterfall.tspackages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.jsxpackages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.csspackages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.csspackages/web-platform/web-elements/src/XList/x-list.csspackages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.css
📚 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/rude-windows-attack.md
📚 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:
.changeset/rude-windows-attack.md
📚 Learning: 2025-07-22T09:23:07.797Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 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/rude-windows-attack.md
📚 Learning: 2025-08-07T04:00:59.645Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.645Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.
Applied to files:
.changeset/rude-windows-attack.md
📚 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-list-horizontal-estimated-main-axis-size-px/index.jsxpackages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsxpackages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsxpackages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.jsxpackages/web-platform/web-tests/tests/react.spec.ts
📚 Learning: 2025-08-06T13:28:57.182Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.182Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/react/testing-library/src/vitest.config.js` is source code for the testing library that gets exported for users, not a test configuration that should be included in the main vitest projects array.
Applied to files:
packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.jsxpackages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsxpackages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx
📚 Learning: 2025-08-06T13:28:57.182Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.182Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/rspeedy/create-rspeedy/template-react-vitest-rltl-js/vitest.config.js` is a template file for scaffolding new Rspeedy projects, not a test configuration that should be included in the main vitest projects array.
Applied to files:
packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.jsxpackages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsx
📚 Learning: 2025-08-13T09:20:00.936Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1502
File: packages/react/testing-library/types/entry.d.ts:71-71
Timestamp: 2025-08-13T09:20:00.936Z
Learning: In lynx-js/react testing library, wrapper components must have children as a required prop because they are always called with `h(WrapperComponent, null, innerElement)` where innerElement is passed as children. The type `React.JSXElementConstructor<{ children: React.ReactNode }>` correctly requires children to be mandatory.
Applied to files:
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx
📚 Learning: 2025-08-13T09:23:36.222Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1502
File: packages/react/testing-library/types/entry.d.ts:97-97
Timestamp: 2025-08-13T09:23:36.222Z
Learning: React Testing Library's rerender function accepts React.ReactNode (including strings, numbers, null, etc.), not just React.ReactElement. The typing should match RTL's behavior by using React.ReactNode for maximum compatibility.
Applied to files:
packages/web-platform/web-tests/tests/react.spec.ts
🧬 Code graph analysis (5)
packages/web-platform/web-elements/src/XList/ListItemAttributes.ts (1)
packages/web-platform/web-elements/src/XText/XTextTruncation.ts (1)
parseFloat(302-317)
packages/web-platform/web-elements/src/XList/ListItem.ts (2)
packages/web-platform/web-elements/src/common/CommonEventsAndMethods.ts (1)
CommonEventsAndMethods(10-62)packages/web-platform/web-elements/src/XList/ListItemAttributes.ts (1)
ListItemAttributes(15-34)
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsx (2)
packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.jsx (3)
data(7-13)ref(16-16)handleScrollToLower(18-20)packages/web-platform/web-tests/tests/react/basic-element-list-waterfall/index.jsx (1)
App(29-43)
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx (3)
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsx (2)
ref(16-16)handleScrollToLower(18-20)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.jsx (2)
ref(16-16)handleScrollToLower(18-20)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.jsx (2)
ref(8-8)handleScrollToLower(10-12)
packages/web-platform/web-tests/tests/react.spec.ts (1)
packages/web-platform/web-tests/tests/coverage-fixture.ts (1)
test(11-60)
🪛 LanguageTool
.changeset/rude-windows-attack.md
[style] ~7-~7: Consider using a different verb for a more formal wording.
Context: ...list-item are no longer required. 2. Fixed an issue where the list `lower-threshol...
(FIX_RESOLVE)
[style] ~9-~9: Consider using a different verb for a more formal wording.
Context: ...al layout under a waterfall layout. 3. Fixed an issue where calling the list `autoSc...
(FIX_RESOLVE)
🔇 Additional comments (17)
.changeset/rude-windows-attack.md (1)
1-9: Changeset looks good!The changeset properly documents the three user-facing improvements in this PR:
- Support for
estimated-main-axis-size-pxproperty- Horizontal waterfall layout event triggering fix
autoScrollbehavior fix inuseEffectThe content is clear and provides appropriate release notes for a patch release.
packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.css (1)
1-22: LGTM!The CSS provides clean, simple styling for the horizontal list test page. The layout structure (full-viewport page, fixed-height list, styled items) is consistent with the other test pages in this PR.
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.css (1)
1-22: LGTM!The CSS properly supports the waterfall test page with dynamic item coloring via the
--item-indexCSS variable. The HSL calculation provides visually distinct items for testing purposes.packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.css (1)
1-22: LGTM!The CSS provides appropriate styling for the basic estimated-main-axis-size-px test page. The layout is consistent with the other test variants introduced in this PR.
packages/web-platform/web-elements/src/all.ts (1)
17-17: LGTM!The import addition properly includes
ListItem.jsin the module load sequence, which is necessary for the newListItemAttributesfunctionality introduced in this PR.packages/web-platform/web-elements/src/XList/XListWaterfall.ts (1)
169-180: LGTM! Horizontal waterfall layout fix is correct.The changes properly address the horizontal waterfall layout issue by:
- Using
scrollWidthinstead ofscrollHeightfor horizontal scroll measurement (Line 172)- Adding
'important'priority to style property assignments (Lines 173, 179) to ensure styles apply correctlyThese changes align with the vertical layout implementation and fix the
lower-threshold-item-countevent triggering issue mentioned in the changeset.packages/web-platform/web-elements/src/XList/x-list.css (2)
63-64: LGTM! CSS containment properly implements estimated-main-axis-size-px support.The CSS containment properties enable list items to size themselves based on the
estimated-main-axis-size-pxattribute:
contain: sizeapplies size containmentcontain-intrinsic-size: auto var(--estimated-main-axis-size-px)uses the estimated size (mapped from the attribute viaListItemAttributes) before actual measurementThis allows list items to render without requiring explicit width/height, as described in the changeset.
271-271: LGTM! Correct positioning for horizontal waterfall observer.Unsetting
bottompositioning ensures the horizontal waterfall lower-threshold observer is positioned correctly usingright: -999px(Line 272) instead of conflicting with bottom-based positioning from the vertical layout.packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.css (1)
1-22: LGTM!The CSS provides appropriate styling for the horizontal waterfall test page with dynamic item coloring. The implementation is consistent with the vertical waterfall variant and supports the test scenario properly.
packages/web-platform/web-elements/src/XList/ListItem.ts (1)
8-13: LGTM! Clean integration of ListItemAttributes.The decorator dependency update correctly wires the new
ListItemAttributesclass into theListItemcomponent, enabling reactive handling for theestimated-main-axis-size-pxattribute. The pattern follows the existing structure withCommonEventsAndMethods.packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx (1)
1-56: LGTM! Test structure is consistent.The test file correctly exercises the
estimated-main-axis-size-pxattribute with autoScroll and scrolltolower event handling. The structure is consistent with similar test files in the codebase.packages/web-platform/web-tests/tests/react.spec.ts (1)
4525-4600: Verify the wait time variance across test scenarios.The new tests use different wait times: 3000ms for the basic scenario and 5000ms for waterfall/horizontal variants. While this may be intentional to account for different layout calculation times, consider:
- Are these wait times empirically determined or estimates?
- Could a helper function or constant define these timeouts to make the distinction explicit?
The tests are well-structured and follow existing patterns. If the wait times are based on actual rendering/scrolling behavior, they're acceptable.
packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.jsx (1)
1-57: LGTM! Horizontal orientation test is correctly configured.The test properly exercises horizontal scrolling with
scroll-orientation='horizontal'and is consistent with the vertical variant.packages/web-platform/web-elements/src/XList/XList.ts (3)
112-114: LGTM! Proper autoScroll initialization.The initial kick-off logic correctly establishes the first timestamp before beginning actual scroll calculations, preventing incorrect deltaTime on the first frame.
128-143: LGTM! Orientation-aware scrolling correctly implemented.The auto-stop logic properly handles both vertical and horizontal orientations, with correct scrollability checks and end-position clamping for each axis.
180-192: Verify the setTimeout approach for render timing.The
setTimeout(..., 0)on line 189 addresses cases where the scroll container hasn't fully rendered, but this could introduce subtle timing issues:
- If
autoScrollis called multiple times in quick succession, multiple timeouts could be scheduled- The scrollability check might still pass even if rendering isn't complete
Consider:
- Adding a flag to prevent multiple concurrent autoScroll initializations
- Or documenting that callers should wait for initial render completion
The orientation-aware logic itself is correct and aligns with the runtime path.
packages/web-platform/web-elements/src/XList/ListItemAttributes.ts (1)
15-34: LGTM! Clean reactive attribute implementation.The
ListItemAttributesclass correctly implements the reactive attribute pattern:
- Uses
@registerAttributeHandlerdecorator appropriately- Maps
estimated-main-axis-size-pxto CSS variable--estimated-main-axis-size-px- Properly converts the value to pixel format with
parseFloatThe CSS variable approach provides flexibility for downstream styling and layout calculations.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
CodSpeed Performance ReportMerging #1911 will degrade performances by 7.35%Comparing Summary
Benchmarks breakdown
Footnotes
|
React Example#6083 Bundle Size — 237.45KiB (0%).a7b684e(current) vs 0d7a4c3 main#6078(baseline) Bundle metrics
|
| Current #6083 |
Baseline #6078 |
|
|---|---|---|
0B |
0B |
|
0B |
0B |
|
0% |
38.63% |
|
0 |
0 |
|
4 |
4 |
|
165 |
165 |
|
67 |
67 |
|
46.77% |
46.77% |
|
2 |
2 |
|
0 |
0 |
Bundle size by type no changes
| Current #6083 |
Baseline #6078 |
|
|---|---|---|
145.76KiB |
145.76KiB |
|
91.69KiB |
91.69KiB |
Bundle analysis report Branch Sherry-hue:feat/list-esti-autoSc... Project dashboard
Generated by RelativeCI Documentation Report issue
Web Explorer#6079 Bundle Size — 366.66KiB (+0.39%).a7b684e(current) vs 0d7a4c3 main#6074(baseline) Bundle metrics
Bundle size by type
Bundle analysis report Branch Sherry-hue:feat/list-esti-autoSc... Project dashboard Generated by RelativeCI Documentation Report issue |
b3503c1 to
37b597f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
🧹 Nitpick comments (1)
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx (1)
26-56: Test implementation looks correct.The list structure with
estimated-main-axis-size-px={100}consistently applied to all list-items correctly tests the new feature. The vertical single-type list configuration is appropriate for this test case.Note: Similar test files exist for waterfall and horizontal variants with nearly identical structure. While acceptable for test files, consider extracting a shared test component factory if more variants are added in the future to reduce maintenance overhead.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
.changeset/rude-windows-attack.md(1 hunks)packages/web-platform/web-elements/src/XList/ListItem.ts(1 hunks)packages/web-platform/web-elements/src/XList/ListItemAttributes.ts(1 hunks)packages/web-platform/web-elements/src/XList/XList.ts(3 hunks)packages/web-platform/web-elements/src/XList/XListWaterfall.ts(2 hunks)packages/web-platform/web-elements/src/XList/x-list.css(2 hunks)packages/web-platform/web-elements/src/all.ts(1 hunks)packages/web-platform/web-tests/tests/react.spec.ts(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsx(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.jsx(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.jsx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
- packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.jsx
- packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.css
- packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.css
- packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.jsx
- packages/web-platform/web-elements/src/XList/x-list.css
- packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.css
- packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.css
- packages/web-platform/web-elements/src/all.ts
- packages/web-platform/web-tests/tests/react.spec.ts
- packages/web-platform/web-elements/src/XList/XList.ts
- packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsx
🧰 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/rude-windows-attack.md
🧠 Learnings (9)
📓 Common learnings
Learnt from: Sherry-hue
Repo: lynx-family/lynx-stack PR: 1770
File: packages/web-platform/web-mainthread-apis/src/utils/processStyleInfo.ts:316-318
Timestamp: 2025-09-18T08:12:56.802Z
Learning: In packages/web-platform/web-mainthread-apis/src/utils/processStyleInfo.ts, the current implementation uses cardStyleElement.textContent += for lazy component styles. While this could theoretically invalidate rule indices by reparsing the stylesheet, Sherry-hue indicated that UIDs don't repeat for the same element, making this approach acceptable for now. A future optimization to use separate style elements per entry was discussed but deferred to a separate PR to keep the current lazy bundle PR focused.
📚 Learning: 2025-09-18T08:12:56.802Z
Learnt from: Sherry-hue
Repo: lynx-family/lynx-stack PR: 1770
File: packages/web-platform/web-mainthread-apis/src/utils/processStyleInfo.ts:316-318
Timestamp: 2025-09-18T08:12:56.802Z
Learning: In packages/web-platform/web-mainthread-apis/src/utils/processStyleInfo.ts, the current implementation uses cardStyleElement.textContent += for lazy component styles. While this could theoretically invalidate rule indices by reparsing the stylesheet, Sherry-hue indicated that UIDs don't repeat for the same element, making this approach acceptable for now. A future optimization to use separate style elements per entry was discussed but deferred to a separate PR to keep the current lazy bundle PR focused.
Applied to files:
packages/web-platform/web-elements/src/XList/XListWaterfall.ts.changeset/rude-windows-attack.md
📚 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-list-estimated-main-axis-size-px/index.jsx
📚 Learning: 2025-08-06T13:28:57.182Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.182Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/react/testing-library/src/vitest.config.js` is source code for the testing library that gets exported for users, not a test configuration that should be included in the main vitest projects array.
Applied to files:
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx
📚 Learning: 2025-08-06T13:28:57.182Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1453
File: vitest.config.ts:49-61
Timestamp: 2025-08-06T13:28:57.182Z
Learning: In the lynx-family/lynx-stack repository, the file `packages/rspeedy/create-rspeedy/template-react-vitest-rltl-js/vitest.config.js` is a template file for scaffolding new Rspeedy projects, not a test configuration that should be included in the main vitest projects array.
Applied to files:
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx
📚 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:
.changeset/rude-windows-attack.md
📚 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/rude-windows-attack.md
📚 Learning: 2025-07-22T09:23:07.797Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 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/rude-windows-attack.md
📚 Learning: 2025-08-07T04:00:59.645Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.645Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.
Applied to files:
.changeset/rude-windows-attack.md
🧬 Code graph analysis (3)
packages/web-platform/web-elements/src/XList/ListItemAttributes.ts (2)
packages/web-platform/web-elements-reactive/src/index.ts (1)
bindToStyle(8-8)packages/web-platform/web-elements/src/XText/XTextTruncation.ts (1)
parseFloat(302-317)
packages/web-platform/web-elements/src/XList/ListItem.ts (2)
packages/web-platform/web-elements/src/common/CommonEventsAndMethods.ts (1)
CommonEventsAndMethods(10-62)packages/web-platform/web-elements/src/XList/ListItemAttributes.ts (1)
ListItemAttributes(15-34)
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx (3)
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsx (2)
ref(16-16)handleScrollToLower(18-20)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.jsx (2)
ref(16-16)handleScrollToLower(18-20)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.jsx (2)
ref(8-8)handleScrollToLower(10-12)
🪛 LanguageTool
.changeset/rude-windows-attack.md
[style] ~7-~7: Consider using a different verb for a more formal wording.
Context: ...list-item are no longer required. 2. Fixed an issue where the list `lower-threshol...
(FIX_RESOLVE)
[style] ~9-~9: Consider using a different verb for a more formal wording.
Context: ...al layout under a waterfall layout. 3. Fixed an issue where calling the list `autoSc...
(FIX_RESOLVE)
🔇 Additional comments (4)
packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx (1)
7-12: LGTM! Standard test setup.The ref and event handler setup follows the expected pattern for Playwright integration tests, where console output is typically captured and verified in the spec file.
.changeset/rude-windows-attack.md (1)
5-9: Release notes read clearlyThe entry succinctly captures each user-facing change, so nothing further needed here.
packages/web-platform/web-elements/src/XList/ListItem.ts (1)
10-13: Correct dependency wiring for attribute handlerHooking
ListItemAttributesinto the component ensures the new reactive attribute logic activates for every<list-item>. Looks good.packages/web-platform/web-elements/src/XList/XListWaterfall.ts (1)
32-74: Centralized scrolltolower enablement looks solidToggling the enabling attribute and deferring the orientation-aware measurement fixes the horizontal waterfall gap while keeping the observer logic localized. Implementation checks out.
.../web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx
Show resolved
Hide resolved
37b597f to
c3302a0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
packages/web-platform/web-tests/tests/react.spec.ts (1)
4525-4600: Consider extracting a helper function to reduce duplication.The four new test cases follow an identical pattern with only the test title and wait time varying. While the current implementation is correct and consistent with existing patterns in this file, extracting a helper function could improve maintainability.
Example refactor:
const testScrollToLower = async ( page: Page, title: string, waitTime: number, ) => { let scrolltolower = false; await page.on('console', async (msg) => { const event = await msg.args()[0]?.evaluate((e) => ({ type: e.type, })); if (!event) return; if (event.type === 'scrolltolower') { scrolltolower = true; } }); await goto(page, title); await wait(waitTime); expect(scrolltolower).toBeTruthy(); }; test('basic-element-list-estimated-main-axis-size-px', async ({ page }, { title }) => { await testScrollToLower(page, title, 3000); });packages/web-platform/web-elements/src/XList/XList.ts (1)
128-142: Clarify variable naming for readability.The variable name
isContainerScrollable(lines 131-134) is misleading—it's actually checking whether scrolling has reached the end, not whether the container is scrollable. Consider renaming tohasReachedEndorisAtScrollEndfor clarity.Apply this diff:
- const isContainerScrollable = isScrollVertical + const hasReachedEnd = isScrollVertical ? scrollContainer.scrollTop + scrollContainer.clientHeight >= scrollContainer.scrollHeight : scrollContainer.scrollLeft + scrollContainer.clientWidth >= scrollContainer.scrollWidth; - if (isContainerScrollable && this.#autoScrollOptions.autoStop) { + if (hasReachedEnd && this.#autoScrollOptions.autoStop) {
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (16)
.changeset/rude-windows-attack.md(1 hunks)packages/web-platform/web-elements/src/XList/ListItem.ts(1 hunks)packages/web-platform/web-elements/src/XList/ListItemAttributes.ts(1 hunks)packages/web-platform/web-elements/src/XList/XList.ts(3 hunks)packages/web-platform/web-elements/src/XList/XListWaterfall.ts(2 hunks)packages/web-platform/web-elements/src/XList/x-list.css(2 hunks)packages/web-platform/web-elements/src/all.ts(1 hunks)packages/web-platform/web-tests/tests/react.spec.ts(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsx(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.jsx(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.css(1 hunks)packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.jsx(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (11)
- packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.css
- packages/web-platform/web-elements/src/XList/x-list.css
- packages/web-platform/web-elements/src/all.ts
- packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.jsx
- packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.jsx
- packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px/index.css
- packages/web-platform/web-elements/src/XList/ListItemAttributes.ts
- packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.css
- packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px/index.css
- packages/web-platform/web-tests/tests/react/basic-element-list-estimated-main-axis-size-px-waterfall/index.jsx
- packages/web-platform/web-tests/tests/react/basic-element-list-horizontal-estimated-main-axis-size-px-waterfall/index.jsx
🧰 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/rude-windows-attack.md
🧠 Learnings (7)
📚 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.spec.ts
📚 Learning: 2025-08-13T09:23:36.222Z
Learnt from: upupming
Repo: lynx-family/lynx-stack PR: 1502
File: packages/react/testing-library/types/entry.d.ts:97-97
Timestamp: 2025-08-13T09:23:36.222Z
Learning: React Testing Library's rerender function accepts React.ReactNode (including strings, numbers, null, etc.), not just React.ReactElement. The typing should match RTL's behavior by using React.ReactNode for maximum compatibility.
Applied to files:
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, 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/rude-windows-attack.md
📚 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/rude-windows-attack.md
📚 Learning: 2025-09-18T08:12:56.802Z
Learnt from: Sherry-hue
Repo: lynx-family/lynx-stack PR: 1770
File: packages/web-platform/web-mainthread-apis/src/utils/processStyleInfo.ts:316-318
Timestamp: 2025-09-18T08:12:56.802Z
Learning: In packages/web-platform/web-mainthread-apis/src/utils/processStyleInfo.ts, the current implementation uses cardStyleElement.textContent += for lazy component styles. While this could theoretically invalidate rule indices by reparsing the stylesheet, Sherry-hue indicated that UIDs don't repeat for the same element, making this approach acceptable for now. A future optimization to use separate style elements per entry was discussed but deferred to a separate PR to keep the current lazy bundle PR focused.
Applied to files:
.changeset/rude-windows-attack.md
📚 Learning: 2025-07-22T09:23:07.797Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 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/rude-windows-attack.md
📚 Learning: 2025-08-07T04:00:59.645Z
Learnt from: colinaaa
Repo: lynx-family/lynx-stack PR: 1454
File: pnpm-workspace.yaml:46-46
Timestamp: 2025-08-07T04:00:59.645Z
Learning: In the lynx-family/lynx-stack repository, the webpack patch (patches/webpack5.101.0.patch) was created to fix issues with webpack5.99.9 but only takes effect on webpack5.100.0 and later versions. The patchedDependencies entry should use "webpack@^5.100.0" to ensure the patch applies to the correct version range.
Applied to files:
.changeset/rude-windows-attack.md
🧬 Code graph analysis (2)
packages/web-platform/web-elements/src/XList/ListItem.ts (2)
packages/web-platform/web-elements/src/common/CommonEventsAndMethods.ts (1)
CommonEventsAndMethods(10-62)packages/web-platform/web-elements/src/XList/ListItemAttributes.ts (1)
ListItemAttributes(15-34)
packages/web-platform/web-elements/src/XList/XList.ts (1)
packages/web-platform/web-elements/src/XViewpagerNg/XViewpagerNgEvents.ts (1)
scrollContainer(93-124)
🪛 LanguageTool
.changeset/rude-windows-attack.md
[style] ~7-~7: Consider using a different verb for a more formal wording.
Context: ...list-item are no longer required. 2. Fixed an issue where the list `lower-threshol...
(FIX_RESOLVE)
[style] ~9-~9: Consider using a different verb for a more formal wording.
Context: ...al layout under a waterfall layout. 3. Fixed an issue where calling the list `autoSc...
(FIX_RESOLVE)
[style] ~11-~11: Consider using a different verb for a more formal wording.
Context: ...od in useEffect might not scroll. 4. Fixed an issue where the scrolltolower even...
(FIX_RESOLVE)
⏰ 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 (6)
.changeset/rude-windows-attack.md (1)
1-11: LGTM!The changeset clearly describes the new feature and bug fixes for end-users. The format follows the repository's conventions for meaningful user-facing changes.
packages/web-platform/web-elements/src/XList/ListItem.ts (1)
8-13: LGTM!The integration of
ListItemAttributesinto the component dependency array is clean and follows the existing pattern. This properly wires up the newestimated-main-axis-size-pxattribute support.packages/web-platform/web-elements/src/XList/XListWaterfall.ts (1)
32-75: LGTM! Event-driven approach improves timing.The new
#handleXEnableHeaderOffsetEventconsolidates lower-threshold observer style updates behind an enable/disable signal, replacing the previous initialization-time logic. The 100ms delay appropriately handles cases where list-items don't have specified heights and need time to calculate scrollable values.The orientation-aware positioning (vertical: top/bottom, horizontal: left/right) correctly handles both layout modes, and the Firefox-specific 'unset' workaround addresses known browser-specific IntersectionObserver issues.
packages/web-platform/web-elements/src/XList/XList.ts (3)
110-114: Verify setTimeout removal is intentional.The
setTimeoutwrapper was removed from this continuation path (line 112), but the comment on line 189 in theautoScrollmethod explains thatsetTimeoutis necessary "During the initial render, there might be instances in raq where scrollContainer hasn't fully expanded (rendering hasn't succeeded yet)."This creates an inconsistency: the initial call uses
setTimeout(() => requestAnimationFrame(...), 0)(line 189), but subsequent calls use directrequestAnimationFrame(...)(line 112). Please confirm this is intentional. If the render timing issue only affects the first frame, this is correct; otherwise, the setTimeout might be needed for all frames.
123-124: Good optimization to prevent lag.Changing scroll behavior from 'smooth' to 'auto' is appropriate for programmatic auto-scrolling to avoid performance issues with continuous smooth animations.
180-192: LGTM! Orientation-aware initialization improves reliability.The initialization logic correctly determines scroll orientation, checks scrollability along the active axis, and uses
setTimeoutto delay the firstautoScrollwhen the container is scrollable (accommodating render completion). This addresses the timing issue mentioned in the comment.
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/[email protected] ### Patch Changes - During hydration, replace update with insert + remove for same-type `<list-item />` with different `item-key` so the Lynx Engine detects changes. ([#1598](#1598)) ```html Hydrate List B into List A: List A: <list> <list-item item-key="a">hello</list-item> <list-item item-key="a">world</list-item> </list> List B: <list> <list-item item-key="a1">hello</list-item> <list-item item-key="a2">world</list-item> </list> ``` Previously this case was hydrated as an update; it is now emitted as insert + remove to ensure SDK detection. - Bump `swc_core` v47. ([#1916](#1916)) - Pass sourcemap generated by rspack to swc transformer. ([#1910](#1910)) - When engineVersion is greater than or equal to 3.1, use `__SetAttribute` to set text attribute for text node instead of creating a raw text node. ([#1880](#1880)) - Add profile for list `update-list-info`. ([#1480](#1480)) - Support testing React Compiler in testing library. Enable React Compiler by setting the `experimental_enableReactCompiler` option of `createVitestConfig` to `true`. ([#1269](#1269)) ```js import { defineConfig, mergeConfig } from "vitest/config"; import { createVitestConfig } from "@lynx-js/react/testing-library/vitest-config"; const defaultConfig = await createVitestConfig({ runtimePkgName: "@lynx-js/react", experimental_enableReactCompiler: true, }); export default mergeConfig(defaultConfig, config); ``` ## @lynx-js/[email protected] ### Patch Changes - Updated dependencies \[]: - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - fix: print out the output chunk urls ([#1921](#1921)) ## @lynx-js/[email protected] ### Patch Changes - When engineVersion is greater than or equal to 3.1, use `__SetAttribute` to set text attribute for text node instead of creating a raw text node. ([#1880](#1880)) - Add `react-compiler-runtime` to `resolve.dedupe`. ([#1269](#1269)) With this change you can setup [React Compiler](https://react.dev/learn/react-compiler) for ReactLynx by `pluginBabel`: ```js import { defineConfig } from "@lynx-js/rspeedy"; import { pluginBabel } from "@rsbuild/plugin-babel"; export default defineConfig({ plugins: [ pluginBabel({ include: /\.(?:jsx|tsx)$/, babelLoaderOptions(opts) { opts.plugins?.unshift([ "babel-plugin-react-compiler", // See https://react.dev/reference/react-compiler/configuration for config { // ReactLynx only supports target to version 17 target: "17", }, ]); }, }), ], }); ``` - Updated dependencies \[[`e7d186a`](e7d186a), [`0d7a4c3`](0d7a4c3)]: - @lynx-js/[email protected] - @lynx-js/[email protected] - @lynx-js/[email protected] - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - feat: add \_\_GetSourceMapRelease API for nativeApp. ([#1923](#1923)) - Updated dependencies \[]: - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - Updated dependencies \[[`fece7d0`](fece7d0), [`e1db63f`](e1db63f), [`ebc1a60`](ebc1a60)]: - @lynx-js/[email protected] - @lynx-js/[email protected] - @lynx-js/[email protected] - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - fix: define x-foldview-slot-drag-ng typo. ([#1915](#1915)) - feat: 1. Added support for the list `estimated-main-axis-size-px` property; the width and height of `list-item` are no longer required. ([#1911](#1911)) 2. Fixed an issue where the list `lower-threshold-item-count` event would not trigger when using a horizontal layout under a waterfall layout. 3. Fixed an issue where calling the list `autoScroll` method in `useEffect` might not scroll. 4. Fixed an issue where the `scrolltolower` event might not be triggered in waterfall, because the lower styles was not updated in `registerEventEnableStatusChangeHandler`. - Updated dependencies \[]: - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - fix: define x-foldview-slot-drag-ng typo. ([#1915](#1915)) ## @lynx-js/[email protected] ### Patch Changes - feat: update @lynx-js/web-elements to 0.8.10 ([#1914](#1914)) ## @lynx-js/[email protected] ### Patch Changes - fix: The `e.detail` in the `bindtap` callback needs to correctly include `x` and `y`. ([#1913](#1913)) - Updated dependencies \[[`ebc1a60`](ebc1a60)]: - @lynx-js/[email protected] - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - fix: `this` may be undefined in Card(). ([#1922](#1922)) - feat: add \_\_GetSourceMapRelease API for nativeApp. ([#1923](#1923)) - Updated dependencies \[[`fece7d0`](fece7d0), [`ebc1a60`](ebc1a60)]: - @lynx-js/[email protected] - @lynx-js/[email protected] - @lynx-js/[email protected] ## @lynx-js/[email protected] ### Patch Changes - Pass sourcemap generated by rspack to swc transformer. ([#1910](#1910)) - When engineVersion is greater than or equal to 3.1, use `__SetAttribute` to set text attribute for text node instead of creating a raw text node. ([#1880](#1880)) ## [email protected] ## @lynx-js/[email protected] ## [email protected] ## @lynx-js/[email protected] ## @lynx-js/[email protected] ## @lynx-js/[email protected] ## @lynx-js/[email protected] ## @lynx-js/[email protected] Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…timization
Summary by CodeRabbit
New Features
Bug Fixes
Tests
Checklist