Skip to content

Saved figures take their view's shape; drag and wheel pan pileup (0.16.9) - #22

Merged
YPARK merged 4 commits into
mainfrom
figure-size
Oct 13, 2026
Merged

YPARK merged 4 commits into
mainfrom
figure-size

Conversation

@YPARK

@YPARK YPARK commented Oct 13, 2026 •

Copy link
Copy Markdown
Contributor

What changes

  • Saved figures keep the view's shape. A figure saved from pileup, metagene or pwm is sized from the area its view takes on screen, 6 × 12 points per terminal cell (figure::page), so it keeps the view's aspect ratio and its 8–12-point text sits about as large against the plots as the terminal's text does. In a stack each gene keeps its pane's shape, so side by side and grid saves look as they do on screen. (A 160 × 45 terminal with two genes side by side saves as 960 × 516 pt.) Before a view is drawn, the old fixed sizes apply. qc's figures are unchanged: they are also written in batch, with no screen to follow.
  • Mouse panning in pileup. Press on the bars, move, and let go: the window pans as if grabbed. A release where it was pressed is a click (the cursor moves there). The wheel, or a sideways trackpad swipe, pans a tenth of the view per notch. In a stack, on the gene under the pointer.
    • The terminal reports presses, releases and the wheel only (data-beans asks for mode 1000), so a drag pans when let go rather than live.

Review fixes

  • A drag or wheel notch pans exactly as far as the pointer (the window's span per column, not a rounded-up bar), and a notch at the end of the span redraws nothing.
  • Only a press on the plots' bars grabs (not the header, genes row or footer); any mouse button clicks, as in 0.16.8; a press outside every gene of a stack drops a grab whose release was lost.
  • A saved logo keeps its letters 8–40 pt wide whatever the terminal width.
  • figure::page takes each view's minimum; figure::svg_size is shared by tiling and the tests; one bar-at-column test and one plot count in pileup.

Checks

  • cargo test: all pass but pipeline::tui::tests::a_folder_with_files_is_refused_as_the_output, which fails only on this machine (it passes in CI).
  • cargo clippy --all-targets -D warnings is clean, with and without --features hdf5.
  • cargo fmt is applied.

YPARK added 4 commits October 13, 2026 13:09
…6.9)

- A figure saved from pileup (and each gene of a stack), metagene or pwm is
  sized from the area its view takes on screen, 6 x 12 points a cell
  (figure::page), so it keeps the view's aspect and its text sits about as
  large against the plots as the terminal's does.
- In pileup, a press on the bars and a release elsewhere pans the window as
  if grabbed (a release in place is a click); the wheel and sideways swipes
  pan a tenth of the view a notch. In a stack, on the gene under the pointer.
- A drag or wheel notch pans by the window's span a column, as far as the
  pointer, not the rounded-up bases of a bar; a notch at an end of the
  span changes nothing and redraws nothing.
- Only a press on the plots' bars grabs (not the header, genes or footer);
  any button clicks, as before; a press outside every gene of a stack lets
  go of a grab whose release was lost.
- A saved logo keeps its letters 8 to 40 points wide whatever the terminal.
- figure::page takes each view's minimum size; figure::svg_size reads a
  figure's size for tiling and tests alike.
…without let_go

- PileupView::bar_at serves click_at and over_bars alike; plot_count
  replaces three copies of the plots-not-genes count.
- A press outside every gene of a stack goes to the one with the keys,
  whose own press handling lets go of a grab; let_go is gone.
- pwm's fallback page uses the same margins.
@YPARK
YPARK merged commit 06d3e50 into main Oct 13, 2026
6 checks passed
@YPARK
YPARK deleted the figure-size branch October 18, 2026 18:08
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