Skip to content

feat(views): Layer Cart UX round two - #455

Open
allison-truhlar wants to merge 11 commits into
ngviews-08-broken-source-trackingfrom
ngviews-09-cart-ux
Open

allison-truhlar wants to merge 11 commits into
ngviews-08-broken-source-trackingfrom
ngviews-09-cart-ux

Conversation

@allison-truhlar

Copy link
Copy Markdown
Collaborator

Dev-feedback branch 09 (items 5-9 and 11 of the 3.3.0a0 test-release feedback, plus one local-testing follow-up). Spec: docs/superpowers/specs/2026-09-16-ngviews-dev-feedback-design.md.

What changed

  • Item 5: each cart dataset shows up front whether it will load as a Neuroglancer layer. probeDataset in viewCheckout.ts is now the single OME / plain-array / unsupported classifier shared by the cart indicator and checkout, so the two cannot disagree. Checkout skips a failing dataset instead of aborting the whole View and reuses the probe's array state.
  • Item 6: "New View from selection" is removed. The cart is the only path to a View.
  • Item 7: the cart badge counts datasets, not channel selections.
  • Item 8: "Add to cart" opens the cart drawer.
  • Item 9: the Create View dialog focuses and selects the name input on open (via the dialog's initialFocus).
  • Item 11: "View in Neuroglancer" dropped from the file-browser row menu.
  • Each Layer Cart dataset shows its full filesystem path.
  • Local-testing follow-up: a dataset that produces no Neuroglancer layer (for example a plain directory) is persisted as a ViewLayer flagged opts.unsupported, so the Views table still lists it under Sources with a warning triangle ("Will not load as a Neuroglancer layer"). The Layers count excludes it. The cart uses the same warning triangle instead of an x-in-circle.

Testing

Frontend suite green, prettier and eslint clean, node-check at the known baseline.

@allison-truhlar
allison-truhlar added this pull request to stack #429 September 22, 2026 17:57
…rom the row menu

Row menu item is now 'Add to cart'. Both add paths call the new
non-toggling openDrawer('cart') from the browse layout outlet context.
…ension check

The cart hook now reports each dataset's kind (ome/array/unsupported) from
the same classification checkout uses.
…euse the probe's array state

- viewCheckout: array probe carries the encoded state so generateStateForDataset
  reuses it instead of re-fetching; wrap the array/OME generation path in
  try/catch so one bad dataset is skipped, not fatal to buildViewState
- CartTab.test.tsx: assert the real CartDatasetRow layer-status indicator
  renders for ome/unsupported kindByKey values
- FileTableSelectColumn.test.tsx: drop the now-inert useCreateViewFlow mock;
  add openDrawer to the useOutletContext stub
- useCartCount.ts: fix stale comment (badge moved to the toolbar, not navbar)
- FileBrowserCartItem.test.tsx: assert openDrawer is not called on add failure
- SelectionBar/FileBrowser: useOutletContext can return null outside an Outlet
The link under a dataset name showed only the subpath within the file
share path. Resolve the FSP from the zones/FSP map and render the full
path (mount + subpath) via getPreferredPathForDisplay, honoring the
user's path-format preference. Falls back to the bare subpath until the
FSP map has loaded.
A cart dataset that produces no Neuroglancer layer (for example a plain
directory) was dropped at checkout, so the Views table never listed it.
Checkout now records it as a ViewLayer flagged `opts.unsupported`, with an
index past the real layers. The Sources column lists it with a warning
triangle whose tooltip reads "Will not load as a Neuroglancer layer"; the
Layers count excludes it. The Layer Cart uses the same warning triangle
instead of an x-in-circle for unsupported datasets.
@allison-truhlar
allison-truhlar marked this pull request as ready for review September 23, 2026 14:06
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