Skip to content

Commit 0781900

Browse files
authored
fix: show copy cursor in grid on key down and not just mouse move (#1735)
- Adds copy cell key handler to set cursor on key down. Grid was only showing copy cursor on mouse move, not just key down. Unfortunately we still require focus to get the key down, and I don't think it's worth hacking around that. - Moved cursor styles to linker and irisgrid css respectively, so that it is shared to DHE. AppMainContainer.css isn't used in DHE. - Moved cursors and logos in to asset folder (folders named "assets" are bundled by Vite - Tweaked copy icon svg (aliasing is improved) - default cursor to "copy" in iris grid so that it shows in embed widget and DHE BREAKING CHANGE: linker and iris grid custom cursor styling and assets are now provided by components directly. DHE css and svg files containing linker cursors should be removed/de-duplicated.
1 parent 33c6a8d commit 0781900

20 files changed

Lines changed: 102 additions & 57 deletions

File tree

packages/code-studio/src/assets/svg/cursor-copy.svg

Lines changed: 0 additions & 15 deletions
This file was deleted.

packages/code-studio/src/main/AppMainContainer.scss

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -9,34 +9,6 @@ $tab-link-disabled-color: $gray-600;
99

1010
$nav-space: 4px; // give a gap around some buttons for focus area that are in nav bar
1111

12-
.grid-cursor-copy {
13-
cursor:
14-
url('../assets/svg/cursor-copy.svg') 8 8,
15-
copy;
16-
}
17-
18-
.grid-cursor-linker {
19-
cursor:
20-
url('../assets/svg/cursor-linker.svg') 8 8,
21-
crosshair;
22-
}
23-
24-
.grid-cursor-linker-not-allowed {
25-
cursor:
26-
url('../assets/svg/cursor-linker-not-allowed.svg') 8 8,
27-
not-allowed;
28-
}
29-
30-
.linker-overlay path.link-select {
31-
cursor: pointer;
32-
}
33-
34-
.linker-overlay.danger-delete path.link-select {
35-
cursor:
36-
url('../assets/svg/cursor-unlinker.svg') 8 8,
37-
pointer;
38-
}
39-
4012
.app-main-top-nav-menus {
4113
display: flex;
4214
width: 100%;

packages/components/logos/community-wordmark-dark.svg renamed to packages/components/assets/logos/community-wordmark-dark.svg

File renamed without changes.

packages/components/logos/community-wordmark-light.svg renamed to packages/components/assets/logos/community-wordmark-light.svg

File renamed without changes.

packages/components/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"dist",
5959
"scss",
6060
"css",
61-
"logos"
61+
"assets"
6262
],
6363
"sideEffects": [
6464
"*.css"

packages/components/src/theme/Logo.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:root {
2-
--dh-logo-dark-img: url('../../logos/community-wordmark-dark.svg');
3-
--dh-logo-light-img: url('../../logos/community-wordmark-light.svg');
2+
--dh-logo-dark-img: url('../../assets/logos/community-wordmark-dark.svg');
3+
--dh-logo-light-img: url('../../assets/logos/community-wordmark-light.svg');
44
}
55

66
.dh-logo {

packages/code-studio/src/assets/svg/cursor-unlinker.svg renamed to packages/dashboard-core-plugins/assets/svg/cursor-unlinker.svg

File renamed without changes.

packages/dashboard-core-plugins/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@
6868
"@deephaven/mocks": "file:../mocks"
6969
},
7070
"files": [
71-
"dist"
71+
"dist",
72+
"assets"
7273
],
7374
"sideEffects": [
7475
"*.css"

packages/dashboard-core-plugins/src/linker/LinkerLink.scss

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,12 @@ $dash-size: 10;
128128
}
129129

130130
&.danger-delete {
131+
path.link-select {
132+
cursor:
133+
url('../assets/svg/cursor-unlinker.svg') 8 8,
134+
pointer;
135+
}
136+
131137
path.link-select:hover ~ path.link-background {
132138
stroke: $dash-delete-color-2;
133139
}

packages/dashboard-core-plugins/src/panels/IrisGridPanel.scss

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,3 @@ $panel-message-overlay-top: 30px;
2727
color: $danger;
2828
}
2929
}
30-
31-
.grid-cursor-linker {
32-
cursor: crosshair;
33-
}
34-
35-
.grid-cursor-copy {
36-
cursor: copy;
37-
}

0 commit comments

Comments
 (0)