Skip to content

Commit

Permalink
fix(design): resolve the issue of tooltip jitter during initialization (
Browse files Browse the repository at this point in the history
  • Loading branch information
jikkai authored Mar 6, 2025
1 parent ca2329e commit 3643ffe
Show file tree
Hide file tree
Showing 9 changed files with 853 additions and 1,110 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"lint:types": "turbo lint:types",
"test": "turbo test -- --passWithNoTests",
"coverage": "turbo coverage -- --passWithNoTests",
"build": "turbo build --no-cache --concurrency=30% --filter=!./common/*",
"build": "turbo build --concurrency=30% --filter=!./common/*",
"build:ci": "turbo build --concurrency=100% --filter=!./common/*",
"build:demo": "pnpm --filter univer-examples build:demo",
"build:e2e": "pnpm --filter univer-examples build:e2e",
Expand All @@ -44,15 +44,15 @@
"release": "release-it"
},
"devDependencies": {
"@antfu/eslint-config": "4.3.0",
"@antfu/eslint-config": "4.5.1",
"@commitlint/cli": "^19.7.1",
"@commitlint/config-conventional": "^19.7.1",
"@eslint-react/eslint-plugin": "^1.29.0",
"@eslint-react/eslint-plugin": "^1.30.2",
"@playwright/test": "^1.50.1",
"@release-it-plugins/workspaces": "^4.2.0",
"@release-it/conventional-changelog": "^9.0.4",
"@storybook/react": "8.6.0",
"@types/node": "^22.13.5",
"@storybook/react": "8.6.4",
"@types/node": "^22.13.9",
"@types/react": "^19.0.10",
"@types/react-dom": "^19.0.4",
"@univerjs-infra/shared": "workspace:*",
Expand All @@ -69,7 +69,7 @@
"eslint-plugin-react-refresh": "^0.4.19",
"husky": "^9.1.7",
"lint-staged": "^15.4.3",
"posthog-node": "^4.8.1",
"posthog-node": "^4.10.0",
"react": "19.0.0",
"react-dom": "19.0.0",
"release-it": "^17.11.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/shared/r-tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ export class RTree {
}
}

*searchGenerator(search: IUnitRange): IterableIterator<StringOrNumber> {
* searchGenerator(search: IUnitRange): IterableIterator<StringOrNumber> {
const { unitId, sheetId: subUnitId, range } = search;

if (this._enableOneCellCache) {
Expand Down
1 change: 1 addition & 0 deletions packages/design/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
"@radix-ui/react-dropdown-menu": "^2.1.6",
"@radix-ui/react-popover": "^1.1.6",
"@radix-ui/react-separator": "^1.1.2",
"@radix-ui/react-tooltip": "^1.1.8",
"@rc-component/trigger": "^2.2.6",
"@univerjs/icons": "^0.2.20",
"clsx": "^2.1.1",
Expand Down
22 changes: 5 additions & 17 deletions packages/design/src/components/tooltip/Tooltip.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,9 @@ export const Playground = {
</div>

<div>
<Tooltip title="这是一个提示">
<Tooltip title="Just a tooltip">
<a className="px-4 py-2 bg-blue-500 text-white rounded">
悬浮显示提示
Hover me
</a>
</Tooltip>
</div>
Expand All @@ -83,24 +83,12 @@ export const Playground = {

<div>
<Tooltip
title="完整的文本内容"
title="Full text"
showIfEllipsis
placement="bottom"
asChild={false}
>
<div className="univer-w-32 univer-truncate">
这是一段很长的文本内容,超出部分会被截断
</div>
</Tooltip>
</div>

<div className="univer-relative">

<Tooltip
title="asChild"
placement="bottom"
asChild
>
<div className="univer-h-8 univer-w-8 univer-bg-blue-400 univer-absolute univer-right-0" />
<span>not ellipsis</span>
</Tooltip>
</div>
</>
Expand Down
Loading

0 comments on commit 3643ffe

Please sign in to comment.