Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Aug 20, 2025

Fixes the WhatsNew popup arrow positioning that was misaligned after new sidebar icons were added below the help center icon. The arrow now correctly points to the help center icon by accounting for the additional icons in its positioning calculation.

Fixes #5126

┆Issue is synchronized with this Notion page by Unito

@christian-byrne christian-byrne requested a review from a team as a code owner August 20, 2025 23:17
@github-actions
Copy link

github-actions bot commented Aug 20, 2025

🎭 Playwright Test Results

All tests passed across all browsers!

⏰ Completed at: 08/27/2025, 07:19:06 AM UTC

📊 Test Reports by Browser


🎉 Your tests are passing across all browsers!

@github-actions
Copy link

github-actions bot commented Aug 20, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 08/20/2025, 11:18:34 PM UTC

📊 Build Summary

  • Components: 1
  • Stories: 4
  • Visual changes: 0
  • Errors: 0

🔗 Links


🎉 Your Storybook is ready for review!

benceruleanlu
benceruleanlu previously approved these changes Aug 21, 2025
var(--sidebar-width, 4rem) + 0.25rem
); /* Position toward center of help center icon */
var(--sidebar-width, 4rem) * 2 + 0.25rem
); /* Position toward center of help center icon (accounting for 2 icons below) */
Copy link
Member

Choose a reason for hiding this comment

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

.whats-new-popup-container.sidebar-left.small-sidebar .help-center-arrow The CSS further down has a higher priority, so this one doesn’t get applied first. And you also need to take the --p-button-padding-y padding value into account to find the correct position.
스크린샷 2025-08-21 오후 1 01 59

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thank you for the help, let me fix tomorrow

@christian-byrne
Copy link
Contributor Author

@viva-jinyi Can you finish this?

@viva-jinyi viva-jinyi force-pushed the fix/help-center-arrow-alignment branch from 81e1f2e to 5acbcb2 Compare August 26, 2025 04:34
@viva-jinyi
Copy link
Member

스크린샷 2025-08-26 오후 1 40 07 스크린샷 2025-08-26 오후 1 40 13 @christian-byrne Since the WhatsNew popup was teleported to #graph-canvas-container, it couldn’t access the sidebar CSS variable (--sidebar-width). Moved the --sidebar-width CSS variable to :root so it can be accessed globally.

@viva-jinyi viva-jinyi self-requested a review August 26, 2025 04:45
viva-jinyi
viva-jinyi previously approved these changes Aug 26, 2025
@viva-jinyi viva-jinyi force-pushed the fix/help-center-arrow-alignment branch from 5ca265a to 35a86ac Compare August 27, 2025 00:07
@dosubot dosubot bot added the size:M This PR changes 30-99 lines, ignoring generated files. label Aug 27, 2025
@christian-byrne
Copy link
Contributor Author

Do we actually need to pollute global namespace to do that? Can't it be a prop or injected?

christian-byrne and others added 4 commits August 27, 2025 15:55
The arrow positioning was not accounting for additional sidebar icons (terminal and shortcuts)
that were added below the help center icon, causing misalignment. Updated the calculation to
properly position the arrow relative to the help center icon's current location.

Fixes #5126
…ment

- Fixed small sidebar rule to use consistent calculation with normal sidebar
- Updated positioning to use half icon height for better center alignment
- Both normal and small sidebar now use dynamic CSS variable calculations

Addresses feedback from review by viva-jinyi on CSS specificity and positioning accuracy.
- Move --sidebar-width CSS variable to :root to make it accessible globally
- This allows teleported components like WhatsNewPopup to reference sidebar dimensions
- Adjust arrow positioning calculations for better alignment with help center icon
- Add explanatory comments about why these variables need to be global

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@viva-jinyi viva-jinyi force-pushed the fix/help-center-arrow-alignment branch from f544e0a to f14afb6 Compare August 27, 2025 06:55
@viva-jinyi
Copy link
Member

@christian-byrne Since the component is teleported elsewhere, we can’t use props or injections. In the current situation, handling it with a CSS variable seems like the fastest and most manageable approach. And since the sidebar width variable is something that can be used at the layout level anyway, I think it’s fine to make it global. WDYT?

@christian-byrne christian-byrne merged commit e8f0ec5 into main Aug 27, 2025
12 checks passed
@christian-byrne christian-byrne deleted the fix/help-center-arrow-alignment branch August 27, 2025 13:17
@christian-byrne christian-byrne mentioned this pull request Aug 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: HelpCenter popover arrow misaligned after terminal icon addition

4 participants