Skip to content

feat(views): inline rename in the embedded viewer; View/share copy - #456

Open
allison-truhlar wants to merge 8 commits into
ngviews-09-cart-uxfrom
ngviews-10-viewer-polish
Open

allison-truhlar wants to merge 8 commits into
ngviews-09-cart-uxfrom
ngviews-10-viewer-polish

Conversation

@allison-truhlar

Copy link
Copy Markdown
Collaborator

Dev-feedback branch 10 (items 10, 12, 13 of the 3.3.0a0 test-release feedback). Spec: docs/superpowers/specs/2026-09-16-ngviews-dev-feedback-design.md.

What changed

  • Item 10: the owner can rename a View from inside the embedded viewer. InlineNameEditor is extracted from the jobs page JobTitleEditor and reused; the viewer finds its own View (ownership, name, short_key) by matching read_key in the cached owner Views list. Non-owned Views show a read-only title.
  • Item 12: the embedded viewer uses a share icon with the tooltip "Copy link to share" and toasts "View link copied".
  • Item 13: Views table row actions read "Open View" and "Copy View link to share". The table share action now copies the /view/<read_key> link instead of the external Neuroglancer URL.
  • Rename invalidates only the Views list (not the ['views'] prefix), so the Neuroglancer iframe no longer reloads on rename. The per-Data-Link "Appears in N Views" lists refresh too.

Testing

Frontend suite green, prettier and eslint clean, node-check at the known baseline. Playwright suite not run for this branch.

…opies the View link

- viewQueries: useUpdateViewMutation invalidates the state query only when
  ng_state changes, so a name-only rename doesn't reload the embedded
  Neuroglancer iframe.
- ngViewsColumns: "Copy View link to share" now copies the short /view/:read_key
  link instead of the external Neuroglancer URL; removed the now-unused baseUrl
  plumbing through NGViews/useNGViewsColumns/ActionsCell.
- NeuroglancerView: reuse ViewsContext's allViewsQuery instead of calling
  useViewsQuery() directly.
- NeuroglancerView: InlineNameEditor breadcrumb className matches the read-only
  branch's inherited color.
- InlineNameEditor: Cancel button is disabled while a save is in flight.
The prior fix narrowed useUpdateViewMutation's invalidation from the broad
['views'] prefix to just the list key, which stopped covering
viewQueryKeys.forDataLink(sharingKey). AppearsInViews and the Data Link
delete dialog's dependentViewsQuery read view.name from that cache, so a
rename left them showing the stale name. Add forDataLinkAll() and
unconditionally invalidate it alongside the list key; the state-key
invalidation stays conditional on ng_state changing.
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