diff options
Diffstat (limited to 'subprojects/frontend')
-rw-r--r-- | subprojects/frontend/package.json | 14 | ||||
-rw-r--r-- | subprojects/frontend/src/graph/VisibilityPanel.tsx | 36 | ||||
-rw-r--r-- | subprojects/frontend/src/xtext/UpdateStateTracker.ts | 2 |
3 files changed, 33 insertions, 19 deletions
diff --git a/subprojects/frontend/package.json b/subprojects/frontend/package.json index ae1103d6..f394e6e5 100644 --- a/subprojects/frontend/package.json +++ b/subprojects/frontend/package.json | |||
@@ -28,13 +28,13 @@ | |||
28 | }, | 28 | }, |
29 | "homepage": "https://refinery.tools", | 29 | "homepage": "https://refinery.tools", |
30 | "dependencies": { | 30 | "dependencies": { |
31 | "@codemirror/autocomplete": "^6.16.2", | 31 | "@codemirror/autocomplete": "^6.16.3", |
32 | "@codemirror/commands": "^6.6.0", | 32 | "@codemirror/commands": "^6.6.0", |
33 | "@codemirror/language": "^6.10.2", | 33 | "@codemirror/language": "^6.10.2", |
34 | "@codemirror/lint": "^6.8.0", | 34 | "@codemirror/lint": "^6.8.1", |
35 | "@codemirror/search": "^6.5.6", | 35 | "@codemirror/search": "^6.5.6", |
36 | "@codemirror/state": "^6.4.1", | 36 | "@codemirror/state": "^6.4.1", |
37 | "@codemirror/view": "^6.28.1", | 37 | "@codemirror/view": "^6.28.2", |
38 | "@emotion/cache": "^11.11.0", | 38 | "@emotion/cache": "^11.11.0", |
39 | "@emotion/react": "^11.11.4", | 39 | "@emotion/react": "^11.11.4", |
40 | "@emotion/serialize": "^1.1.4", | 40 | "@emotion/serialize": "^1.1.4", |
@@ -51,7 +51,7 @@ | |||
51 | "@mui/icons-material": "^5.15.20", | 51 | "@mui/icons-material": "^5.15.20", |
52 | "@mui/material": "^5.15.20", | 52 | "@mui/material": "^5.15.20", |
53 | "@mui/system": "^5.15.20", | 53 | "@mui/system": "^5.15.20", |
54 | "@mui/x-data-grid": "^7.7.0", | 54 | "@mui/x-data-grid": "^7.7.1", |
55 | "ansi-styles": "^6.2.1", | 55 | "ansi-styles": "^6.2.1", |
56 | "csstype": "^3.1.3", | 56 | "csstype": "^3.1.3", |
57 | "d3": "^7.9.0", | 57 | "d3": "^7.9.0", |
@@ -77,7 +77,7 @@ | |||
77 | "zod": "^3.23.8" | 77 | "zod": "^3.23.8" |
78 | }, | 78 | }, |
79 | "devDependencies": { | 79 | "devDependencies": { |
80 | "@lezer/generator": "^1.7.0", | 80 | "@lezer/generator": "^1.7.1", |
81 | "@types/d3": "^7.4.3", | 81 | "@types/d3": "^7.4.3", |
82 | "@types/d3-color": "^3.1.3", | 82 | "@types/d3-color": "^3.1.3", |
83 | "@types/d3-graphviz": "^2.6.10", | 83 | "@types/d3-graphviz": "^2.6.10", |
@@ -88,7 +88,7 @@ | |||
88 | "@types/lodash-es": "^4.17.12", | 88 | "@types/lodash-es": "^4.17.12", |
89 | "@types/micromatch": "^4.0.7", | 89 | "@types/micromatch": "^4.0.7", |
90 | "@types/ms": "^0.7.34", | 90 | "@types/ms": "^0.7.34", |
91 | "@types/node": "^20.14.2", | 91 | "@types/node": "^20.14.8", |
92 | "@types/pnpapi": "^0.0.5", | 92 | "@types/pnpapi": "^0.0.5", |
93 | "@types/react": "^18.3.3", | 93 | "@types/react": "^18.3.3", |
94 | "@types/react-dom": "^18.3.0", | 94 | "@types/react-dom": "^18.3.0", |
@@ -97,7 +97,7 @@ | |||
97 | "html-minifier-terser": "^7.2.0", | 97 | "html-minifier-terser": "^7.2.0", |
98 | "micromatch": "^4.0.7", | 98 | "micromatch": "^4.0.7", |
99 | "pnpapi": "^0.0.0", | 99 | "pnpapi": "^0.0.0", |
100 | "typescript": "5.4.5", | 100 | "typescript": "5.5.2", |
101 | "vite": "^5.3.1", | 101 | "vite": "^5.3.1", |
102 | "vite-plugin-pwa": "^0.20.0", | 102 | "vite-plugin-pwa": "^0.20.0", |
103 | "workbox-window": "^7.1.0" | 103 | "workbox-window": "^7.1.0" |
diff --git a/subprojects/frontend/src/graph/VisibilityPanel.tsx b/subprojects/frontend/src/graph/VisibilityPanel.tsx index 9d81e906..619113ef 100644 --- a/subprojects/frontend/src/graph/VisibilityPanel.tsx +++ b/subprojects/frontend/src/graph/VisibilityPanel.tsx | |||
@@ -102,20 +102,32 @@ const VisibilityDialogScroll = styled('div', { | |||
102 | width: 'min-content', | 102 | width: 'min-content', |
103 | }, | 103 | }, |
104 | '& td:nth-of-type(3)': { | 104 | '& td:nth-of-type(3)': { |
105 | cursor: 'pointer', | 105 | position: 'relative', |
106 | userSelect: 'none', | ||
107 | WebkitTapHighlightColor: 'transparent', | ||
108 | }, | 106 | }, |
109 | 107 | ||
110 | '& thead th, .VisibilityDialog-custom tr:last-child td': { | 108 | '& thead th, .VisibilityDialog-custom tr:last-child td': { |
111 | borderBottom: `1px solid ${theme.palette.divider}`, | 109 | borderBottom: `1px solid ${theme.palette.divider}`, |
112 | }, | 110 | }, |
113 | // Hack to apply `text-overflow`. | 111 | '.VisibilityDialog-toggleVisibility': { |
114 | '.VisibilityDialog-nowrap': { | 112 | // Hack to apply `text-overflow`. |
115 | maxWidth: '100%', | 113 | maxWidth: '100%', |
116 | overflow: 'hidden', | 114 | overflow: 'hidden', |
117 | wordWrap: 'nowrap', | 115 | wordWrap: 'nowrap', |
118 | textOverflow: 'ellipsis', | 116 | textOverflow: 'ellipsis', |
117 | background: 'transparent', | ||
118 | border: 'none', | ||
119 | font: 'inherit', | ||
120 | lineHeight: 'inherit', | ||
121 | cursor: 'pointer', | ||
122 | WebkitTapHighlightColor: 'transparent', | ||
123 | '&::after': { | ||
124 | content: '" "', | ||
125 | position: 'absolute', | ||
126 | left: 0, | ||
127 | right: 0, | ||
128 | top: 0, | ||
129 | bottom: 0, | ||
130 | }, | ||
119 | }, | 131 | }, |
120 | '.VisibilityDialog-empty': { | 132 | '.VisibilityDialog-empty': { |
121 | display: 'flex', | 133 | display: 'flex', |
@@ -172,13 +184,15 @@ function VisibilityPanel({ | |||
172 | /> | 184 | /> |
173 | </Tooltip> | 185 | </Tooltip> |
174 | </td> | 186 | </td> |
175 | <td | 187 | <td> |
176 | onClick={() => graph.cycleVisibility(name)} | 188 | <button |
177 | aria-label="Toggle visiblity" | 189 | type="button" |
178 | > | 190 | onClick={() => graph.cycleVisibility(name)} |
179 | <div className="VisibilityDialog-nowrap"> | 191 | aria-label={`Toggle visibility of ${metadata.simpleName}`} |
192 | className="VisibilityDialog-toggleVisibility" | ||
193 | > | ||
180 | <RelationName metadata={metadata} abbreviate={graph.abbreviate} /> | 194 | <RelationName metadata={metadata} abbreviate={graph.abbreviate} /> |
181 | </div> | 195 | </button> |
182 | </td> | 196 | </td> |
183 | </tr> | 197 | </tr> |
184 | ); | 198 | ); |
diff --git a/subprojects/frontend/src/xtext/UpdateStateTracker.ts b/subprojects/frontend/src/xtext/UpdateStateTracker.ts index 4ce93ed6..3297e12a 100644 --- a/subprojects/frontend/src/xtext/UpdateStateTracker.ts +++ b/subprojects/frontend/src/xtext/UpdateStateTracker.ts | |||
@@ -102,7 +102,7 @@ export default class UpdateStateTracker { | |||
102 | onTransaction(transaction: Transaction): boolean { | 102 | onTransaction(transaction: Transaction): boolean { |
103 | const setDirtyChangesEffect = transaction.effects.find((effect) => | 103 | const setDirtyChangesEffect = transaction.effects.find((effect) => |
104 | effect.is(setDirtyChanges), | 104 | effect.is(setDirtyChanges), |
105 | ) as StateEffect<ChangeSet> | undefined; | 105 | ); |
106 | if (setDirtyChangesEffect) { | 106 | if (setDirtyChangesEffect) { |
107 | const { value } = setDirtyChangesEffect; | 107 | const { value } = setDirtyChangesEffect; |
108 | if (this.pendingChanges !== undefined) { | 108 | if (this.pendingChanges !== undefined) { |