Skip to content

[BI-3101] Keep table headers and horizontal scrollbars on screen - #504

Open
syarnes-ufl wants to merge 3 commits into
developfrom
feature/BI-3101
Open

syarnes-ufl wants to merge 3 commits into
developfrom
feature/BI-3101

Conversation

@syarnes-ufl

@syarnes-ufl syarnes-ufl commented Nov 17, 2026 •

Copy link
Copy Markdown

Description

Story: BI-3101

Long tables pushed their header row and horizontal scrollbar off screen, so wide tables could only be scrolled sideways from the bottom of the page. This keeps both in view for every table.

Bounded scroll box (BoundedTableMixin)

  • Tables scroll inside a box capped to the space left in the window, with Buefy's sticky header. It's on by default; opt out with v-bind:bounded="false". MultipleErrors opts out because it already sits in a scrolling modal.
  • The box is sized so its bottom edge and the page controls fit in the window on load. When content above pushes the table too far down, the box fills the window below the DeltaBreed header instead.
  • It re-measures on window resize and on page resize (one shared ResizeObserver in LayoutUtils), for example when rows load or the experiment details collapse.
  • It scrolls back to the first row on a change of page, page size, sort or filter.
  • BaseTable / SidePanelTable get the same behavior through equivalent CSS.

Floating horizontal scrollbar (FloatingScrollbar.vue)

  • A scrollbar fixed to the bottom of the window, shown only while the box scrolls sideways and its own scrollbar is below the window. The two scrollbars stay in sync.
  • Scrollbars in the box are always visible, including on macOS, where overlay scrollbars hid them.

Result count and page controls

  • TableResultCount puts a line above each table, for example "Showing 1–200 of 2,802 observation units". It covers single results, "Showing all", and a column filter that narrows one page of server results. Each table passes its own record noun.
  • Page controls are below the table only, directly under the box.

Experiment page header

  • Manage Experiment sits on the title line.
  • The details are in a bordered Experiment details box, lined up with the dataset tabs.
  • The box's link-blue header collapses it. It has a chevron and aria-expanded, is open by default, and works from the keyboard.
  • The description runs full width. Collaborators shows "None" when empty.
  • The dataset summary is one line, with thousands separators (StringFormatters.formatCount).

Dependencies

None.

Testing

Tested in Chrome on a local stack (Beanies program, a 2,802-unit / 25,128-observation dataset).

  • Experiment dataset page:
    • The header row stays visible while scrolling the table.
    • The floating scrollbar appears when the box's own scrollbar is below the window, and scrolls the table sideways.
    • Page controls sit under the table; Next/Previous and page size return the box to its first row.
    • Collapsing the details lets the table grow; expanding shrinks it again.
  • Other tables (germplasm, ontology, lists, users, programs, locations, jobs, samples): the count line shows above and the controls below, and short tables look as before.
  • Narrow window (about 370px): the details columns stack inside the box.
  • Lint: no errors. The type check shows no new errors compared with develop. New unit tests cover TableResultRange, TableResultCount, and the bounded default and opt-out.
  • Not tested: Safari, Firefox, and the ontology import preview (SidePanelTable) path.

Checklist:

  • I have performed a self-review of my own code
  • I have tested my code and ensured it meets the acceptance criteria of the story
  • I have commented my code, particularly in hard-to-understand areas
  • I have either updated the source of truth or arranged for update with product owner if needed https://breedinginsight.atlassian.net/wiki/spaces/BI/pages/1559953409/Source+of+Truth
  • I have run SiteImprove on pages impacted by changes

🤖 Generated with Claude Code

syarnes-ufl and others added 3 commits November 16, 2026 08:46
Tables in ExpandableTable, SidePanelTableBuefy and SidePanelTable (BaseTable)
now scroll inside a box capped to the space left in the window
(BoundedTableMixin), with the header pinned below the main header. Opt out
with :bounded="false", as the MultipleErrors modal does.

- A result count above each table, e.g. "Showing 1–200 of 2,802 observation
  units" or "Showing all ...".
- The box returns to its first row on page, page size, sort or filter change.
- A floating horizontal scrollbar at the bottom of the window while the
  box's own is out of view, and scrollbars that stay drawn on macOS.
- Page controls pin to the bottom of the window while the box is on screen
  but they are below it, with the same 12px gap under the scrollbar in
  either place.

The experiment page's description and fields move into a collapsible
"Experiment details" box, with Manage Experiment beside the title, and the
dataset summary fits on one line with thousands separators.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Give the box the same 2em indent as the tabs and .tab-content below it, so
the box, tabs, dataset summary and table share one left edge.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Result count: hide while loading and when a server page has no rows yet,
  say how many rows match on the page when a column filter narrows one page
  of server results, and keep the range within the filtered rows.
- Older SidePanelTable/BaseTable path: show the result count and return to
  the first row when a column is sorted.
- Page controls stay directly under the box (no pinning to the bottom of the
  window); the floating horizontal scrollbar stays.
- Re-measure on window and page resize through one shared page observer
  instead of on every re-render; shared LayoutUtils for frame throttling and
  ResizeObserver.
- Guard the Buefy table ref and its internal state.
- StringFormatters.formatCount shared by the result count and dataset summary.
- Unit tests for TableResultRange, TableResultCount and the bounded default
  and opt-out.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant