Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.25.0
2.25.1
17 changes: 17 additions & 0 deletions log/changelog-v2.25.1.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# v2.25.1: The two-page spread reads ragged-right again

To-do app (`todo/app`) only. The web page, the TUI, the server and `todo.md` are unchanged.

## Problem

On a wide window (960 points or more) a decision opens as a two-page spread, built from egui columns. egui lays each column out justified, and a wrapped label in a justified layout is fully justified: word gaps stretched to the page edge, and a line followed by a long unbreakable token was spread letter by letter (e.g. "원 문 유 지 · 별 도 U T F - 8 서 명 경 로"). The single page on a narrow window was not affected.

## Changes

- **Pages are not justified.** Each page of the spread lays its content out top-down and left-aligned, as the single page does, so text is ragged-right. The question box, the agent's pick box and the answer fields still fill the page; the gap and the fold between the pages and the heading row are unchanged.
- **Buttons as on the single page.** The justified columns also stretched every button that sat directly on a page to the page width (choices stacked over what they do, approve, fix). They now take their label's width, as on the single page.
- The list tabs are unchanged: their one-line rows are truncated, not wrapped, and the one-column and two-column lists are laid out the same way.

## After updating

Rebuild the app: run `todo/app/install-macos.sh` again (macOS), or `cargo build --release` in `todo/app`.
17 changes: 12 additions & 5 deletions todo/app/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,18 @@ impl App {
let [left, right] = pages else { return };
left.spacing_mut().item_spacing.x = spacing;
right.spacing_mut().item_spacing.x = spacing;
heading(left, p, dark, lang, item);
self.details(left, ctx, p, item, busy, artifact, Part::Read);
right.label(RichText::new(t(lang, "page.answer")).color(p.muted).size(12.0));
right.add_space(4.0);
self.details(right, ctx, p, item, busy, artifact, Part::Act);
// Columns are justified, which stretches every wrapped line edge to edge (letter by letter before a long
// token); a page reads ragged-right like the single page, and its widgets keep the single page's widths.
let page = Layout::top_down(Align::LEFT);
left.with_layout(page, |left| {
heading(left, p, dark, lang, item);
self.details(left, ctx, p, item, busy, artifact, Part::Read);
});
right.with_layout(page, |right| {
right.label(RichText::new(t(lang, "page.answer")).color(p.muted).size(12.0));
right.add_space(4.0);
self.details(right, ctx, p, item, busy, artifact, Part::Act);
});
});
// The fold between the two pages.
let rect = ui.min_rect();
Expand Down
Loading