Skip to content

Conversation

@artemmufazalov
Copy link
Member

@artemmufazalov artemmufazalov commented Aug 25, 2025

Closes #2754

There was a hack to prevent propagation in TreeView: https://github.com/ydb-platform/ydb-ui-components/blob/main/src/components/TreeView/TreeView.tsx#L49

I didn't implemented the same when was replacing TreeView with my own VersionsBlock.

More straightforward approach with stopPropagation in onClickCapture didn't work out

CI Results

Test Status: ⚠️ FLAKY

📊 Full Report

Total Passed Failed Flaky Skipped
378 373 0 3 2
Test Changes Summary ⏭️2

⏭️ Skipped Tests (2)

  1. Scroll to row, get shareable link, navigate to URL and verify row is scrolled into view (tenant/diagnostics/tabs/queries.test.ts)
  2. Copy result button copies to clipboard (tenant/queryEditor/queryEditor.test.ts)

Bundle Size: ✅

Current: 85.37 MB | Main: 85.37 MB
Diff: +1.03 KB (0.00%)

✅ Bundle size unchanged.

ℹ️ CI Information
  • Test recordings for failed tests are available in the full report.
  • Bundle size is measured for the entire 'dist' directory.
  • 📊 indicates links to detailed reports.
  • 🔺 indicates increase, 🔽 decrease, and ✅ no change in bundle size.

@artemmufazalov artemmufazalov requested a review from Copilot August 25, 2025 11:43

This comment was marked as outdated.

astandrik
astandrik previously approved these changes Aug 25, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes an issue with version copy functionality by implementing proper event handling to prevent click propagation when interacting with buttons within a tree node. The fix replaces a simple stopPropagation approach with a more sophisticated event delegation pattern that checks if the click target is an active button before deciding whether to trigger the parent click handler.

Key changes:

  • Implements a custom click handler with event delegation logic
  • Removes inline onClickCapture event handling from the clipboard button
  • Adds a utility function to identify active button targets

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@artemmufazalov artemmufazalov added this pull request to the merge queue Aug 25, 2025
Merged via the queue into main with commit c7d2eed Aug 25, 2025
7 checks passed
@artemmufazalov artemmufazalov deleted the 2754-fix-versions-copy branch August 25, 2025 14:07
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.

Versions tab - copy button doesn't work

3 participants