Skip to content

chore: migrate tdesign-mobile-react into the tdesign-react monorepo - #4506

Open
anlyyao wants to merge 1244 commits into
developfrom
chore/migrate-mobile
Open

anlyyao wants to merge 1244 commits into
developfrom
chore/migrate-mobile

Conversation

@anlyyao

@anlyyao anlyyao commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

🤔 这个 PR 的性质是?

  • 日常 bug 修复
  • 新特性提交
  • 文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • CI/CD 改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他

🔗 相关 Issue

💡 需求背景和解决方案

背景

tdesign-mobile-react 仓库迁移到 tdesign-react 大仓

保留原仓提交记录,同时 commit hash 值会全部变更。等当前 PR 合并后,原仓会直接归档/read-only。

  • 移动端组件源码、测试、站点统一迁入 monorepo 对应目录
  • 统一测试栈:升级 vitest 至 3.x、jsdom 至 24.x。桌面端用例适配 jsdom 24 的 CSS 序列化变化
  • 调整测试目录:test/snap 按 pc/mobile 分端,mock 归入 test/mocks/mobile,并新增全局 setup 入口 test/setup.js
  • 整合构建配置:rollup.mobile.config.js、tsconfig.mobile.build.json,bundle-override.js 参数化合并两端逻辑

TODO

  • 等 tdesign-mobile-react 下次从新 monorepo 正式发版到 npm 后,可移除 .github/workflows/pkg-pr-new.yml 中的 --no-compact 恢复短链

pkg-pr-new 的紧凑短链需要依赖 npm registry 上该包的 repository 元数据来反解 owner/repo。tdesign-mobile-react 在 npm 上最新版的 repository 仍指向迁移前的旧仓库 Tencent/tdesign-mobile-react,导致 https://pkg.pr.new/tdesign-mobile-react@4506 被解析到旧仓库而 404

📝 更新日志

  • 本条 PR 不需要纳入 Changelog

tdesign-react

@tdesign-react/chat

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项。⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • Changelog 已提供或无须提供

anlyyao and others added 30 commits August 28, 2025 17:06
* chore: publish v0.19.1

* chore: changelog's changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* Update image source for user group QR code

* Fix image source for user group in README

Updated image source for user group in README.
* test(divider): merged test cases for the divider component and optimized

Merged the original two test files into one, removed duplicates, and optimized the format.

fix #697

* test(divider): standardize divider test cases

standardize Divider test cases

fix #697

* test(divider): removed some unnecessary snapshots

- Align, layout, dashed assertions: no snapshot storage (verify CSS classes).

fix #697

* test(layout): optimized the unit tests for the layout component

- Merged multiple test files and optimized the test cases

fix #697
… props of 'current' is a string (#761)

- Character conversion when the props of 'current' is a string
* test(drawer): add unit test

* chore: update snapshot

* fix: fix cr

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: anlyyao <anly_yaw@163.com>
- Merged duplicate test cases and added supplementary ones, achieving 100% coverage.

fix #697
* test(component): add test case of stepper

* fix: fix cr

---------

Co-authored-by: anlyyao <anly_yaw@163.com>
* test(pull-down-refresh): add pull-down-refresh test

* test(pull-down-refresh): improve coverage

* test(pull-down-refresh): improve code and add coverage

* test(pull-down-refresh): improve hooks test

* test(pull-down-refresh): improve test coverage

* fix(PullDownRefresh): fix change event always being triggered twice

* chore: update demo

---------

Co-authored-by: anlyyao <anly_yaw@163.com>
* test(DropdownMenu): add test

* test: refactor code structure for improved readability and maintainability

* chore: update snapshot

* test(DropdownMenu): enhance tests for custom options and rendering behavior

* test(DropdownItem): add comprehensive tests for DropdownItem component functionality

* test: improve test coverage for dropdownMenu

* test(dropdown-menu): add clickaway behavior tests for DropdownItem and enhance existing tests

* test: update dropdownMenu test coverage to 100%

* test: remove snapshot tests for DropdownItem and DropdownMenu

* test(dropdown-item): simplify style check by asserting style attribute is null

* test(dropdown-item): simplify style check by removing unnecessary null check

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
* fix(image): update Image component examples

* fix(image): update unit test

* chore: formatting unit test files

* chore: update demo

---------

Co-authored-by: anlyyao <anly_yaw@163.com>
* test: (table): add table test

* test: add table test case
* test(cell): add cell test

* chore: formatting unit test files

---------

Co-authored-by: anlyyao <anly_yaw@163.com>
* test(Qrcode): add qrcode's unit test

* fix: resolve conflicts

---------

Co-authored-by: anlyyao <anly_yaw@163.com>
* feat(test): 新增 Rate 相关组件测试,优化提示框逻辑与安全访问

* test: 移除 Rate 组件拖拽时 Tips 显示值测试用例

* refactor: 重构测试用例分组,新增提示隐藏延迟常量

---------

Co-authored-by: lockiechen <290015551@qq.com>
* test(count-down): add count-down test (#697)

* test(CountDown): 修复报错信息 (#697)

* test: update test case name

---------

Co-authored-by: novlan1 <1576271227@qq.com>
* feat(Message): add unit test and fix problems

* chore: test

* feat(message): support object type of link

* test(message): 提升覆盖率

* test: 提升覆盖率

---------

Co-authored-by: novlan1 <1576271227@qq.com>
* feat(icon): upgrade icon 0.4.x

* chore: update snapshot

* fix(site): repair document rendering failed

* feat(Icon): update demo

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: anlyyao <anly_yaw@163.com>
* chore: update group code path (#759)

* Update image source for user group QR code

* Fix image source for user group in README

Updated image source for user group in README.

* test(layout): optimized the unit tests for the layout component (#749)

* test(divider): merged test cases for the divider component and optimized

Merged the original two test files into one, removed duplicates, and optimized the format.

fix #697

* test(divider): standardize divider test cases

standardize Divider test cases

fix #697

* test(divider): removed some unnecessary snapshots

- Align, layout, dashed assertions: no snapshot storage (verify CSS classes).

fix #697

* test(layout): optimized the unit tests for the layout component

- Merged multiple test files and optimized the test cases

fix #697

* fix(steps): inconsistent rendering between string and number when the props of 'current' is a string (#761)

- Character conversion when the props of 'current' is a string

* test(drawer): add unit test (#767)

* test(drawer): add unit test

* chore: update snapshot

* fix: fix cr

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: anlyyao <anly_yaw@163.com>

* test(steps): optimized the unit tests for the steps component (#765)

- Merged duplicate test cases and added supplementary ones, achieving 100% coverage.

fix #697

* test(component): add test case of stepper (#763)

* test(component): add test case of stepper

* fix: fix cr

---------

Co-authored-by: anlyyao <anly_yaw@163.com>

* test(pull-down-refresh): add pull-down-refresh test (#774)

* test(pull-down-refresh): add pull-down-refresh test

* test(pull-down-refresh): improve coverage

* test(pull-down-refresh): improve code and add coverage

* test(pull-down-refresh): improve hooks test

* test(pull-down-refresh): improve test coverage

* fix(PullDownRefresh): fix change event always being triggered twice

* chore: update demo

---------

Co-authored-by: anlyyao <anly_yaw@163.com>

* test(DropdownMenu): add test (#762)

* test(DropdownMenu): add test

* test: refactor code structure for improved readability and maintainability

* chore: update snapshot

* test(DropdownMenu): enhance tests for custom options and rendering behavior

* test(DropdownItem): add comprehensive tests for DropdownItem component functionality

* test: improve test coverage for dropdownMenu

* test(dropdown-menu): add clickaway behavior tests for DropdownItem and enhance existing tests

* test: update dropdownMenu test coverage to 100%

* test: remove snapshot tests for DropdownItem and DropdownMenu

* test(dropdown-item): simplify style check by asserting style attribute is null

* test(dropdown-item): simplify style check by removing unnecessary null check

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>

* 更新`Image`组件示例对齐 (#769)

* fix(image): update Image component examples

* fix(image): update unit test

* chore: formatting unit test files

* chore: update demo

---------

Co-authored-by: anlyyao <anly_yaw@163.com>

* test(table): add table test (#751)

* test: (table): add table test

* test: add table test case

* test(cell): add cell test (#737)

* test(cell): add cell test

* chore: formatting unit test files

---------

Co-authored-by: anlyyao <anly_yaw@163.com>

* test(Qrcode): add qrcode's unit test (#731)

* test(Qrcode): add qrcode's unit test

* fix: resolve conflicts

---------

Co-authored-by: anlyyao <anly_yaw@163.com>

* feat(test): 新增 Rate 相关组件测试,优化提示框逻辑与安全访问 (#754)

* feat(test): 新增 Rate 相关组件测试,优化提示框逻辑与安全访问

* test: 移除 Rate 组件拖拽时 Tips 显示值测试用例

* refactor: 重构测试用例分组,新增提示隐藏延迟常量

---------

Co-authored-by: lockiechen <290015551@qq.com>

* test(count-down): add count-down test (#697) (#781)

* test(count-down): add count-down test (#697)

* test(CountDown): 修复报错信息 (#697)

* test: update test case name

---------

Co-authored-by: novlan1 <1576271227@qq.com>

* feat(Message): add unit test and fix problems (#779)

* feat(Message): add unit test and fix problems

* chore: test

* feat(message): support object type of link

* test(message): 提升覆盖率

* test: 提升覆盖率

---------

Co-authored-by: novlan1 <1576271227@qq.com>

* feat(icon): upgrade icon 0.6.x (#785)

* feat(icon): upgrade icon 0.4.x

* chore: update snapshot

* fix(site): repair document rendering failed

* feat(Icon): update demo

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: anlyyao <anly_yaw@163.com>

---------

Co-authored-by: liweijie0812 <674416404@qq.com>
Co-authored-by: PiePie <45820630+ImaginingMaker@users.noreply.github.com>
Co-authored-by: Cyrios <995055954@qq.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: xliudaxia <xliudaxia@users.noreply.github.com>
Co-authored-by: JustGenius-s <53108645+JustGenius-s@users.noreply.github.com>
Co-authored-by: 阿菜 Cai <jimmyrss1102@gmail.com>
Co-authored-by: Yunqi Bai <byq1213@qq.com>
Co-authored-by: Boomkaa <48501916+Boomkaa@users.noreply.github.com>
Co-authored-by: Saraph1nes <52569690+Saraph1nes@users.noreply.github.com>
Co-authored-by: Lime_omie <128479982+MeoRinLime@users.noreply.github.com>
Co-authored-by: lockiechen <33082528+lockiechen@users.noreply.github.com>
Co-authored-by: lockiechen <290015551@qq.com>
Co-authored-by: SinzoL <113221060+SinzoL@users.noreply.github.com>
Co-authored-by: novlan1 <1576271227@qq.com>
Co-authored-by: julian <42023571+vancece@users.noreply.github.com>
* fix(collapse): fix the behavior of the defaultExpandAll prop

- Fix the abnormal opening issue caused by the defaultExpandAll prop
- Fix the conflict issue when defaultExpandAll and expandMutex are passed together

* test(collapse): supplement test cases for the collapse component

fix #697

* chore: update demo

---------

Co-authored-by: novlan1 <1576271227@qq.com>
* feat(site): add a changelog for each component page

* chore: update NODE_ENV

* chore: fix cjs config

* chore: fix build

* chore: fix mobile preview

* chore: fix mobile preview

* chore: adjust code

* chore: code style
* test(cascader): add test case

* test: update test case

* test: update test case
* test(Popover): add test for Popover (#697)

* test(Popover): 细微修改组件实现 (#697)

* test(Popover): 更新覆盖率 (#697)
* feat(ImageViewer): add trigger source for close event

* docs: update
* feat: api and common

* feat: watermark

* feat: demo

* chore: config and docs

* chore: test

* fix: test

* chore: overview docs

Co-authored-by: liweijie0812 <674416404@qq.com>

* feat(Watermark): update demo

---------

Co-authored-by: liweijie0812 <674416404@qq.com>
Co-authored-by: anlyyao <anly_yaw@163.com>
anlyyao and others added 11 commits November 16, 2026 10:55
* feat(Form): contentAlign add center to available options and update demo

* fix(form): read validation value from component state to fix reset+submit

* fix(Form): map controlled prop by child component to support Upload/Checkbox

* chore: set explicit displayName for all exported components

* chore: update demos

* fix: fix cr

* chore: update common

---------

Co-authored-by: tdesign-bot <tdesign@tencent.com>
* feat(Table): support ellipsis and ellipsisTitle props

* style(Table): update popup style and demo
* chore: publish v1.0.1

* chore: update tdesign-mobile-react CHANGELOG.md

---------

Co-authored-by: tdesign-bot <tdesign@tencent.com>
- move source src/ -> packages/mobile-components
- move site site/ -> packages/tdesign-mobile-react/site
- move package shell (package.json/README/CHANGELOG/LICENSE) -> packages/tdesign-mobile-react
- remove _common submodule (reuse packages/common later)
- keep remaining config/scripts/tests in packages/.mobile-migrate for later diff handling
- preserve full mobile commit history via git subtree
@github-actions

Copy link
Copy Markdown
Contributor

Size Change: 0 B

Total Size: 76.3 kB

ℹ️ View Unchanged
Filename Size
packages/tdesign-react-aigc/es/_util/reactify.js 2.99 kB
packages/tdesign-react-aigc/es/_util/useDynamicStyle.js 615 B
packages/tdesign-react-aigc/es/attachments/index.js 345 B
packages/tdesign-react-aigc/es/chat-actionbar/index.js 984 B
packages/tdesign-react-aigc/es/chat-engine/components/activity/index.js 378 B
packages/tdesign-react-aigc/es/chat-engine/components/activity/registry.js 454 B
packages/tdesign-react-aigc/es/chat-engine/components/activity/render.js 1.12 kB
packages/tdesign-react-aigc/es/chat-engine/components/activity/types.js 106 B
packages/tdesign-react-aigc/es/chat-engine/components/index.js 973 B
packages/tdesign-react-aigc/es/chat-engine/components/json-render/catalog/atomic/button.js 1.51 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/catalog/atomic/card.js 1.01 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/catalog/atomic/input.js 1.52 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/catalog/atomic/layout.js 1.58 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/catalog/atomic/text.js 997 B
packages/tdesign-react-aigc/es/chat-engine/components/json-render/catalog/catalog-to-prompt.js 7.53 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/contexts/actions.js 2.94 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/contexts/data.js 11.8 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/contexts/index.js 428 B
packages/tdesign-react-aigc/es/chat-engine/components/json-render/contexts/store.js 954 B
packages/tdesign-react-aigc/es/chat-engine/components/json-render/contexts/tree.js 929 B
packages/tdesign-react-aigc/es/chat-engine/components/json-render/contexts/validation.js 2.06 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/contexts/visibility.js 709 B
packages/tdesign-react-aigc/es/chat-engine/components/json-render/index.js 748 B
packages/tdesign-react-aigc/es/chat-engine/components/json-render/registry/a2ui-binding.js 2.1 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/registry/a2ui-registry.js 1.48 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/registry/config.js 517 B
packages/tdesign-react-aigc/es/chat-engine/components/json-render/registry/index.js 1.85 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/renderer/_index.js 1.52 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/renderer/A2UIJsonRenderActivityRenderer.js 3.5 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/renderer/A2UISurface.js 2.71 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/renderer/JsonRenderActivityRenderer.js 842 B
packages/tdesign-react-aigc/es/chat-engine/components/json-render/renderer/JsonUIRenderer.js 1.68 kB
packages/tdesign-react-aigc/es/chat-engine/components/json-render/types.js 106 B
packages/tdesign-react-aigc/es/chat-engine/components/json-render/utils/sanitize-props.js 933 B
packages/tdesign-react-aigc/es/chat-engine/components/provider/agent-state.js 430 B
packages/tdesign-react-aigc/es/chat-engine/components/shared/ComponentErrorBoundary.js 836 B
packages/tdesign-react-aigc/es/chat-engine/components/shared/createRegistry.js 942 B
packages/tdesign-react-aigc/es/chat-engine/components/shared/index.js 296 B
packages/tdesign-react-aigc/es/chat-engine/components/shared/useRegistrationListener.js 554 B
packages/tdesign-react-aigc/es/chat-engine/components/toolcall/index.js 459 B
packages/tdesign-react-aigc/es/chat-engine/components/toolcall/registry.js 457 B
packages/tdesign-react-aigc/es/chat-engine/components/toolcall/render.js 2.38 kB
packages/tdesign-react-aigc/es/chat-engine/components/toolcall/types.js 208 B
packages/tdesign-react-aigc/es/chat-engine/hooks/index.js 436 B
packages/tdesign-react-aigc/es/chat-engine/hooks/useAgentActivity.js 934 B
packages/tdesign-react-aigc/es/chat-engine/hooks/useAgentState.js 1.16 kB
packages/tdesign-react-aigc/es/chat-engine/hooks/useAgentToolcall.js 947 B
packages/tdesign-react-aigc/es/chat-engine/hooks/useChat.js 1.04 kB
packages/tdesign-react-aigc/es/chat-engine/index.js 1.19 kB
packages/tdesign-react-aigc/es/chat-filecard/index.js 345 B
packages/tdesign-react-aigc/es/chat-loading/index.js 351 B
packages/tdesign-react-aigc/es/chat-markdown/index.js 384 B
packages/tdesign-react-aigc/es/chat-message/index.js 358 B
packages/tdesign-react-aigc/es/chat-sender/index.js 349 B
packages/tdesign-react-aigc/es/chat-thinking/index.js 369 B
packages/tdesign-react-aigc/es/chatbot/index.js 393 B
packages/tdesign-react-aigc/es/index.js 1.37 kB
packages/tdesign-react-aigc/es/style/index.js 148 B

compressed-size-action::tdesign-react-chat

@tdesign-bot

tdesign-bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Collaborator

TDesign Component Site Preview Open

Component Preview
tdesign-react 完成
@tdesign-react/chat 完成

@anlyyao
anlyyao force-pushed the chore/migrate-mobile branch from 78caba1 to 1a272b5 Compare November 25, 2026 11:41
@pkg-pr-new

pkg-pr-new Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
  • tdesign-mobile-react-demo

  • tdesign-react-demo

    npm i https://pkg.pr.new/Tencent/tdesign-react/tdesign-mobile-react@4506
    
    npm i https://pkg.pr.new/Tencent/tdesign-react@4506
    
    npm i https://pkg.pr.new/Tencent/tdesign-react/@tdesign-react/chat@4506
    

commit: fba91fc

@github-actions

github-actions Bot commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

Size Change: +286 B (+0.03%)

Total Size: 942 kB

📦 View Changed
Filename Size Change
packages/tdesign-react/dist/tdesign.js 520 kB +226 B (+0.04%)
packages/tdesign-react/dist/tdesign.min.js 304 kB +60 B (+0.02%)
ℹ️ View Unchanged
Filename Size
packages/tdesign-react/dist/reset.css 1.93 kB
packages/tdesign-react/dist/tdesign.css 60.9 kB
packages/tdesign-react/dist/tdesign.min.css 55.1 kB

compressed-size-action::tdesign-react

@anlyyao
anlyyao force-pushed the chore/migrate-mobile branch from a5a0d8c to fba91fc Compare November 25, 2026 12:33
@uyarn

uyarn commented Nov 26, 2026

Copy link
Copy Markdown
Collaborator

@liweijie0812 帮忙看看 mobile 搬过来有什么需要处理的workflow吗

@uyarn
uyarn requested a review from liweijie0812 November 26, 2026 10:55
@liweijie0812

Copy link
Copy Markdown
Collaborator

看了下这仓库的都改了 ,通过评论触发的,我另外改就好

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.