Skip to content

feat: add hints for missing n5 and zarr metadata#322

Merged
allison-truhlar merged 11 commits intomainfrom
hint-for-missing-n5-and-zarr-metadata
Mar 10, 2026
Merged

feat: add hints for missing n5 and zarr metadata#322
allison-truhlar merged 11 commits intomainfrom
hint-for-missing-n5-and-zarr-metadata

Conversation

@allison-truhlar
Copy link
Collaborator

Clickup id: 86afkemw3

This PR adds a MetadataHint component that renders a notification where a N5 or Zarr preview component would go, in cases where a directory might be a N5 or Zarr dataset based on name or partial file structure. The notification explains what is required to see a preview component for the dataset type. The notification also serves as a location to surface N5 and Zarr metadata query errors that prevent the preview component from showing - these were previously just logged to the console.

The main change is thefrontend/src/components/ui/BrowsePage/MetadataHint.tsx notification component. It renders above the file browser for each of eight hint cases:

  • (1) A folder with a .zarr extension, but the Zarr metadata query does not fire = to see the preview, requires adding a Zarr marker file (.zarray, .zattrs, or zarr.json)
  • The Zarr metadata query fires but returns null.
    • (2) If a .zattrs file (Zarr v2) is found = to see the preview, add the multiscales field to .zattrs. Or, to preview as an array, use .zarray instead.
    • (3) If a zarr.json file (Zarr v3) is found = to see the preview, add multiscales field
  • (4) Zarr metadata query error
  • A folder with a .n5 extension that:
    • (5) Has neither an s0/ folder or attributes.json
    • (6) Has an s0/ folder but no attributes.json
    • (7) Has an attributes.json file but no s0/ folder
  • (8) N5 metadata query error

@allison-truhlar allison-truhlar marked this pull request as ready for review March 9, 2026 19:26
- also updates the hint tooltip to review the statement that um was assumed
- also moved the test file into the test folder
@allison-truhlar allison-truhlar merged commit e787413 into main Mar 10, 2026
7 checks passed
@allison-truhlar allison-truhlar deleted the hint-for-missing-n5-and-zarr-metadata branch March 10, 2026 15:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant