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

Update educational tooltip style to conditionally apply pointer events #55440

Merged
merged 3 commits into from
Jan 22, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
change as per review
Co-authored-by: rayane-djouah <77965000+rayane-djouah@users.noreply.github.com>
  • Loading branch information
ishpaul777 and rayane-d authored Jan 21, 2025
commit 799c994f6190269cb163cb38ce5a9843e337adfc
4 changes: 4 additions & 0 deletions src/styles/utils/generators/TooltipStyleUtils/index.ts
Original file line number Diff line number Diff line change
@@ -241,8 +241,12 @@

// We are adding this to prevent the tooltip text from being selected and copied on CTRL + A.
...styles.userSelectNone,

// Hovering over a link tooltip in a chat message causes the "report action" hover state to reset to false.
// To prevent this, we disable pointer events for the tooltip.
// However, an exception is needed for educational tooltips since they are interactive.
...(!isEducationTooltip ? styles.pointerEventsNone : {}),
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems styles.pointerEventsNone was added in this PR to address this issue. Could you please add a brief comment explaining why styles.pointerEventsNone is necessary for tooltips and why it should be excluded for educational tooltips?

Copy link
Contributor Author

@ishpaul777 ishpaul777 Jan 21, 2025

Choose a reason for hiding this comment

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

with this pointerEventsNone tooltip is not clickable, we need to make it clickable thats why, also it needed because team wants to see in full story user sessions how users are interacting with tooltips with pointerEventsNone its not clickable and fullstory can detect clicks

},

Check failure on line 249 in src/styles/utils/generators/TooltipStyleUtils/index.ts

GitHub Actions / ESLint check

Delete `·`

Check failure on line 249 in src/styles/utils/generators/TooltipStyleUtils/index.ts

GitHub Actions / Changed files ESLint check

Delete `·`
textStyle: {
color: theme.textReversed,
...FontUtils.fontFamily.platform.EXP_NEUE,