Conversation
…read-only support
…arch 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
… Auto discard changes when changing tabs or files.
ac77bc8 to
5c140d9
Compare
|
Backend change that needs to be integrated:
As per discussion, the UI should use the |
| bind:pane={leftPaneApi} | ||
| > | ||
| <Sidebar.Provider | ||
| disableShortcut |
There was a problem hiding this comment.
It doesn't look like we use the shortcut to toggle open the sidebar anywhere else. If we disable it for workspaces, do we need it anywhere else? It looks like the other places we currently use the sidebar provider are in modals, and they're not even used as a sidebar in them.
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.
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.
…anel - 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.
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.
There was a problem hiding this comment.
@duranb and I reviewed this today & it is nearly ready to go. We updated the metadata POST request to include the overwrite flag per @Mythicaeda 's comment above. Only known remaining issues for us to look at tomorrow:
remove disableShortcut (unused)decided not to do for nowIn the left panel, if no metadata columns are shown, you can't resize the main "file name" column easilyfixedIn left panel, if you rearrange columns & then change which columns are enabled, they all get reordered back to original orderfixedself-review our last few commits re: optimistic updating - we think they're correct but kinda rushed to get it workingdone
Other feedback from leads meeting to consider (not committed to):
- When you try to move/delete readonly files, everything looks like it's allowed until you click the button and then get a red error. It would be nice to instead gray them out in the context menu so you can't open the modal
- What about multi-select -> move/delete, where some selected files are readonly and some aren't? Best would be some kind of message in the modal. At minimum make sure we at least get errors for the ones we couldn't edit.
readonly icon or other visual distinction in table for readonly files?doneremove Version column from the workspace file tabledone
- 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.
|
Discussed more with @duranb today - updated my last comment above to reflect fixed issues. Known remaining issues we're working on:
|
- 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.
Replace 'complementary' role with 'tablist' role in the actions test selector to accurately reflect the sidebar navigation component's semantic structure.
___REQUIRES_AERIE_PR___="1807"Corresponding backend branch NASA-AMMOS/plandev#1807. Closes #1767
Summary
TODO:
Test plan