Skip to content

PLASMA-7867: add curvature in tail in beta Popover, Tooltip - #3000

Merged
Yakutoc merged 1 commit into
devfrom
plasma-7867
Aug 4, 2026
Merged

PLASMA-7867: add curvature in tail in beta Popover, Tooltip#3000
Yakutoc merged 1 commit into
devfrom
plasma-7867

Conversation

@shuga2704

@shuga2704 shuga2704 commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Core

Tooltip, Popover (Beta)

  • добавлена возможность конфигурации tail компонентов

What/why changed

📦 Published PR as canary version: Canary Versions

✨ Test out this PR locally via:

npm install @salutejs/plasma-asdk@0.385.0-canary.3000.30610297220.0
npm install @salutejs/plasma-b2c@1.627.0-canary.3000.30610297220.0
npm install @salutejs/plasma-colors@0.17.0-canary.3000.30610297220.0
npm install @salutejs/plasma-core@1.234.0-canary.3000.30610297220.0
npm install @salutejs/plasma-giga@0.354.0-canary.3000.30610297220.0
npm install @salutejs/plasma-homeds@0.354.0-canary.3000.30610297220.0
npm install @salutejs/plasma-hope@1.381.0-canary.3000.30610297220.0
npm install @salutejs/plasma-icons@1.244.0-canary.3000.30610297220.0
npm install @salutejs/plasma-new-hope@0.371.0-canary.3000.30610297220.0
npm install @salutejs/plasma-tokens@1.146.0-canary.3000.30610297220.0
npm install @salutejs/plasma-tokens-b2b@1.60.0-canary.3000.30610297220.0
npm install @salutejs/plasma-tokens-b2c@0.71.0-canary.3000.30610297220.0
npm install @salutejs/plasma-tokens-core@0.8.0-canary.3000.30610297220.0
npm install @salutejs/plasma-tokens-web@1.75.0-canary.3000.30610297220.0
npm install @salutejs/plasma-typo@0.48.0-canary.3000.30610297220.0
npm install @salutejs/plasma-web@1.629.0-canary.3000.30610297220.0
npm install @salutejs/sdds-bizcom@0.359.0-canary.3000.30610297220.0
npm install @salutejs/sdds-cs@0.363.0-canary.3000.30610297220.0
npm install @salutejs/sdds-dfa@0.357.0-canary.3000.30610297220.0
npm install @salutejs/sdds-finai@0.350.0-canary.3000.30610297220.0
npm install @salutejs/sdds-insol@0.354.0-canary.3000.30610297220.0
npm install @salutejs/sdds-insol-next@0.354.0-canary.3000.30610297220.0
npm install @salutejs/sdds-netology@0.358.0-canary.3000.30610297220.0
npm install @salutejs/sdds-os@0.29.0-canary.3000.30610297220.0
npm install @salutejs/sdds-platform-ai@0.358.0-canary.3000.30610297220.0
npm install @salutejs/sdds-sbcom@0.359.0-canary.3000.30610297220.0
npm install @salutejs/sdds-scan@0.357.0-canary.3000.30610297220.0
npm install @salutejs/sdds-serv@0.358.0-canary.3000.30610297220.0
npm install @salutejs/core-themes@0.36.0-canary.3000.30610297220.0
npm install @salutejs/plasma-themes@0.58.0-canary.3000.30610297220.0
npm install @salutejs/sdds-themes@0.72.0-canary.3000.30610297220.0
npm install @salutejs/sdds-api-tests@0.16.0-canary.3000.30610297220.0
npm install @salutejs/plasma-cy-utils@0.164.0-canary.3000.30610297220.0
npm install @salutejs/plasma-sb-utils@0.235.0-canary.3000.30610297220.0
npm install @salutejs/plasma-tokens-utils@0.56.0-canary.3000.30610297220.0
# or 
yarn add @salutejs/plasma-asdk@0.385.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-b2c@1.627.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-colors@0.17.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-core@1.234.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-giga@0.354.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-homeds@0.354.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-hope@1.381.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-icons@1.244.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-new-hope@0.371.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-tokens@1.146.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-tokens-b2b@1.60.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-tokens-b2c@0.71.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-tokens-core@0.8.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-tokens-web@1.75.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-typo@0.48.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-web@1.629.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-bizcom@0.359.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-cs@0.363.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-dfa@0.357.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-finai@0.350.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-insol@0.354.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-insol-next@0.354.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-netology@0.358.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-os@0.29.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-platform-ai@0.358.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-sbcom@0.359.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-scan@0.357.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-serv@0.358.0-canary.3000.30610297220.0
yarn add @salutejs/core-themes@0.36.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-themes@0.58.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-themes@0.72.0-canary.3000.30610297220.0
yarn add @salutejs/sdds-api-tests@0.16.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-cy-utils@0.164.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-sb-utils@0.235.0-canary.3000.30610297220.0
yarn add @salutejs/plasma-tokens-utils@0.56.0-canary.3000.30610297220.0

Summary by CodeRabbit

  • Enhancements
    • Improved Popover and Tooltip tails with more accurate placement-aware positioning and rotation.
    • Introduced configurable tail geometry (width, height, and curvature) across supported sizes.
  • Bug Fixes
    • Prevented brief visual display by hiding the overlay content until positioning is fully calculated.
  • Theme/Examples
    • Updated Popover and Tooltip size variants in example and theme configurations to use the new tail token values.

@shuga2704 shuga2704 self-assigned this Jul 29, 2026
@shuga2704 shuga2704 added the changelog-skip Exclude pull request changes from changelog label Jul 29, 2026
@coderabbitai

coderabbitai Bot commented Jul 29, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

Popover and Tooltip replace FloatingArrow with token-driven custom tails. Floating UI placement and arrow middleware data determine tail offsets and styles, while component configurations define tail geometry for supported sizes and themes.

Changes

Custom popover and tooltip tails

Layer / File(s) Summary
Tail contracts and geometry
packages/plasma-new-hope/src/components/_beta/Popover/Popover.tokens.ts, Popover.styles.ts, Tooltip/Tooltip.tokens.ts, Tooltip.styles.ts
Popover and Tooltip add tail tokens and styled components that size, rotate, position, and clip the tail shape by side.
Placement-aware tail positioning
packages/plasma-new-hope/src/components/_beta/Popover/Popover.tsx, Tooltip/Tooltip.tsx
Floating UI middleware measures the rendered tail, derives placement and arrow coordinates, controls root visibility, and renders the custom tail.
Theme tail geometry
packages/plasma-new-hope/src/examples/components/_beta/*, packages/sdds-cs/src/components/_beta/*, packages/sdds-finai/src/components/_beta/*, packages/sdds-sbcom/src/components/_beta/*
Popover and Tooltip size variations define tail width, height, and curvature values.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant PopoverTooltip
  participant FloatingUI
  participant Tail
  PopoverTooltip->>FloatingUI: Read placement and arrow middleware data
  FloatingUI-->>PopoverTooltip: Return placement and arrow coordinates
  PopoverTooltip->>Tail: Pass side, ref, and computed style
  Tail-->>PopoverTooltip: Render the positioned tail
Loading

Possibly related PRs

Suggested labels: sdds-beta, sdds-sbcom, sdds-cs, sdds-finai

Suggested reviewers: irinkv, titankuzmich, yakutoc

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: adding curvature to beta Popover and Tooltip tails.
✨ Finishing Touches 💡 1
🛠️ Fix failing CI checks 💡
  • Fix failing CI checks
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch plasma-7867

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

Copy link
Copy Markdown
Contributor

Theme Builder app deployed!

https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-3000/

@github-actions

github-actions Bot commented Jul 29, 2026

Copy link
Copy Markdown
Contributor

Documentation preview deployed!

website: https://plasma.sberdevices.ru/pr/pr-3000/
asdk storybook: https://plasma.sberdevices.ru/pr/pr-3000/asdk-storybook/
b2c storybook: https://plasma.sberdevices.ru/pr/pr-3000/b2c-storybook/
giga storybook: https://plasma.sberdevices.ru/pr/pr-3000/giga-storybook/
homeds storybook: https://plasma.sberdevices.ru/pr/pr-3000/homeds-storybook/
new-hope storybook: https://plasma.sberdevices.ru/pr/pr-3000/new-hope-storybook/
web storybook: https://plasma.sberdevices.ru/pr/pr-3000/web-storybook/
sdds-bizcom storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-bizcom-storybook/
sdds-cs storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-cs-storybook/
sdds-dfa storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-dfa-storybook/
sdds-finai storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-finai-storybook/
sdds-insol storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-insol-storybook/
sdds-insol-next storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-insol-next-storybook/
sdds-netology storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-netology-storybook/
sdds-os storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-os-storybook/
sdds-platform-ai storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-platform-ai-storybook/
sdds-sbcom storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-sbcom-storybook/
sdds-scan storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-scan-storybook/
sdds-serv storybook: https://plasma.sberdevices.ru/pr/pr-3000/sdds-serv-storybook/

@shuga2704 shuga2704 changed the title PLASMA-7867: add renderTail prop PLASMA-7867: add curvature in tail in beta Popover, Tooltip Jul 29, 2026

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/plasma-new-hope/src/components/_beta/Popover/Popover.tsx`:
- Around line 107-120: The offset callbacks in Popover.tsx lines 107-120 and
Tooltip.tsx lines 83-96 must react when the Tail geometry changes, not only when
outerOffset or hasTail changes. Add the Tail’s size/geometry as a dependency or
observe its dimensions and invoke Floating UI’s update so repositioning occurs
while the component remains open.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: e3b2c5fe-a678-482a-a504-12ab9f498501

📥 Commits

Reviewing files that changed from the base of the PR and between befdf96 and dada089.

📒 Files selected for processing (17)
  • packages/plasma-new-hope/src/components/_beta/Popover/Popover.styles.ts
  • packages/plasma-new-hope/src/components/_beta/Popover/Popover.tokens.ts
  • packages/plasma-new-hope/src/components/_beta/Popover/Popover.tsx
  • packages/plasma-new-hope/src/components/_beta/Tooltip/Tooltip.styles.ts
  • packages/plasma-new-hope/src/components/_beta/Tooltip/Tooltip.tokens.ts
  • packages/plasma-new-hope/src/components/_beta/Tooltip/Tooltip.tsx
  • packages/plasma-new-hope/src/examples/components/_beta/Popover/Popover.closeInner.config.ts
  • packages/plasma-new-hope/src/examples/components/_beta/Popover/Popover.closeNone.config.ts
  • packages/plasma-new-hope/src/examples/components/_beta/Tooltip/Tooltip.config.ts
  • packages/sdds-cs/src/components/_beta/Popover/Popover.closeInner.config.ts
  • packages/sdds-cs/src/components/_beta/Popover/Popover.closeNone.config.ts
  • packages/sdds-cs/src/components/_beta/Tooltip/Tooltip.config.ts
  • packages/sdds-finai/src/components/_beta/Popover/Popover.closeInner.config.ts
  • packages/sdds-finai/src/components/_beta/Popover/Popover.closeNone.config.ts
  • packages/sdds-finai/src/components/_beta/Tooltip/Tooltip.config.ts
  • packages/sdds-sbcom/src/components/_beta/Popover/Popover.config.ts
  • packages/sdds-sbcom/src/components/_beta/Tooltip/Tooltip.config.ts

Comment thread packages/plasma-new-hope/src/components/_beta/Popover/Popover.tsx
@Yakutoc
Yakutoc merged commit d14a064 into dev Aug 4, 2026
66 of 67 checks passed
@Yakutoc
Yakutoc deleted the plasma-7867 branch August 4, 2026 10:01
@Salute-Eva Salute-Eva mentioned this pull request Aug 4, 2026
@github-actions

github-actions Bot commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

This PR is included in version:

  • @salutejs/plasma-asdk@0.386.0
  • @salutejs/plasma-b2c@1.628.0
  • @salutejs/plasma-colors@0.17.0
  • @salutejs/plasma-core@1.235.0
  • @salutejs/plasma-giga@0.355.0
  • @salutejs/plasma-homeds@0.355.0
  • @salutejs/plasma-hope@1.382.0
  • @salutejs/plasma-icons@1.244.0
  • @salutejs/plasma-new-hope@0.372.0
  • @salutejs/plasma-tokens@1.146.0
  • @salutejs/plasma-tokens-b2b@1.60.0
  • @salutejs/plasma-tokens-b2c@0.71.0
  • @salutejs/plasma-tokens-core@0.8.0
  • @salutejs/plasma-tokens-web@1.75.0
  • @salutejs/plasma-typo@0.48.0
  • @salutejs/plasma-web@1.630.0
  • @salutejs/sdds-bizcom@0.360.0
  • @salutejs/sdds-cs@0.364.0
  • @salutejs/sdds-dfa@0.358.0
  • @salutejs/sdds-finai@0.351.0
  • @salutejs/sdds-insol@0.355.0
  • @salutejs/sdds-insol-next@0.354.0
  • @salutejs/sdds-netology@0.359.0
  • @salutejs/sdds-os@0.30.0
  • @salutejs/sdds-platform-ai@0.359.0
  • @salutejs/sdds-sbcom@0.360.0
  • @salutejs/sdds-scan@0.358.0
  • @salutejs/sdds-serv@0.359.0
  • @salutejs/core-themes@0.36.0
  • @salutejs/plasma-themes@0.58.0
  • @salutejs/sdds-themes@0.73.0
  • @salutejs/sdds-api-tests@0.17.0
  • @salutejs/plasma-cy-utils@0.165.0
  • @salutejs/plasma-sb-utils@0.236.0
  • @salutejs/plasma-tokens-utils@0.56.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants