Commit a282146
Sequence metadata UI (#1905)
* add workspace file metadata types, API methods, and fetching
* add workspace file metadata UI — table columns, metadata banner, and read-only support
* workspace panel refactor, metadata API fixes, and sidebar button fix
* extract PanelHeader component from repeated section title styling
* add user metadata editor, open folder navigation, and file browser search improvements
- Add CodeMirror-based JSON editor for user metadata in the metadata panel
with syntax highlighting, validation, and auto-save on blur/file switch
- Add "Open Folder" button in content area and context menu to navigate
the file browser to a selected folder
- Extend file browser search to match against metadata fields (createdBy,
lastEditedBy, version, user metadata)
- Move read-only permission handling from editor components to FileMetadataBanner
- Add success toast for read-only status changes
* Column sizing fixes
* Panel sizing
* Tweak workspace file browse column sizes for compactness
* fix workspace metadata reactivity and type safety improvements
* Right sidebar icon swap for dictionary
* Tweak user metadata input to use explicit edit, save, cancel buttons. Auto discard changes when changing tabs or files.
* Tooltip improvements for workspace sidebar and icon tray
* Refactor
* Prettier
* Test fixes
* fix(sequencing): configure both readOnly and editable facets in editor
Add EditorView.editable configuration alongside EditorState.readOnly
in SequenceEditor and WorkspaceMetadataPanel components. Both facets
need to be properly configured for CodeMirror to correctly handle
editor editability state changes.
Changes:
- Add EditorView.editable.of() to compartment reconfiguration in both components
- Refactor SequenceEditor readonly logic to use isEditable variable for clarity
- Reorder onReadOnlyChange prop declaration in SequenceEditor
This ensures the editor properly responds to readonly state changes by
configuring both the readOnly state facet and the editable view facet.
* refactor(workspace): extract panel toggle logic into reusable function
Extract duplicate click handler logic into a `togglePanel` function to reduce code duplication in WorkspaceRightIconRail component. The function handles toggling between metadata, command, and dictionary panels, closing the active panel if clicked again or switching to a new panel otherwise.
This improves maintainability by following the DRY principle and makes the component easier to modify in the future.
* refactor(workspace): improve variable declarations in WorkspaceRightPanel
- Add explicit type imports (ArgTextDef, TimeTagInfo) from sequence languages
- Declare component variables at top for better organization and clarity
- Simplify timeTagNode reactive statement formatting
- Improve code readability by making variable declarations explicit
This refactoring improves code maintainability by organizing variable
declarations in a clear, conventional pattern at the component's top level.
* fix(workspace): clarify metadata message is for folders, not files
* fix(workspace): await file save and refresh contents after save
This fixes a potential race condition where the workspace UI might not reflect the saved state and ensures proper async/await flow in the save operation.
* refactor: remove version column and metadata from workspace UI
* Optimistically update the metadata user object so it doesn't flash on save.
* fix linting errors
* fix: add overwrite merge behavior to workspace metadata POST requests
* feat(ui): add column resize support and centralize cookie management
- Add columnShiftResize prop to BulkActionDataGrid and SingleActionDataGrid components
- Create centralized cookie utilities (setCookie, getCookie) with consistent expiration handling
- Implement column state persistence in WorkspaceFileBrowser using cookies
- Move cookie constants to centralized location (constants/cookies.ts)
- Refactor SidebarProvider to use new cookie utilities instead of manual document.cookie
- Add comprehensive test coverage for cookie utility functions
This change improves code maintainability by consolidating cookie management logic and enables users to persist their column resize preferences across sessions.
* feat(workspace): add read-only file protection to context menu
- Add `hasReadOnlyNodes` prop to track selection of read-only files
- Disable rename and delete operations when read-only files are selected
- Display appropriate error messages for read-only restrictions
- Visually indicate "Move" is disabled (with reduced opacity) while keeping "Copy" available for read-only files
- Update permission checks to consider read-only status alongside existing permissions
This prevents users from accidentally modifying or deleting files that should remain read-only, improving data integrity in the workspace.
* fix test
* refactor: simplify actions click handling and add open folder button
- Remove custom event dispatcher from WorkspaceLeftIconRail component
- Use existing handleTabClick function for actions button instead of custom event
- Simplify component interface by removing actionsClick event handler prop
- Add "Open Folder" button to workspace document view for easier folder access
This refactoring reduces code complexity by consolidating tab click handling into a single method while improving UX with the new folder access feature.
* refactor(workspace): reorganize component props and restructure layout
- Move currentBreadcrumbPath export to group with other props in WorkspaceSidebar
- Restructure workspace content area component hierarchy
- Improve code organization without changing functionality
This refactoring improves code readability by grouping related exports together and simplifying the component structure in the workspace page.
* refactor(e2e): improve TypeScript imports and fix action selector
- Use type-only imports for Locator and Page to optimize bundle size
- Add definite assignment assertions (!:) to Locator properties initialized in constructor
- Update action sidebar selector from 'complementary' to 'tablist' role for more accurate element targeting
These changes improve TypeScript type safety and ensure more reliable E2E test selectors in the Action fixture.
* refactor(workspace): simplify modals and add read-only file protection
- Remove unused workspace and user props from ImportWorkspaceFileModal
- Remove enableContextMenu prop from WorkspaceTreeView component calls
- Add selectionHasReadOnlyNodes prop to MoveItemToWorkspaceModal
- Prevent moving read-only files with appropriate error messaging
- Update permission checks to account for read-only file selections
- Clean up unused type imports and component props
This simplifies the component interface by removing unnecessary props that were being passed through multiple layers, and adds protection against moving read-only files to prevent data integrity issues.
* fix(text-editor): configure editable state alongside readonly
**Changes:**
- Configure both `EditorState.readOnly` and `EditorView.editable` facets to properly control editor interactivity
- Update E2E test selectors to use more specific button roles in tabpanel instead of generic labels
- Reorder component props for consistency (move callback to end)
**Why:**
The text editor was not properly respecting readonly/preview/loading states because only the `readOnly` facet was configured. CodeMirror requires both `readOnly` and `editable` facets to be set for proper behavior. The E2E test updates improve selector reliability by targeting more specific button elements.
* remove log
* fix: improve error handling in error display and bulk file operations
This commit addresses two error handling issues:
1. Error store: Stringify object-type error causes to prevent displaying
"[object Object]" in error messages. Previously, object causes were
coerced to string directly, losing valuable debugging information.
2. Bulk file operations: Track failed file operations that are not
conflicts in the bulkMoveWorkspaceItems function. Non-success
responses during overwrite operations are now properly added to
failedFileOperations array for better error reporting.
These changes improve error visibility and ensure failed operations
are properly tracked and reported to users.
* fix(effects): improve error messaging for failed workspace item moves
* fix(ui): add z-index to workspace content pane so tooltips don't go under right panel
* set minSize of left/right workspace panels to 20 to workaround issue with being always set to minSize on first open
* suppressSizeToFit on workspace file browser to preserve users' saved column width
* update ConsoleLog to not wrap everything in pre tags, update action runs to render better previews for JSON objects
* linting
* fix action tab styling
* Action tab content switching fixes
* Style fix
* fix: improve workspace file browser column sizing and add reset option
The Name column now uses flex:1 exclusively (never converted to fixed width),
so it fills remaining space instantly on panel open/close with no flash.
Metadata columns preserve user-set widths via cookies with suppressSizeToFit.
- Fix "Fit Columns to Available Space" context menu by temporarily overriding
suppressSizeToFit on resizable columns for explicit user actions
- Add "Reset Column Layout" context menu option to all DataGrid instances,
with cookie cleanup in the workspace file browser
- Guard ResizeObserver against collapsed containers (width < 50px)
- Preserve Name column flex:1 by stripping width/flex from saved column state
* Fix panel sizing after closing and re-opening
* Fixes and cleanup
* Preserve user-driven name column width changes. Add reset layout button to column picker.
* Bug fix
* Refactor
* Revert change
---------
Co-authored-by: AaronPlave <aaronplave@gmail.com>
Co-authored-by: Dan Delany <daniel.t.delany@jpl.nasa.gov>1 parent 2632b0f commit a282146
50 files changed
Lines changed: 2949 additions & 976 deletions
File tree
- e2e-tests
- fixtures
- tests
- src
- components
- activity
- console/views
- modals
- sequencing
- actions
- ui
- DataGrid
- Sidebar
- SidebarMenu
- workspace
- WorkspaceFileBrowser
- WorkspaceTreeView
- constants
- routes/workspaces/[workspaceId]
- stores
- types
- utilities
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
85 | 85 | | |
86 | 86 | | |
87 | 87 | | |
88 | | - | |
89 | | - | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
90 | 94 | | |
91 | 95 | | |
92 | 96 | | |
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
96 | | - | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
97 | 104 | | |
98 | 105 | | |
99 | 106 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
29 | 37 | | |
30 | 38 | | |
31 | 39 | | |
| |||
85 | 93 | | |
86 | 94 | | |
87 | 95 | | |
88 | | - | |
89 | | - | |
90 | | - | |
91 | | - | |
| 96 | + | |
| 97 | + | |
92 | 98 | | |
93 | 99 | | |
94 | 100 | | |
95 | 101 | | |
96 | 102 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 103 | + | |
| 104 | + | |
101 | 105 | | |
102 | 106 | | |
103 | 107 | | |
104 | 108 | | |
105 | 109 | | |
106 | | - | |
107 | | - | |
108 | | - | |
109 | | - | |
| 110 | + | |
| 111 | + | |
110 | 112 | | |
111 | | - | |
112 | 113 | | |
113 | 114 | | |
114 | 115 | | |
| |||
158 | 159 | | |
159 | 160 | | |
160 | 161 | | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
161 | 174 | | |
162 | 175 | | |
163 | 176 | | |
| |||
191 | 204 | | |
192 | 205 | | |
193 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
194 | 216 | | |
195 | 217 | | |
196 | 218 | | |
197 | 219 | | |
198 | 220 | | |
199 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
200 | 233 | | |
201 | 234 | | |
202 | 235 | | |
| |||
241 | 274 | | |
242 | 275 | | |
243 | 276 | | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
244 | 282 | | |
245 | 283 | | |
246 | 284 | | |
247 | | - | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
248 | 288 | | |
249 | 289 | | |
250 | 290 | | |
251 | 291 | | |
252 | 292 | | |
| 293 | + | |
253 | 294 | | |
254 | 295 | | |
255 | 296 | | |
256 | | - | |
257 | | - | |
258 | | - | |
259 | | - | |
260 | | - | |
261 | | - | |
| 297 | + | |
| 298 | + | |
262 | 299 | | |
263 | 300 | | |
264 | 301 | | |
| |||
0 commit comments