-
Notifications
You must be signed in to change notification settings - Fork 31
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
feat: Add alt+click shortcut to copy cell and column headers #1694
feat: Add alt+click shortcut to copy cell and column headers #1694
Conversation
…o 1585-alt-click-shortcut
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1694 +/- ##
==========================================
- Coverage 46.74% 46.65% -0.09%
==========================================
Files 606 607 +1
Lines 36762 36945 +183
Branches 9227 9294 +67
==========================================
+ Hits 17184 17238 +54
- Misses 19526 19655 +129
Partials 52 52
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
8b6201a
to
02aaa14
Compare
02aaa14
to
4e43d37
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good start! Couple of things we can improve.
@@ -632,6 +633,9 @@ class IrisGridContextMenuHandler extends GridMouseHandler { | |||
actions.push({ | |||
title: 'Copy Cell', | |||
group: IrisGridContextMenuHandler.GROUP_COPY, | |||
shortcutText: ContextActionUtils.isMacPlatform() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was debating if we should add support for Shortcut to handle mouse clicks... would be kind of interesting in that they could be configurable, but it's more of a headache than we need right now.
packages/iris-grid/src/mousehandlers/IrisGridCopyCellMouseHandler.ts
Outdated
Show resolved
Hide resolved
packages/iris-grid/src/mousehandlers/IrisGridCopyCellMouseHandler.ts
Outdated
Show resolved
Hide resolved
@georgecwan you can test with copy permissions disabled by setting the permission flag on startup, e.g.:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Something is strange with the snapshot function in general. When I'm trying to copy 100,000 rows, it's only copying 50,000. Table I'm using is:
from deephaven import empty_table
t = empty_table(100000).update(["X=i", "Y=i*i"])
I don't think related to your change though, seems to be in the JS API. Interesting. Logged it with ticket https://github.com/deephaven/web-client-ui/issues/1703 for further investigation.
Other than the minor handleKeyDown
cleanup on Grid, should also write a unit test in IrisGridCopyHandler.test.tsx
for the copy header cases.
Adds a alt/opt+click shortcut to copy the value of a cell or column header.
Resolves #1585.