Skip to content

feat: text selection block#10373

Merged
ishan621 merged 2 commits intomainfrom
SIG_3903
Feb 25, 2026
Merged

feat: text selection block#10373
ishan621 merged 2 commits intomainfrom
SIG_3903

Conversation

@ishan621
Copy link
Copy Markdown
Contributor

@ishan621 ishan621 commented Feb 20, 2026

Pull Request

This PR handles a bug, in logs explorer when we used to select a text , it would automatically open log detail which was a bad UX as user was just trying to select and copy a value.

Fix - We have introduced a hook , which tells us if text is selected , if yes then we don't open log detail else it will behave as normal.


📄 Summary

Why does this change exist?
To improve UX of the user, user should be able to select and copy and only open log details when clicked

Screenshots / Screen Recordings (if applicable)

Before :

Screen.Recording.2026-02-20.at.6.29.48.PM.mov

After :

Screen.Recording.2026-02-20.at.6.30.58.PM.mov

Issues closed by this PR

#3903


✅ Change Type

Select all that apply

  • 🐛 Bug fix
  • ♻️ Refactor
  • 🛠️ Infra / Tooling
  • 🧪 Test-only

🐛 Bug Context
Required if this PR fixes a bug

Root Cause
What caused the issue?
Faulty assumption

Fix Strategy
Root cause: we were not distinguishing between text selection and click events, which led to the issue. Many libraries handle this behavior inherently, but react-virtuoso does not provide it out of the box, so we needed to implement the handling manually.

🧪 Testing Strategy
How was this change validated?

  1. open app.us.staging/cloud
  2. Goto logs-explorer route , drag select any log row
  3. You should be able to select any content of the row without opening the drawer

Tests added/updated: Yes
Manual verification: Yes
Edge cases covered: Yes

📋 Checklist
Tests added

@ishan621 ishan621 requested a review from a team as a code owner February 20, 2026 09:52
@github-actions github-actions bot added docs required enhancement New feature or request labels Feb 20, 2026
@ishan621 ishan621 self-assigned this Feb 20, 2026
H4ad
H4ad previously approved these changes Feb 23, 2026
Copy link
Copy Markdown
Contributor

@H4ad H4ad left a comment

Choose a reason for hiding this comment

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

Not blocking: Maybe adding a test for to ensure this will not be erased/ignored in the future? You will need to mock the window.getSelection

reply --
Added a unit test for useLogDetailHandlers to guard the text-selection check in handleSetActiveLog

@YounixM
Copy link
Copy Markdown
Member

YounixM commented Feb 23, 2026

@cursor review

@ishan621 ishan621 merged commit 78ba2ba into main Feb 25, 2026
15 checks passed
@ishan621 ishan621 deleted the SIG_3903 branch February 25, 2026 06:08
ishan621 added a commit that referenced this pull request Feb 25, 2026
* feat: text selection block

* chore: added test file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs shipped enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants