mirror of
https://github.com/langgenius/dify.git
synced 2026-05-09 21:28:25 +08:00
docs(web): remove legacy tooltip migration references
This commit is contained in:
parent
72e4ff9bd0
commit
0b5f09bc15
@ -103,7 +103,7 @@ See `[web/docs/overlay-migration.md](../../web/docs/overlay-migration.md)` for t
|
||||
|
||||
- Use `Tooltip` only for short, non-interactive visual labels. The trigger must already have visible text or an `aria-label`; the tooltip is not the accessible name and must not contain links, buttons, forms, or structured prose.
|
||||
- Use `Popover` for explanatory content, long text, rich layout, or anything users may need to reach on touch or with assistive technology. In `web/`, the `Infotip` wrapper is the preferred pattern for a `?` help glyph backed by `Popover`.
|
||||
- Do not copy legacy tooltip offsets into migrated call sites. Pick a `placement` and let the primitive own spacing.
|
||||
- Pick a `placement` and let the primitive own spacing. Avoid per-call-site offsets unless the component API explicitly needs a measured layout exception.
|
||||
- When passing a Base UI trigger `render` prop, render a real `<button type="button">` for button-like triggers. If a Popover trigger must render a `div`, `span`, or another non-button element, pass `nativeButton={false}`.
|
||||
|
||||
## Development
|
||||
|
||||
@ -7,8 +7,6 @@ This document tracks the Dify-web migration away from legacy overlay APIs.
|
||||
## Scope
|
||||
|
||||
- Deprecated imports:
|
||||
- `@/app/components/base/tooltip`
|
||||
- `@/app/components/base/tooltip/content`
|
||||
- `@/app/components/base/modal`
|
||||
- `@/app/components/base/dialog`
|
||||
- `@/app/components/base/drawer`
|
||||
@ -78,8 +76,6 @@ back to `z-9999`.
|
||||
parent legacy overlay should be migrated instead.
|
||||
- When migrating a legacy overlay that has a high z-index, remove the z-index
|
||||
entirely — the new primitive's default `z-1002` handles it.
|
||||
- Do not preserve legacy tooltip offsets at call sites. Choose the nearest
|
||||
`placement`/side alignment and let the primitive own its default spacing.
|
||||
- When using Base UI trigger `render`, render a real `button` for button-like
|
||||
triggers. If the trigger must render a non-button element, the primitive must
|
||||
explicitly opt out of the native button behavior where that API is available.
|
||||
|
||||
@ -45,14 +45,6 @@ export const WEB_RESTRICTED_IMPORT_PATTERNS = [
|
||||
]
|
||||
|
||||
export const OVERLAY_RESTRICTED_IMPORT_PATTERNS = [
|
||||
{
|
||||
group: [
|
||||
'**/base/tooltip',
|
||||
'**/base/tooltip/index',
|
||||
'**/base/tooltip/content',
|
||||
],
|
||||
message: 'Deprecated: use @langgenius/dify-ui/tooltip for short labels; use Popover/Infotip for rich or explanatory content. See issue #32767.',
|
||||
},
|
||||
{
|
||||
group: [
|
||||
'**/base/modal',
|
||||
|
||||
Loading…
Reference in New Issue
Block a user