-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(floating): mv all floating components to same API
h2. ~~`Tooltip`~~ -> [OnboardingTooltip](#/OnboardingTooltip) ```diff <OnboardingTooltip - isShown + isShown - alignX="bottom" - alignY="left" + placement="bottom-start" - offsetX={0} + offsetByCrossAxis={0} - offsetY={0} + offsetByMainAxis={0} - cornerOffset={0} - cornerAbsoluteOffset={0} + arrowCornerOffset={0} + arrowCornerAbsoluteOffset={0} > <div>Target</div> </OnboardingTooltip> ``` h2. ~~`TextTooltip`~~ -> [Tooltip](#/Tooltip) ```diff <Tooltip - autoUpdateOnTargetResize - customMiddlewares - renderContent - getRef - offsetSkidding={0} + offsetByCrossAxis={0} - offsetDistance={0} + offsetByMainAxis={0} - shownDelay={0} - hideDelay={10} + hoverDelay={[0, 10]} - forcePortal + usePortal - portalRoot={someHTMLElement} + usePortal={someHTMLElement} > <div>Target</div> </Tooltip> ``` h1.⚠️ Поправить в migration_v6.md h2. [Popper](#/Popper) ```diff <Popper - renderContent - arrowClassName="" + arrowProps={{ iconClassName: "" }} - offsetDistance={0} + offsetByMainAxis={0} - offsetSkidding={0} + offsetByCrossAxis={0} - onPlacementChange={({ placement }) => {}} + onPlacementChange={(placement) => {}} - forcePortal + usePortal - portalRoot={someHTMLElement} + usePortal={someHTMLElement} /> <div>Target</div> </Popper> ``` - `onPlacementChange` теперь вызывается только в случае, если `Popper` подобрал оптимальный `placement` вместо пользовательского. - `renderContent` удалён в пользу `children`. Раньше из `renderContent` можно было получить `className`, который задаёт `Popper`, сейчас этот `className` пустой. - `targetRef` теперь умеет принимать `VirtualElement`. - `arrowProps` принимает атрибуты `HTMLDivElement`, а также `iconStyle` и `iconClassName`.
- Loading branch information
Showing
66 changed files
with
1,512 additions
and
1,527 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
102 changes: 0 additions & 102 deletions
102
packages/vkui/src/components/HoverPopper/HoverPopper.tsx
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
packages/vkui/src/components/OnboardingTooltip/OnboardingTooltip.e2e.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import * as React from 'react'; | ||
import { test } from '@vkui-e2e/test'; | ||
import { OnboardingTooltipPlayground } from './OnboardingTooltip.e2e-playground'; | ||
|
||
test('OnboardingTooltip', async ({ | ||
mount, | ||
expectScreenshotClippedToContent, | ||
componentPlaygroundProps, | ||
}) => { | ||
await mount(<OnboardingTooltipPlayground {...componentPlaygroundProps} />); | ||
await expectScreenshotClippedToContent(); | ||
}); |
2 changes: 1 addition & 1 deletion
2
...src/components/Tooltip/Tooltip.module.css → ...rdingTooltip/OnboardingTooltip.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
.Tooltip__overlay { | ||
.OnboardingTooltip__overlay { | ||
position: fixed; | ||
inset-inline-start: 0; | ||
inset-block-start: 0; | ||
|
Oops, something went wrong.