Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: warning tooltip no longer fixed | prop cleanup #2141

Merged
merged 1 commit into from
Mar 2, 2025

Conversation

Tony-Villa
Copy link
Member

Fixes #2042

What changes did you make?

  • Made it so warning tooltip on landing page is no longer fixed on scroll
  • Removed a prop lockScroll from <Popup> because that prop only works with modals not tooltips

Why did you make the changes (we will use this info to test)?

  • Tooltip on landing page was fixed on scroll, it would move with the scroll instead of staying anchored to it's trigger. In this case the login link
  • The prop cleanup is not user facing, just some cleanup to try to avoid any tech debt

Issue-Specific User Account

If you registered a new, temporary TDM User Account for this issue, indicate the
username (i.e., email address) for the account.

  • N/A

Screenshots of Proposed Changes Of The Website (if any, please do not screen shot code changes)

Visuals before changes are applied
before.mov
Visuals after changes are applied
after.mov

For Devs

This tooltip is using the library reactjs-popup, according to this issue with the latest major release this became an internal bug in the library.

What I did to remedy this was add an event listener to the body element and used an effect to move the tooltip on scroll. This is kind of a hacky way to fix this, which is why it's a tiny bit floaty, but it fixes the bug. We can revisit this once it has been fixed in the library. I made sure to remove the listener when the effect is cleaned up.

@Tony-Villa Tony-Villa requested a review from entrotech February 28, 2025 07:43
Copy link
Member

@entrotech entrotech left a comment

Choose a reason for hiding this comment

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

This is great. Cool that it was a bug in the library that they plan to fix!

@entrotech entrotech merged commit 406b886 into develop Mar 2, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Warning tooltip has fixed position
2 participants