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: Fix code selection in property tooltip #4709

Merged
merged 5 commits into from
Jan 6, 2025
Merged

fix: Fix code selection in property tooltip #4709

merged 5 commits into from
Jan 6, 2025

Conversation

kof
Copy link
Member

@kof kof commented Jan 4, 2025

Description

In property tooltip I want to be able to select and copy the code.

Steps for reproduction

  1. click button
  2. expect xyz

Code Review

  • hi @kof, I need you to do
    • conceptual review (architecture, feature-correctness)
    • detailed review (read every line)
    • test it on preview

Before requesting a review

  • made a self-review
  • added inline comments where things may be not obvious (the "why", not "what")

Before merging

  • tested locally and on preview environment (preview dev login: 0000)
  • updated test cases document
  • added tests
  • if any new env variables are added, added them to .env file

@kof kof requested review from TrySound and johnsicili January 4, 2025 00:21
Copy link
Contributor

@johnsicili johnsicili left a comment

Choose a reason for hiding this comment

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

It doesn't work on layered props such as background, filter, and box shadow. Nothing gets selected

@TrySound
Copy link
Member

TrySound commented Jan 4, 2025

maybe switch to popover?

@kof
Copy link
Member Author

kof commented Jan 5, 2025

Turns out we have not one tooltip like this but many in different sections and I fixed only one usage.

@kof
Copy link
Member Author

kof commented Jan 5, 2025

And yes, we would have been better off with a Popover in this case, tooltips are not designed to have clickable/selectable stuff in the content, but it has already too much other logic that would potentially need a lot of testing if I chnage it now to popover.

@kof kof requested review from istarkov and johnsicili and removed request for TrySound January 5, 2025 13:55
@kof kof merged commit 72dbd80 into main Jan 6, 2025
13 of 15 checks passed
@kof kof deleted the fix-code-selection branch January 6, 2025 19:16
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.

4 participants