Skip to content

OncoPrint: each track's ⋮ button opens its menu, shown while the figure is hovered (ONC-LY-2) - #499

Open
alisman wants to merge 1 commit into
masterfrom
session/onc-track-menu-button
Open

alisman wants to merge 1 commit into
masterfrom
session/onc-track-menu-button

Conversation

@alisman

@alisman alisman commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Each OncoPrint track now has a ⋮ button that opens its menu, as in the portal (ONC-LY-2, the rest of it).

The portal puts a menu-dots button on every track, between the label and the track info (oncoprintjs oncoprinttrackoptionsview.ts renderTrackOptions 355-400). The buttons are hidden until the oncoprint is hovered (src/globalStyles/oncoprintStyles.scss 1-20: opacity 0, then 1 under :hover). A click toggles the track's menu (showTrackMenu / hideTrackMenu 128-145). Ours opened the menu only from a click on the label.

  • The button. Each row has an HTML button labelled "Track options: ", over the gutter.
    • It sits left of the row's %, or against the gutter's edge when the row has none (app/_oncoprint/canvas.ts menuButtonX, GEOM.menuW 14 px).
    • A click opens the same track menu under the button; a second click closes it.
  • When it shows. Hidden at rest; shown while the figure is hovered, while the button has keyboard focus, or while its menu is open (app/globals.css .onco-trackbtn).
  • Room for it. On screen, a row's OQL line now stops before the button (draw's menuButtons). An export draws no buttons and keeps the full width.
  • A click on the label still opens the menu, as before.

Spec IDs

Covered: ONC-LY-2 (with #480's label cut).

Ours alone: a click on the label opens the menu too.

Verification

  • Unit tests: test/oncoprint-track-button.test.ts B1-B3, from the legacy sources above.
  • Suites: npm test 7173 pass, 0 fail. Lint is clean.
  • e2e: the one e2e check that hovers the gutter does so at x = 40. The buttons start at x = 82 or later, so they don't block it.
  • Browser (dev server, coadread_tcga_pan_can_atlas_2018 KRAS TP53):
    • Five buttons: three on the Profiled rows at the gutter's edge, and KRAS and TP53 left of "37% / 37%" and "52% / 53%".
    • Opacity is 0 at rest and 1 when the figure is hovered.
    • KRAS's button opens KRAS's menu under it (Move up, Move down, Remove track, Sort a-Z, …). A second click closes it.
    • No console errors.
  • Planted bugs: scripts/mutants/oncoprint/track-menu-button.ts has 2 (the button over the %; the OQL line running under the button). Each is caught by hand, and all 748 sites are found once.

Tracker

PORTAL-PARITY, under Results → OncoPrint, the default view, replace the line as #480 and #485 leave it,

- [ ] Layout and legend: no ⋮ button (ours: click the label); the Profiled rows named by alteration type ("Profiled for copy number alterations"; the portal's "Profiled in" + the profile's name) (ONC-LY-2, ONC-LY-3) ([01-oncoprint](legacy-spec/parity/01-oncoprint.md))

with

- [x] Each track's ⋮ button, shown while the figure is hovered, opens its menu, as the portal's (a click on the label still does too) (ONC-LY-2) (#499)
- [ ] Layout and legend: the Profiled rows named by alteration type ("Profiled for copy number alterations"; the portal's "Profiled in" + the profile's name) (ONC-LY-3) ([01-oncoprint](legacy-spec/parity/01-oncoprint.md))

Scorecard 01-oncoprint.md row:

| ONC-LY-2 | ✅ | B | label | ⋮ | info | cells: labels cut as the portal's (#480); each track's ⋮, shown while the figure is hovered, opens its menu (#499) |

Preview

Results → OncoPrint: hover the figure; each row shows ⋮ in the gutter, and clicking one opens that row's menu.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Q3ezTZqTUJJDrEaiCKckHz


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

…re is hovered (ONC-LY-2)

The portal gives every track a menu-dots button between its label and its info
(oncoprintjs oncoprinttrackoptionsview renderTrackOptions), hidden until the oncoprint is
hovered (oncoprintStyles.scss: opacity 0, 1 under :hover); a click toggles the track's
menu. Ours opened the menu only from a click on the label.

Each row now has an HTML ⋮ button (aria-label "Track options: <name>") over the gutter,
left of the row's % or of the gutter's edge (canvas.ts menuButtonX, GEOM.menuW 14). It
opens the same track menu under itself and closes it on a second click; hidden at rest,
shown while the figure is hovered, the button focused or its menu open. On screen the OQL
line stops before it (draw's menuButtons); an export draws no buttons and keeps the room.
A click on the label still opens the menu.

Tests: test/oncoprint-track-button.test.ts B1-B3 from the legacy sources. Planted bugs:
scripts/mutants/oncoprint/track-menu-button.ts (2), each caught by hand. npm test 7173/0,
lint clean. Browser (coadread KRAS TP53): five buttons, hidden at rest, shown on hover;
KRAS's opens KRAS's menu under it, a second click closes it; no console errors.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Q3ezTZqTUJJDrEaiCKckHz
@vercel

vercel Bot commented Nov 19, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
cbiolab-genie Ready Ready Preview Nov 19, 2026 10:42pm UTC
cbiolab-new Ready Ready Preview Nov 19, 2026 10:42pm UTC
cohort-lab Ready Ready Preview Nov 19, 2026 10:42pm UTC

Request Review

This branch was successfully deployed

1 active deployment
Preview – cohort-lab — 538834c2 Deployed Nov 19, 2026 by vercel[bot]
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