Skip to content

feat: Neuroglancer Views polish (PR 7, ngviews-07-cart-and-viewer-polish) - #431

Open
allison-truhlar wants to merge 16 commits into
ngviews-06-embedded-readonlyfrom
ngviews-07-cart-and-viewer-polish
Open

feat: Neuroglancer Views polish (PR 7, ngviews-07-cart-and-viewer-polish)#431
allison-truhlar wants to merge 16 commits into
ngviews-06-embedded-readonlyfrom
ngviews-07-cart-and-viewer-polish

Conversation

@allison-truhlar

Copy link
Copy Markdown
Collaborator

Follow-up polish on the Neuroglancer Views stack, addressing three issues raised in the last dev meeting round.

What changed

  • Cart rows expand without a Data Link. CartDatasetRow now fetches OME-Zarr metadata and channel labels from the internal /api/content/<fsp>/<path> URL (credentialed), so every valid Zarr dataset in the cart can be inspected before a View is created. Previously the "Channels load after the View is created" hint appeared for any dataset that didn't already have a proxied path, which was inconsistent — the same dataset with an existing Data Link had full expansion. The proxied-path lookup and its useAllProxiedPathsQuery dependency drop out of CartList entirely.
  • Embedded viewer header collapses to one row. The redundant h6 title (already shown in the breadcrumb) is gone, and the action buttons — Copy link, Download JSON, Open external, Fullscreen — move up to sit on the breadcrumb row. Gives the iframe more vertical space.
  • NG Views table: resizable Sources column, horizontal scroll, one row per entry.
    • Fixes the missing 6th grid track so the Actions cell stops wrapping to a second row on each entry.
    • Adds a gridColsStyle prop on TableCard (inline gridTemplateColumns) as an alt to the static gridColsClass, since Tailwind JIT can't emit arbitrary-width classes at runtime. Existing tables keep their gridColsClass and are unaffected.
    • The Sources column has a drag handle at the column's right edge that mirrors the file browser's resize UI (thin line, primary color on hover/drag).
    • Each source path renders on its own truncated line with a native title tooltip on hover — links remain clickable and navigate to the file browser.
    • The header + body are wrapped in overflow-x-auto so widening Sources doesn't push Sharing, Updated, and Actions off-screen out of reach.
    • Every cell gets explicit justify-start + text-left.

Verified

  • pixi run node-check — no new type errors (pre-existing failures in unrelated files: ContextMenu.tsx, PathFormatOptions.tsx, PermissionsTable.tsx, sshKeyQueries.ts, ColorsPageSync.test.ts).
  • pixi run node-eslint-check — 0 errors, only a pre-existing unused-import warning in NeuroglancerOptions.tsx.
  • pixi run test-frontend — 384 tests pass. CartList.test.tsx, CartTab.test.tsx, and ngViewsColumns.test.tsx updated for the new URL source and the resizable-column hook signature.

Not verified

Manual dev-server browser check. The changes are visual, so a quick eyeball pass on the three affected surfaces is worthwhile before merge.

Metadata + channels are fetched from the internal /api/content URL
(credentialed) instead of the proxied-path URL, so every cart dataset can
be inspected before a View is created - matching the behavior users
already get on the browse page.
Drop the redundant h6 title (already shown in the breadcrumb) and move
the action buttons up to the breadcrumb row. Frees vertical space for
the Neuroglancer iframe.
…ontal scroll

- Fix the missing 6th grid track so the Actions cell stops wrapping to a
  second row on each entry.
- Add an optional gridColsStyle prop on TableCard (inline
  gridTemplateColumns, alt to the static gridColsClass), since Tailwind
  JIT can't emit arbitrary-width classes at runtime.
- The Sources column has its own drag handle at the column's right edge
  (thin line, primary color on hover/drag). Sources cell now shows each
  source path on a truncated line with a native tooltip on hover, so long
  paths stay clickable and inspectable without eating the whole row.
- Wrap the header + body in overflow-x-auto so widening Sources doesn't
  push the trailing columns off-screen unreachable.
- Explicit left-align across every cell (justify-start + text-left).
The Sources column showed each layer's path relative to its file share,
which is ambiguous across shares. Resolve the FileSharePath from the
layer's fsp_name and render the full path (share path plus subpath)
using the viewer's path-format preference, matching how the Data Links
and Jobs tables display paths. Fall back to the relative path when the
share can't be resolved, such as a local environment with no central
URL configured.
…cart

Expanding a plain (non-OME) Zarr array in the Layer Cart showed an empty
body: it has no multiscale axes to fill the dimension table and no
channels to select, so the row looked broken. Show "No OME-Zarr metadata
to display" when a dataset has neither axes nor channels. OME datasets
keep the axis table and channel checkboxes unchanged.
The default column tracks summed to 1040px, forcing a horizontal
scrollbar the first time the Views page loads. Narrow the Name and
Sources columns and tighten the Sharing, Updated, and Actions tracks so
the default layout fits. Name truncates with a tooltip, and Sources
stays resizable for long paths.
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