Conversation
- also fixes location of the copy icon for the code blocks
- in the DataLinkUsageDialog, the copied message was not showing due to a CSS issue. However, in addressing this, I realized that this component was recreating logic from the CopyTooltip component and reworked it to use that component
…in properties panel
…alog Replace path-based inferDataType with content-based detection using detectZarrVersions/detectN5 from the respective queries.
Switch to fileBrowserState.dataLinkPath so the external data URL updates when clicking a subdirectory and the correct data link shows in the properties panel. Mirrors a similar reent change already on main for non-external data URLs
neomorphic
left a comment
There was a problem hiding this comment.
It all works for me. I left a few cosmetic comments, but the code worked as expected.
…th extracted components - also adds a new PrerequisitesBlock - note: Java tab not included yet
krokicki
left a comment
There was a problem hiding this comment.
It feels wrong to me that we need to re-detect the types in the dialog. I understand that this is because the dialog is used in both the center pane and the properties pane, and the properties pane may be open to a different file.
Maybe we should re-evaluate if that is even a good idea. The current behavior seems potentially confusing to me. If you click on a file, it drills into it. If you click on a folder, it loads it into the properties panel. What if we made it so that clicking always drills down? Then the main browser pane and the properties panel should always be in sync, and does this issue go away?
ea72d36 to
7489cc6
Compare
@krokicki I don't think that clicking on a row should immediately drill into the folder - this is not what happens in my file system browser and I would expect the behavior of the Fileglancer file browser to mimic other familiar file browsers. I can see what you're saying about it seeming incorrect to redetect the data types, however, if we're opening the dialog for the current folder in file browser, the file, zarr, and n5 queries don't rerurn since Tanstack Query caches these fetches with a key constructed from the FSP and path. So the only functions that would rerun in the file browser case are the detectZarrVersions and detectN5 functions from these respective queries, which just scan an array of filenames. |
Clickup ids: 86acuxatq, 86accr60r, 86aeq5001, 86accr5yg
This PR adds a data link usage dialog with copy-able code snippets and instructions for opening data links in external tools. The dialog is organized into tabs by tool/language (Fiji, Java, Napari, Python, and VVDViewer) and is context-aware — showing different content for zarr, N5, and directory data types. This determination is owned by the dialog - it uses the
detectZarrVersionsanddetectN5methods from/queries/fileQueries.ts. In the dialog header, viewable no matter which tab is selected, is a copy data link box. The dialog is accessible from the zarr/N5 preview panels, the properties drawer, and the data links table.This PR also redesigns the data tool link icons (Neuroglancer, Vol-E, Avivator, etc.) as labeled circular buttons with hover effects, replacing the previous ButtonGroup layout. It adds the "More ways to open" button, displayed as a three-dot "More..." icon in the Zarr/N5 preview panels and a button with text in the properties panel, that opens the data link usage dialog.
Finally, this PR:
data_externalfolders. Previously, if you clicked a sub-directory row of the current directory in the file browser, the properties panel did not update to show the link for that sub-directory. This is already fixed on main for data links that are not S3 proxy links (external data links).@krokicki @neomorphic @cgoina