Skip to content

Add a help button to every window and Term Info query row - #1800

Merged
Robbie1977 merged 2 commits into
developmentfrom
feature/query-panel-help-icons
Sep 24, 2026
Merged

Robbie1977 merged 2 commits into
developmentfrom
feature/query-panel-help-icons

Conversation

@Robbie1977

Copy link
Copy Markdown
Contributor

Every window now carries a gold ? that opens the matching page under /docs/website-features/ in a new tab, and every row of the Term Info query panel gets one linking to that query's section of the Queries Reference.

  • components/configuration/VFBMain/helpLinks.js is the single map from feature → docs URL. Tab windows are keyed by their FlexLayout component name; the query tool by feature; Term Info rows by VFBquery query name (the Queries Reference has a {#QueryName} anchor per query) or a fixed anchor.
  • Tab headers get the button via the existing onRenderTabSet, left of the minimise icon, following the selected tab.
  • The query builder and results are geppetto-client components, so the button is injected next to their close cross by a MutationObserver — no client release needed.
  • Term Info "Query for" rows are post-processed client-side from the server-rendered HTML, so it works for both term-info processors without a uk.ac.vfb.geppetto release. Only anchors carrying data-instancepath are touched; the existing click hookup is unaffected.

Docs side: VirtualFlyBrain/VFB2 branch docs/query-help-anchors adds the anchors and the two missing pages (Template ROI Browser, Layers). Every key in the map resolves once that merges.

To test on dev: each tab header shows a ? and it opens the right page; open any neuron (e.g. DNg03_L) and check each query row has a ? on the right landing on its section; shift-click on a query label still stacks; open the query builder and results and check the ? position beside the cross (the offsets in VFBMain.less are the one thing not verified visually). Not covered yet: the Spotlight search bar and the Term Info button bar.

Each "Query for" row, graph link and Circuit Browser link in the Term
Info panel now ends with a gold "?" that opens the matching section of
the website docs in a new tab. The Queries Reference page carries one
{#QueryName} anchor per VFBquery query, so the query name already in the
row's data-instancepath is the anchor; graphs and the Circuit Browser
link to fixed anchors on their own pages.

Done client-side on the server-rendered HTML so it works for both the
VFBquery and legacy term-info processors without a uk.ac.vfb.geppetto
release. Only anchors carrying a data-instancepath are touched, so the
existing click hookup (which selects on that attribute) is unaffected.
helpLinks.js is now the single source of truth for in-app help: every
"?" in the UI resolves its docs URL there, keyed by the FlexLayout
component name for tab windows and by feature name for the rest.

- Every tab window (Term Info, 3D Viewer, Slice Viewer, Term Context,
  Circuit Browser, Template ROI Browser, Layers) gets a "?" in its
  header, left of the minimise button, linking to that tab's page under
  /docs/website-features/.
- The query builder and query results, which geppetto-client renders,
  get the same button injected next to their close cross; a
  MutationObserver re-adds it whenever those containers remount.
- The Term Info query-row links from the previous commit now go through
  the same module and share the .vfb-help style.

Template ROI Browser and Layers had no docs page; both are added in the
matching VFB2 change.
@Robbie1977
Robbie1977 merged commit 4ab2713 into development Sep 24, 2026
3 checks passed
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