Turn the Sankey down the page and add lineage shortcuts

#4
by lvwerra HF Staff - opened
Hugging Face Biology Research org

Depth used to cost width. Every expansion added a column to the right, so following a lineage meant scrolling sideways through a widget while the page sat still, and only a few levels were ever visible at once.

Levels run down the page

Each level is now a horizontal band whose bar widths follow assembly counts, with the caption directly beneath its bar, and ribbons connect one captioned block to the next. Eukaryotes down to humans is about thirty levels and reads as one ordinary page scroll. The chart itself only scrolls sideways on screens too narrow to keep labels legible.

Two things that only showed up once it was rendered:

  • Captions have to sit below their bar, with the ribbons leaving from the bottom of the whole block. Running ribbons bar-to-bar drew every flow straight through the labels of the level it was leaving.
  • Expanding now nudges the page down only when the new level has fallen past the viewport, instead of scrolling the widget to its right edge.

Shortcuts

Ten replace the previous three: animals, mammals, humans, birds, ray-finned fish, insects, jellyfish, green plants, flowering plants and fungi. Each expands its whole lineage, so a deep one like humans doubles as a look at what a full path looks like, and jellyfish lands on Scyphozoa with Anthozoa, Hydrozoa, Cubozoa and Staurozoa beside it.

Tests

Fourteen pass. The level tests now assert that levels are evenly spaced down the page rather than across it, and a new one checks every shortcut expands its full lineage. The gloss-length test earned its keep again: the narrower label slot clips at 28 characters, and it caught two glosses that would have been truncated.

šŸ¤– Generated with Claude Code

lvwerra changed pull request status to merged

Sign up or log in to comment