Skip to content

Notebooks/REST/Resource Browser: UI polish and perf#87

Merged
Panthevm merged 4 commits into
masterfrom
notebooks-vd-sqlquery-cells
May 22, 2026
Merged

Notebooks/REST/Resource Browser: UI polish and perf#87
Panthevm merged 4 commits into
masterfrom
notebooks-vd-sqlquery-cells

Conversation

@Panthevm
Copy link
Copy Markdown
Collaborator

Summary

  • Notebook editor: always-visible Send/Run buttons; cell headers get icons (REST/SQL/ViewDefinition/SQLQuery/Markdown); REST cell drops Raw/Params/Headers tabs (always raw) and ships with Content-Type: application/json + Accept: application/json; Markdown cell drops Edit/Preview tabs; delete button moves to the right with neutral gray; header gains a Preview toggle that opens a resizable read-only pane mirroring ResourceEditor split.
  • Multi-result panel (notebooks SQL cell, db-console, ViewDefinition): replaces the vertical resizable stack with browser-style tabs (Tabs variant="browser" + TabsBrowserList) — per-tab row count, error indicator, dropdown picker with scroll-into-view.
  • Resource Browser (/u/resource): virtualized list, React.memo(ItemCard) + stable callbacks, local-input + useDeferredValue + 200 ms debounced URL sync (search input no longer blocks on Fuse over hundreds of items), single blue chip style, &abstract=false added to the StructureDefinition search.
  • REST console: instant left sidebar open/close (drops the 200 ms transition-[flex-grow] animation).
  • Notebooks index: React.memo(NotebookRow), useCallback(addTag), virtualized list.
  • SDK bump: @health-samurai/react-components carries the trackpad horizontal-wheel scroll fix used by the SQL cell result tabs.

Test plan

  • Open a notebook with REST/SQL/ViewDefinition/SQLQuery/Markdown cells — verify icons, no hover-gated buttons, Send/Run text stays constant, delete button on the right.
  • Create a REST cell — default body has Content-Type/Accept JSON headers; no Raw/Params/Headers tabs.
  • Markdown cell — no Edit/Preview tabs, always editable.
  • Click Preview toggle in notebook header — split pane appears, Save/Delete on the left, "Preview" + X close on the right; close from X or toggle off.
  • Run a SQL cell with 5+ queries — result tabs are browser-style; row count or error indicator shown; dropdown picker scrolls the chosen tab into view; mouse-wheel and trackpad horizontal swipes scroll the tab strip without bouncing back.
  • /u/resource: type in search — input stays responsive; chips render in blue; result list is virtualized; URL updates ~200 ms after last keystroke.
  • /u/rest: toggle left sidebar — opens/closes instantly without animation.
  • /u/notebooks: scrolling and focus navigation works the same as before with virtualization.

Panthevm added 4 commits May 22, 2026 15:36
Notebook editor:
- Cells: always-visible Send/Run buttons (no hover gating).
- REST/SQL/ViewDefinition/SQLQuery/Markdown cell headers get icons; REST
  cell drops Raw/Params/Headers tabs (always raw); Markdown cell drops
  Edit/Preview tabs (always edit).
- Default REST snippet includes Content-Type/Accept JSON headers.
- Cell delete button moves to the right, neutral gray.
- Header gets a Preview toggle that opens a resizable read-only pane,
  mirroring ResourceEditor's split (Save/Delete left, Preview/X right).

Multi-result panel (notebooks SQL cell, db-console, ViewDefinition):
- Vertical resizable stack replaced with browser-style tabs
  (HSComp.Tabs variant="browser" + TabsBrowserList).
- Per-tab indicators: row count for success, AlertCircle + "error" for
  failure; dropdown picker for overflow with scroll-to-tab on select.

Resource Browser (/u/resource):
- Virtualized list via @tanstack/react-virtual.
- React.memo(ItemCard) + stable useCallback handlers — focus changes
  re-render only the previously/newly focused row.
- Local input state + useDeferredValue + 200 ms debounced URL sync so
  typing is not blocked by Fuse search on hundreds of items.
- Chips collapse to a single blue style.
- StructureDefinition search adds &abstract=false.

REST console:
- Drop 200 ms transition-[flex-grow] animation when toggling the left
  sidebar; expand/collapse is instant.

Notebooks index:
- React.memo(NotebookRow), useCallback(addTag), virtualized list.

Bumps @health-samurai/react-components submodule with the trackpad
horizontal-wheel scroll fix used by the SQL cell result tabs.
Bumps @health-samurai/react-components so REST console and SQL result
panel both get a non-rounded dropdown trigger with a left border.
Drops the now-redundant local CSS overrides in result-content.
@Panthevm Panthevm merged commit 62722c3 into master May 22, 2026
4 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