Skip to content

✨ feat: migrate to @lobehub/ui/base-ui components - #32

Merged
Innei merged 3 commits into
masterfrom
refactor/base-ui-migration
Oct 3, 2026
Merged

Innei merged 3 commits into
masterfrom
refactor/base-ui-migration

Conversation

@Innei

@Innei Innei commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

Summary

Part of moving the org libraries onto the same Base UI components lobe-chat uses.

  • Skeleton.Block (16 loading states) → base-ui Skeleton.
  • Tooltip / TooltipGroup (root and antd) → base-ui; BenchmarkScatterChart / BenchmarkRankingChart keep their transparent-container tooltip styles.
  • antd Segmented (BenchmarkScatterChart metric switch) → base-ui Segmented.
  • antd Typography.Paragraph (legend items, chart tooltips, demos) → base-ui Text.
  • antd Button (Legend/ScrollButton) → base-ui Button.
  • antd Empty (common/NoData) → root Empty, with the { title, desc } shape mapped to title / description and a lucide Inbox icon.
  • .eslintrc.js enforces the restrictedImports preset from @lobehub/ui/eslint (ESLint 8 needs the preset's two antd path entries merged).
  • @lobehub/ui peer range ^4.3.3 → ^5.54.0; devDependency → ^5.54.0.
  • Tests: the skeleton mocks move from root Skeleton.Block to base-ui Skeleton.

Verification

  • eslint "{src,tests}/**/*.{js,jsx,ts,tsx}": 0 problems.
  • tsc --noEmit: pass.
  • vitest run: 24/24 pass (2 failed before the mock update, as expected).
  • lobedocs dev: BarChart No Data (root Empty) and Loading (Skeleton) render; BenchmarkScatterChart Cost/Speed Segmented renders and the point hover tooltip shows the ChartTooltip card without an extra container. The legend scroll button was not exercised in the docs (a 1:1 Button swap with the same props, type-checked).

Review follow-up

  • Benchmark ranking/scatter tooltips: the base-ui tooltip viewport capped width at 318px, added 4px/8px padding, clipped overflow and inherited a 12px label font. styles.content now removes the cap and padding and restores colorText / fontSize. Measured in the docs before (max-width: 318px; padding: 4px 8px; overflow: clip; 12px) and after (none; 0; visible; 14px).

Acceptance

https://app.lobehub.com/acceptance/47cf79c9-421a-46cf-81f3-2be063f87e8a

Verified in LobeHub (canary a564091cdf, local full-stack dev) with all four libs installed from tarballs packed at the PR heads (tts 450f7ce, charts e361635, icons e57ee783, editor 18c9d6c). Result: 17 passed, 2 blocked (not reachable in lobe-chat), 0 failed.

  • Settings › Stats with seeded usage for 12 models: the heatmap tooltip, usage bar chart tooltip (full content, 14px, not clipped) and rankings render. A forced-empty Topic rank shows the new NoData (Inbox + title + description), and the loading skeleton shows while the stats request is held. No ant-* classes.
  • Blocked in lobe-chat: Legend/ScrollButton (no lobe-chat chart sets enableLegendSlider) and the benchmark tooltip clamp (no rating/benchmark data locally). Both are covered only by the docs checks above.
  • The Vercel docs preview deployment is failing on this PR; tests and release checks pass.

Innei added 2 commits October 3, 2026 03:20
- Skeleton, Tooltip, TooltipGroup, Segmented, Button and Text from @lobehub/ui/base-ui
- NoData renders the root Empty instead of antd Empty
- enforce the restrictedImports preset from @lobehub/ui/eslint
- raise the @lobehub/ui peer range to ^5.54.0
@lobe-tsukumo

lobe-tsukumo Bot commented Oct 2, 2026

Copy link
Copy Markdown

👍 @Innei

Thank you for raising your pull request and contributing to our Community.
Please make sure you have followed our contributing guidelines. We will review it as soon as possible.
If you encounter any problems, please feel free to connect with us.

非常感谢您提出拉取请求并为我们的社区做出贡献,请确保您已经遵循了我们的贡献指南,我们会尽快审查它。
如果您遇到任何问题,请随时与我们联系。

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, add credits to your account and enable them for code reviews in your settings.

@pkg-pr-new

pkg-pr-new Bot commented Oct 2, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@lobehub/charts@32

commit: e361635

The base-ui tooltip viewport caps width at 318px, pads and clips its content, and inherits a 12px label font.
@Innei
Innei merged commit f5c337a into master Oct 3, 2026
4 of 5 checks passed
@lobe-tsukumo

lobe-tsukumo Bot commented Oct 3, 2026

Copy link
Copy Markdown

❤️ Great PR @Innei ❤️

The growth of project is inseparable from user feedback and contribution, thanks for your contribution!

项目的成长离不开用户反馈和贡献,感谢您的贡献!

github-actions Bot pushed a commit that referenced this pull request Oct 3, 2026
## [Version 5.7.0](v5.6.0...v5.7.0)
<sup>Released on **2026-10-03**</sup>

#### ✨ Features

- **misc**: Migrate to @lobehub/ui/base-ui components.

<br/>

<details>
<summary><kbd>Improvements and Fixes</kbd></summary>

#### What's improved

* **misc**: Migrate to @lobehub/ui/base-ui components, closes [#32](#32) ([f5c337a](f5c337a))

</details>

<div align="right">

[![](https://img.shields.io/badge/-BACK_TO_TOP-151515?style=flat-square)](#readme-top)

</div>

This branch had an error being deployed

1 failed deployment
Preview — e3616354 Deployed Oct 2, 2026 by vercel[bot]
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