Skip to content

Drop "None" from model comparison grid, make cards equal height - #258

Merged
aperson30 merged 1 commit into
BodyMaps:mainfrom
aperson30:fix/model-cards-3-only-equal-height
Sep 23, 2026
Merged

aperson30 merged 1 commit into
BodyMaps:mainfrom
aperson30:fix/model-cards-3-only-equal-height

Conversation

@aperson30

Copy link
Copy Markdown
Collaborator

Summary

  • Follow-up to Redesign model comparison cards in Apple compare-page style #257: the comparison grid was showing 4 cards including "None" (view-only, not actually a model to compare) and each card's height followed its own content length, so the row looked uneven.
  • Filters "None" out of the comparison cards only - it's still a normal option in the Model dropdown above, unaffected.
  • Grid now stretches all cards in a row to the same height (removed alignItems: "start", added height: "100%" on each card) instead of top-aligning to content height.

Test plan

  • npx vitest run src/test/modelComparisonCards.test.tsx src/test/planGating.test.tsx - 16/16 pass
  • npx vitest run (full suite) - 331/331 pass (one unrelated pre-existing flake reproduced and cleared on rerun, same test file, unrelated to this diff)
  • npx tsc -b - clean
  • Updated the comparison-cards test to assert "None" has no card (was asserting the opposite)

The grid was showing 4 columns including "None" (view-only, not a
segmentation model to compare) and letting each card's height follow
its own content, so the row looked uneven. Filters "None" out of the
comparison cards (it's still a normal dropdown option), and switches
the grid to its default stretch alignment with height: 100% on each
card so all cards in a row match the tallest one.
@aperson30
aperson30 merged commit 2b80e1a into BodyMaps:main Sep 23, 2026
8 checks passed
aperson30 added a commit that referenced this pull request Sep 23, 2026
Follow-up to #258. The comparison cards looked uneven for two reasons:
a mismatched amount of content per model (Atlas-Net only had one real
fact to draw on, so its card looked comparatively empty), and content
that genuinely differs in length (description text wraps to a
different number of lines per card) throwing every section below it
out of alignment between cards.

Fixes the content gap by pulling real, previously undocumented facts
about Atlas-Net straight from its label-mapping code
(services/auto_segmentor.py _ATLASNET_TO_VIEWER): it's built on the
same nnU-Net v2 architecture as ePAI (Dataset001_ATLASNet, 3D
fullres), maps the same 25 raw structure labels, and separately
identifies the same 3 pancreatic tumor subtypes (PDAC, cyst, PNET) -
none of that was previously surfaced anywhere in the UI.

Fixes the alignment by switching each card from independent
flex-column stacking to a 9-row CSS subgrid (icon, name, badge, desc,
button, divider, stats, divider, bullets) sharing row tracks with its
siblings via the parent grid's explicit grid-template-rows. Every
section now lines up across all three cards regardless of how many
lines its own content takes, instead of drifting or leaving dead
space when one card's content is longer or shorter than the others.
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