Skip to content

sync: align with upstream rc fixes & features (trigger/input/menu/virtual-list)#59

Merged
aibayanyu20 merged 10 commits into
nextfrom
sync/vc-fix-feat-2026-06
Jun 3, 2026
Merged

sync: align with upstream rc fixes & features (trigger/input/menu/virtual-list)#59
aibayanyu20 merged 10 commits into
nextfrom
sync/vc-fix-feat-2026-06

Conversation

@aibayanyu20

Copy link
Copy Markdown
Member

同步 react-component 上游最新 fix/feat 到 @v-c/*

改动(按包)

类型 上游 PR 说明
fix @v-c/trigger trigger#615 force align 时一并保存/恢复 overflowX/overflowY,避免用户设置丢失
fix @v-c/input input#175 value 未变化时保留真实 target,避免 onChange 拿到 detached 克隆节点
feat @v-c/menu menu#864 onSelect/onClick 回调 info 新增 itemData(label/itemIcon/extra/key),items & children 模式均支持
feat @v-c/virtual-list virtual-list#358 scrollTooffset 支持函数 (info: { getSize }) => number

均为向后兼容(两个 fix + 两个非破坏性新增字段/能力)。

测试

  • 相关包单测全部通过(trigger/input/menu/virtual-list)
  • 唯一失败用例 trigger > ignores popup scale transforms 经 stash 验证为改动前即存在的历史失败,与本次无关
  • lint 通过

同步基线

.sync-upstream.json 已把本轮分析过的 17 个上游 last_synced_commit 推进到当前 HEAD(4 个已同步 + 13 个 deep-imports/version-bump 类已审阅跳过),25 个本就最新。

🤖 Generated with Claude Code

aibayanyu20 and others added 5 commits June 2, 2026 02:16
Sync react-component/trigger#615. Force align only saved/restored
`overflow`, dropping user-set `overflowX`/`overflowY` after alignment.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…ning

Sync react-component/input#175. When the value is unchanged, reuse the
real target instead of a detached cloned node so onChange's event.target
stays attached to the live DOM.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sync react-component/menu#864. Expose origin item config (label,
itemIcon, extra, key) via info.itemData. Supports both items and
children modes.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sync react-component/virtual-list#358. scrollTo offset now accepts a
function (info: { getSize }) => number for size-aware offsets, alongside
the existing number form.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Advance last_synced_commit to current HEAD for 17 upstreams analyzed
this round (4 synced + 13 reviewed-and-skipped). 25 already current.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c56bbc669f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread packages/menu/src/utils/nodeUtil.tsx Outdated
In items mode the displayed icon is resolved into the local `icon`
variable (from iconRender slot or item.icon), but itemData only read
`restProps.itemIcon`, so onClick/onSelect received
`itemData.itemIcon === undefined` for items that show an icon. Use the
resolved icon (falling back to the rc itemIcon field), matching how
label/extra are already populated. Adds a regression test.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@aibayanyu20

Copy link
Copy Markdown
Member Author

@codex /review

@aibayanyu20 aibayanyu20 merged commit 45ec87d into next Jun 3, 2026

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e4a3266907

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

{...restProps}
extra={extra}
icon={icon}
itemData={{ label, key: mergedKey, itemIcon: icon ?? restProps?.itemIcon, extra }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Stop forwarding itemData to the DOM

In items mode this new itemData object is passed into MergedMenuItem, but InternalMenuItem only removes role, disabled, and itemIcon before spreading restProps through LegacyMenuItem/Overflow.Item onto the rendered li. As a result every item with itemData gets a non-standard itemdata="[object Object]" attribute in the DOM (and the object can contain VNodes/functions). Please destructure or omit itemData before the DOM spread while still using it for the callback payload.

Useful? React with 👍 / 👎.

@aibayanyu20 aibayanyu20 deleted the sync/vc-fix-feat-2026-06 branch June 3, 2026 01:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant