Skip to content

Commit

Permalink
feat(RichTooltip): remove unstable component (#6209)
Browse files Browse the repository at this point in the history
Отказываемся от RichTooltip в пользу TextTooltip (a.k.a Tooltip, будет
переименован в рамках #2769) или Popover.

migration_v6.md

h2. ~~RichTooltip~~

```diff
- <RichTooltip style={{maxWidth: 320}} content={
+ <Tooltip style={{maxWidth: 320}} content={
  <RichCell>
    Lorem
  </RichCell>
}>
  <Link style={{display: 'inline-block', margin: 20, userSelect: 'none'}}>Илья Гришин</Link>
- </RichTooltip>
+ </Tooltip>
```
  • Loading branch information
inomdzhon authored Dec 5, 2023
1 parent aa53bfc commit 589b466
Show file tree
Hide file tree
Showing 8 changed files with 5 additions and 321 deletions.
114 changes: 0 additions & 114 deletions packages/vkui/src/components/RichTooltip/Readme.md

This file was deleted.

57 changes: 0 additions & 57 deletions packages/vkui/src/components/RichTooltip/RichTooltip.module.css

This file was deleted.

98 changes: 0 additions & 98 deletions packages/vkui/src/components/RichTooltip/RichTooltip.stories.tsx

This file was deleted.

44 changes: 0 additions & 44 deletions packages/vkui/src/components/RichTooltip/RichTooltip.tsx

This file was deleted.

2 changes: 1 addition & 1 deletion packages/vkui/src/components/Tooltip/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
хочется представить новый функционал. Это достаточно сложный с точки зрения управления компонент, поэтому он
требует подробной документации.

Для показа тултипа по ховеру, воспользуйтесь [`RichTooltip`](https://vkcom.github.io/VKUI/#/RichTooltip) или [`TextTooltip`](https://vkcom.github.io/VKUI/#/TextTooltip).
Для показа тултипа по ховеру, воспользуйтесь [`TextTooltip`](https://vkcom.github.io/VKUI/#/TextTooltip).

### Концепция

Expand Down
3 changes: 0 additions & 3 deletions packages/vkui/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -406,9 +406,6 @@ export type { ChipsSelectProps as unstable_ChipsSelectProps } from './components
export { TextTooltip as unstable_TextTooltip } from './components/TextTooltip/TextTooltip';
export type { TextTooltipProps as unstable_TextTooltipProps } from './components/TextTooltip/TextTooltip';

export { RichTooltip as unstable_RichTooltip } from './components/RichTooltip/RichTooltip';
export type { RichTooltipProps as unstable_RichTooltipProps } from './components/RichTooltip/RichTooltip';

export { ViewInfinite as unstable_ViewInfinite } from './components/View/ViewInfinite';
export type { ViewInfiniteProps as unstable_ViewInfiniteProps } from './components/View/ViewInfinite';

Expand Down
7 changes: 4 additions & 3 deletions styleguide/Components/Setting/Setting.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { useContext, useEffect, useRef } from 'react';
import { Icon16Dropdown } from '@vkontakte/icons';
import { ActionSheet, ActionSheetItem, classNames, Headline, Link } from '@vkui';
import './Setting.css';
import { RichTooltip } from '@vkui/components/RichTooltip/RichTooltip';
import { Popover } from '@vkui/components/Popover/Popover';
import { StyleGuideContext } from '../StyleGuide/StyleGuideRenderer';

export const Setting = ({
Expand Down Expand Up @@ -41,12 +41,13 @@ export const Setting = ({
weight="3"
>
{hint ? (
<RichTooltip
<Popover
placement="top"
trigger="hover"
content={<div style={{ padding: '8px 12px 9px' }}>{hint}</div>}
>
{labelJsx}
</RichTooltip>
</Popover>
) : (
labelJsx
)}
Expand Down
1 change: 0 additions & 1 deletion styleguide/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ const baseConfig = {
components: () => [
`../${VKUI_PACKAGE.PATHS.COMPONENTS_DIR}/Popover/Popover.tsx`,
`../${VKUI_PACKAGE.PATHS.COMPONENTS_DIR}/TextTooltip/TextTooltip.tsx`,
`../${VKUI_PACKAGE.PATHS.COMPONENTS_DIR}/RichTooltip/RichTooltip.tsx`,
`../${VKUI_PACKAGE.PATHS.COMPONENTS_DIR}/Tooltip/Tooltip.tsx`,
`../${VKUI_PACKAGE.PATHS.COMPONENTS_DIR}/Popper/Popper.tsx`,
],
Expand Down

0 comments on commit 589b466

Please sign in to comment.