PLASMA-7853: add staticOffset for arrow with alignment - #2996
PLASMA-7853: add staticOffset for arrow with alignment#2996TitanKuzmich wants to merge 1 commit into
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughPopover and Tooltip now derive alignment from placement and conditionally apply ChangesPlacement-aware arrow offsets
Estimated code review effort: 1 (Trivial) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
ESLint install timed out. The project may have too many dependencies for the sandbox. 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. Comment |
|
Theme Builder app deployed! https://plasma.sberdevices.ru/pr/plasma-theme-builder-pr-2996/ |
Core
Popover, Tooltip (beta)
What/why changed
В FloatingArrow (
node_modules/@floating-ui/react/dist/floating-ui.react.mjs:486) есть строкаcomputedStaticOffsetберётся из пропаstaticOffset, который ни Tooltip.tsx, ни Popover.tsx не передавали - поэтому условия для right/bottom не выполнялись, и хвостик всегда позиционировался от left/top, независимо от alignmentBefore:

After:

📦 Published PR as canary version:
Canary Versions✨ Test out this PR locally via:
npm install @salutejs/plasma-asdk@0.385.0-canary.2996.30350408067.0 npm install @salutejs/plasma-b2c@1.627.0-canary.2996.30350408067.0 npm install @salutejs/plasma-core@1.234.0-canary.2996.30350408067.0 npm install @salutejs/plasma-giga@0.354.0-canary.2996.30350408067.0 npm install @salutejs/plasma-homeds@0.354.0-canary.2996.30350408067.0 npm install @salutejs/plasma-hope@1.381.0-canary.2996.30350408067.0 npm install @salutejs/plasma-icons@1.244.0-canary.2996.30350408067.0 npm install @salutejs/plasma-new-hope@0.371.0-canary.2996.30350408067.0 npm install @salutejs/plasma-tokens@1.146.0-canary.2996.30350408067.0 npm install @salutejs/plasma-tokens-b2b@1.60.0-canary.2996.30350408067.0 npm install @salutejs/plasma-tokens-b2c@0.71.0-canary.2996.30350408067.0 npm install @salutejs/plasma-tokens-web@1.75.0-canary.2996.30350408067.0 npm install @salutejs/plasma-typo@0.48.0-canary.2996.30350408067.0 npm install @salutejs/plasma-web@1.629.0-canary.2996.30350408067.0 npm install @salutejs/sdds-bizcom@0.359.0-canary.2996.30350408067.0 npm install @salutejs/sdds-cs@0.363.0-canary.2996.30350408067.0 npm install @salutejs/sdds-dfa@0.357.0-canary.2996.30350408067.0 npm install @salutejs/sdds-finai@0.350.0-canary.2996.30350408067.0 npm install @salutejs/sdds-insol@0.354.0-canary.2996.30350408067.0 npm install @salutejs/sdds-netology@0.358.0-canary.2996.30350408067.0 npm install @salutejs/sdds-os@0.29.0-canary.2996.30350408067.0 npm install @salutejs/sdds-platform-ai@0.358.0-canary.2996.30350408067.0 npm install @salutejs/sdds-sbcom@0.359.0-canary.2996.30350408067.0 npm install @salutejs/sdds-scan@0.357.0-canary.2996.30350408067.0 npm install @salutejs/sdds-serv@0.358.0-canary.2996.30350408067.0 npm install @salutejs/core-themes@0.36.0-canary.2996.30350408067.0 npm install @salutejs/plasma-themes@0.58.0-canary.2996.30350408067.0 npm install @salutejs/sdds-themes@0.72.0-canary.2996.30350408067.0 npm install @salutejs/sdds-api-tests@0.16.0-canary.2996.30350408067.0 npm install @salutejs/plasma-cy-utils@0.164.0-canary.2996.30350408067.0 npm install @salutejs/plasma-sb-utils@0.235.0-canary.2996.30350408067.0 npm install @salutejs/plasma-tokens-utils@0.56.0-canary.2996.30350408067.0 # or yarn add @salutejs/plasma-asdk@0.385.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-b2c@1.627.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-core@1.234.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-giga@0.354.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-homeds@0.354.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-hope@1.381.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-icons@1.244.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-new-hope@0.371.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-tokens@1.146.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-tokens-b2b@1.60.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-tokens-b2c@0.71.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-tokens-web@1.75.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-typo@0.48.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-web@1.629.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-bizcom@0.359.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-cs@0.363.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-dfa@0.357.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-finai@0.350.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-insol@0.354.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-netology@0.358.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-os@0.29.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-platform-ai@0.358.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-sbcom@0.359.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-scan@0.357.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-serv@0.358.0-canary.2996.30350408067.0 yarn add @salutejs/core-themes@0.36.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-themes@0.58.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-themes@0.72.0-canary.2996.30350408067.0 yarn add @salutejs/sdds-api-tests@0.16.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-cy-utils@0.164.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-sb-utils@0.235.0-canary.2996.30350408067.0 yarn add @salutejs/plasma-tokens-utils@0.56.0-canary.2996.30350408067.0Summary by CodeRabbit