Skip to content

Show calculation results at the ends of their lines - #5

Merged
sanjaydotpro merged 1 commit into
mainfrom
riverbank/2-inline-results
Nov 17, 2026
Merged

sanjaydotpro merged 1 commit into
mainfrom
riverbank/2-inline-results

Conversation

@sanjaydotpro

@sanjaydotpro sanjaydotpro commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Replaces the desktop results column with a pill at the end of each calculating line, as in the approved Riverbank design (HIS-8, part of HIS-6). Rebased onto main now that the redesign stack (#6, #7, #8, #9, #10 and #14) has landed.

The regenerated dark golden: results at the ends of their lines

The regenerated light golden

Results at line ends

  • Each result sits at the right-hand edge of the writing column, on the last visual row of its line, with a dotted leader from where the text stops. A new InlineResults layer draws the pills over the field, using the same measurement the field lays out with. LineMeasurer now also returns the last row of each calculating line, and only for those lines.
  • The pills match Paper's final page. An ordinary result uses resultPillBackground and resultPillText (#2B3326 and #B3C79C in dark). The line that reads the running total gets the strongest pill, totalPillBackground and totalPillText (#7D9468 and #1C1A17). That line is total or sum, or a conversion of it such as total in eur.
  • The pill text is Geist Mono 13 on a 16px line, at weight 500, or 600 for the total. Each pill has 10px of padding either side, is 26px tall and sits 12px from the leader. AppTypeScale.result is now 13 on every desktop, as in Paper; macOS was 12.5. Hover uses the theme's fillStates recipe.
  • The leader is drawn the way Paper renders it: square 1px dots, 1px apart. The colour is textTertiary at 30%, which comes out as #423E37 on the page; Paper's is #423D36.
  • When the writing runs up to the column's edge, the pill moves into the right margin rather than cover the text. It overlaps the text only when there is no margin left.
  • A drag or a mouse wheel over a pill scrolls the note.

Editing is unchanged

The pills sit beside the text field rather than inside its text, so the caret, selection, copy, paste and undo only ever see the note. Copy-on-click, the "Couldn't copy" toast, error states, unit and currency formatting, and live updates all go through the same ResultChip as before.

What goes away

  • The desktop results column goes, along with its divider, its restore handle and the column-width preference: gutter.v1, gutterWidth, resetGutterWidth, GutterDivider, ResultsRestoreHandle, and the NoteEditor callbacks and flags that fed them. Their three goldens go too.
  • The colour-by-kind code goes, so results no longer read chipNumber, chipCurrency, chipUnit, chipBoolean or chipOther. The tokens themselves stay, because the update badges in the toolbar and sidebar, the settings update row, the confetti and the voice-note speaker colours still use them. HIS-15 takes over their names and colours.
  • ⌘R still hides and shows results. Its label is now "Toggle results". "Reset panel widths" now resets only the notes list.
  • The visibility preference moves to resultsVisible.v2. Without this, someone who had folded the old column away would update to no results and no handle to bring them back, so everyone starts with the pills shown.
  • README and packaging/SUBMISSION.md no longer describe a results gutter on desktop.

Phones keep their fixed results column. The compact layout on iOS and Android passes gutterWidth and keeps its structure, and its figures now use resultPillText. Desktop windows of every size get pills, and so does a tablet wide enough for the two-pane layout, because that layout used the same desktop column.

Goldens

These were rendered on Flutter 3.47.4 (~/dev/flutter), not the pinned 3.47.2, because the crew notes say the 3.47.2 SDK on this Mac is damaged and can't run tests. On main (77e39b8), every golden re-renders byte for byte on this Mac except desktop_dark_note_pinned.png (see below), so every difference here comes from this change.

  • I regenerated the 24 goldens this change alters:
    • every desktop image with a calculating note, including the settings images, where the editor shows behind the dialog, and desktop_dark_narrow_list.png, where the page shows under the list
    • the blank note, which loses the empty column's divider
    • welcome_phone_light.png, where only colour changes: its four figures go from #667254 to resultPillText #445A2F, with no pixel moved. The dark phone images are unchanged.
  • I added desktop_dark_narrow_results.png: the 600×630 window, which keeps the Riverbank layout since Keep the Riverbank layout in narrow desktop windows #10, with results at the ends of its lines. I removed the three divider and restore-handle goldens, including Keep the Riverbank layout in narrow desktop windows #10's desktop_dark_narrow_results_divider_hover.png. Every golden passes.
  • desktop_dark_note_pinned.png calculates Today against the real clock, so it changes every day.

Verification

  • flutter analyze reports no issues. The whole suite passes on this Mac, goldens included: 2,125 tests, with 8 skipped. CI runs no tests.
  • New tests cover:
    • each pill on the right-hand end of its own line, and on the last row of a wrapped line, with the leader between them
    • the total's pill and the other pills, checked against the pill tokens
    • a pill stepping into the margin
    • result text never entering the controller (select-all copy, paste and undo, on Windows)
    • the phone column
    • hidden results leaving the writing exactly as wide
    • a drag and a wheel over a pill scrolling the note
    • the narrower panel-width reset and the v1 visibility migration
  • Before the rebase, I checked the pill and leader colours, padding, height and spacing pixel by pixel in the regenerated goldens, against Paper's @2x render of the final page. The rebase changes none of the pill code or tokens.

Open in Capy

On desktop each result is now a pill at the right-hand end of its line,
on the line's last visual row, with a dotted leader from where the
writing stops. The pills take Riverbank's result tokens, and a line that
reads the total gets the strongest one. They are drawn over the field,
never in its text, so the caret, selection, copy, paste and undo see
only the note.

The desktop results column goes, with its divider, restore handle,
width preference and the colour-by-kind chip colouring. Cmd+R still
hides and shows results, and the visibility preference moves to v2 so
nobody starts with them hidden by the old column. Phones keep their
fixed results column, its figures now in the result text colour.

Goldens this alters are regenerated on Flutter 3.47.4.
@sanjaydotpro
sanjaydotpro changed the base branch from riverbank/1-foundation to main November 17, 2026 04:03
@sanjaydotpro
sanjaydotpro force-pushed the riverbank/2-inline-results branch from aa51bcb to 1aabf46 Compare November 17, 2026 04:03
@sanjaydotpro
sanjaydotpro merged commit a41b2be into main Nov 17, 2026
4 checks passed
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