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: No context menu item for paste in an input table #2341

Open
wants to merge 13 commits into
base: main
Choose a base branch
from

Conversation

ericlln
Copy link

@ericlln ericlln commented Jan 15, 2025

  • Added paste as a context menu option in IrisGrid
  • Added methods to check for and request clipboard permissions, which are called when clicking paste in context menu
  • For browsers that support the clipboard-read permission (e.g. Chrome), clicking paste results in the same behaviour as pressing the keyboard shortcut, provided the user has accepted the request for permission
  • For browsers that don't support the clipboard-read permission (e.g. Firefox and Safari), a modal is shown to explain the reason and to suggest using the keyboard shortcut instead

Additional related issues fixed

  • Show relevant warning when attempting to paste too many columns into input table
  • Fixed copy and pasting between Deephaven tables on Firefox. The issue is caused by tabs in pasted content being converted to     instead of      which we were expecting before. Was able to reproduce former behaviour on an older build of Firefox (91.0), meaning this discrepancy is likely caused by an update to Firefox (unsure when exactly)

@ericlln ericlln requested a review from mofojed January 15, 2025 18:55
@ericlln ericlln self-assigned this Jan 15, 2025
Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 14 lines in your changes missing coverage. Please review.

Project coverage is 46.71%. Comparing base (5f6c8d6) to head (d29409e).

Files with missing lines Patch % Lines
...d/src/mousehandlers/IrisGridContextMenuHandler.tsx 0.00% 8 Missing ⚠️
packages/iris-grid/src/IrisGrid.tsx 20.00% 4 Missing ⚠️
packages/grid/src/Grid.tsx 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2341      +/-   ##
==========================================
+ Coverage   46.70%   46.71%   +0.01%     
==========================================
  Files         704      706       +2     
  Lines       39044    39084      +40     
  Branches     9757     9950     +193     
==========================================
+ Hits        18234    18260      +26     
- Misses      20799    20813      +14     
  Partials       11       11              
Flag Coverage Δ
unit 46.71% <66.66%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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.

1 participant