Skip to content

Browse: clamp descriptions and add a dataset detail card; drop Submitted column - #201

Merged
skearnes merged 8 commits into
mainfrom
fix/browse-descriptions-and-spa-cache
Jun 25, 2026
Merged

Browse: clamp descriptions and add a dataset detail card; drop Submitted column#201
skearnes merged 8 commits into
mainfrom
fix/browse-descriptions-and-spa-cache

Conversation

@skearnes

@skearnes skearnes commented Jun 25, 2026

Copy link
Copy Markdown
Member

Browse-page description UX. (The index.html cache fix originally bundled here moved to #202.)

Description column

  • Replaced the fixed 75-character cut with a width-adaptive 3-line CSS clamp (with ellipsis). Full text stays in the DOM, so EntityTable search still matches on it.
  • Fixed grid overflow: the flexible columns use minmax(0, 1fr) (not 1fr) and cells can shrink / wrap long dataset IDs, so long content no longer pushes columns off the right edge.

Dataset detail "card" modal

  • Every description cell has an always-present expand button that opens a FloatingModal styled as a dataset card: the name (header) with the dataset ID (monospace) beneath it, then submitted date, reaction count, and the full description.
  • The modal sizes to its content (capped at 80vh) so short descriptions don't leave empty space, and the overlay means the table never reflows.

Dropped the standalone "Submitted" column

It didn't earn its width; the submission date now lives in the card. Datasets are still ordered newest-first by submission date server-side — only the visible column was removed.

Supporting change

FloatingModal gains an optional className (for per-use sizing) and its title now accepts a ReactNode (for the name + ID header). Existing string callers are unaffected.

Testing

  • tsc -b, eslint, and vite build: clean.
  • Verified visually against production data via the local dev server (clamp, overflow, card modal, ordering).

🤖 Generated with Claude Code

Greptile Summary

Replaces the hard-coded 75-character description truncation with a CSS line-clamp approach and adds a floating dataset-detail card modal accessible from every description cell; the standalone "Submitted" column is dropped in favor of showing the date inside the card.

  • FloatingModal receives two new optional props — className for per-instance sizing and title: ReactNode for richer headers — with no impact on existing callers.
  • MainBrowse extracts a new DescriptionCell component that CSS-clamps description text, keeps the full text in the DOM for EntityTable search, and conditionally renders a FloatingModal card with name, dataset ID, submission date, and reaction count.
  • Grid layout is corrected by switching flexible columns from 1fr to minmax(0, 1fr) and adding min-width: 0; overflow-wrap: anywhere to cells, preventing long dataset IDs from overflowing the table.

Confidence Score: 5/5

Safe to merge — changes are purely additive UI improvements with no data-path or API changes.

All three files touch only presentation logic: the FloatingModal API extension is backward-compatible, the DescriptionCell is a self-contained component with local state, and the CSS corrections (minmax grid columns, clamp, flex modal sizing) are straightforward. No server calls, routing, or shared state are modified.

No files require special attention.

Important Files Changed

Filename Overview
app/src/components/FloatingModal.tsx Backward-compatible API extension: title widened from string to ReactNode, optional className prop added for per-use sizing overrides; no logic changes.
app/src/views/browse/MainBrowse.tsx Removes truncateDescription helper; adds DescriptionCell component with CSS-clamped text and a FloatingModal card; drops Submitted column and brings reaction count to 4-column grid.
app/src/views/browse/MainBrowse.scss Fixes grid overflow with minmax(0, 1fr); adds -webkit-line-clamp description truncation; styles expand button, dataset-card modal (height:auto/flex overrides), and right-aligned size column.

Reviews (4): Last reviewed commit: "Apply Prettier formatting to MainBrowse" | Re-trigger Greptile

skearnes and others added 3 commits June 24, 2026 20:40
The browse table cut descriptions at a fixed 75 characters, which
truncated well before the column ran out of room. Drop the JS truncation
and clamp the description cell to three lines with a CSS ellipsis, so it
fills the available width and adapts to the layout.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
nginx served index.html with no Cache-Control, so browsers heuristically
cached it and kept loading the previous build's hashed bundle until a hard
refresh. Mark index.html no-cache (always revalidate) and the
content-hashed /assets/ immutable so new deploys are picked up on the next
navigation without serving stale assets.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
When a description is clamped, show a small expand button that opens the
full text in a floating modal. The button only appears when the text is
actually clipped (detected via ResizeObserver), and the modal overlay
means the table layout never reflows.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@skearnes skearnes changed the title Fix browse description truncation and stop caching index.html Browse description UX (clamp + expand modal) and SPA cache headers Jun 25, 2026
@skearnes skearnes changed the title Browse description UX (clamp + expand modal) and SPA cache headers Browse descriptions: clamp by width and add an expand modal Jun 25, 2026
skearnes and others added 2 commits June 24, 2026 20:54
The browse grid used `1fr` tracks, whose implicit `min-width: auto` let a
long description (or dataset ID) widen its column and push the Size and
Submitted columns off the right edge. Use `minmax(0, 1fr)` so the flexible
columns shrink to their share, let cells shrink below content width, and
wrap long unbreakable tokens.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The standalone "Submitted" column didn't earn its width, so remove it and
surface the submission date (along with the dataset ID and size) in the
description modal, which now reads as a dataset "card":

- The description cell's expand button is always shown, so the card is
  always reachable (not just when the text is clamped).
- The modal header shows the dataset name with the ID (monospace) beneath
  it; the body shows submitted date, reaction count, and full description.
- Size the modal to its content (capped at 80vh) so short descriptions
  don't leave empty space.

FloatingModal gains an optional `className` (for the content sizing) and
its `title` now accepts a ReactNode (for the name + ID header).

Datasets are still ordered newest-first by submission date server-side; only
the visible column is removed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@skearnes skearnes changed the title Browse descriptions: clamp by width and add an expand modal Browse: clamp descriptions and add a dataset detail card; drop Submitted column Jun 25, 2026
skearnes and others added 2 commits June 24, 2026 21:03
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@skearnes
skearnes merged commit 5451afb into main Jun 25, 2026
16 checks passed
@skearnes
skearnes deleted the fix/browse-descriptions-and-spa-cache branch June 25, 2026 01:12
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