Skip to content

feat: add settings to zoom, pick how dates read and whether pull rebases - #61

Merged
Lars- merged 1 commit into
mainfrom
feat/settings
Nov 22, 2026
Merged

Lars- merged 1 commit into
mainfrom
feat/settings

Conversation

@Lars-

@Lars- Lars- commented Nov 22, 2026

Copy link
Copy Markdown
Owner

What this changes

GitCraft gets a settings window: Settings at the right of the tab bar, Ctrl+, (Cmd+, on a Mac), or "Settings…" in the palette.

  • Zoom: − and + zoom the whole window in steps of 10%, Reset goes back to 100%. These are egui's own zoom, which Ctrl+Plus, Ctrl+Minus and Ctrl+0 already did; the window shows the keys in the hints.
  • Dates: "How long ago" (as before: "3 hours ago", the date after a week) or "Date and time" ("2026-11-22 11:03", in the commit's time zone). The graph, a file's history and blame make room for the longer date.
  • Pull: Merge (as before) or Rebase, for the Pull button and Ctrl+Shift+Down. The right-click menu of Pull still offers both.

The settings hold for every repository and stay for the next run. They live in egui's memory, which eframe already saves, like the zoom and the side-by-side choice of the diff; that choice now goes through the same settings::Switch. The tab bar shows on the start screen too, so Settings is always in the same place.

This is part 1 of "Settings" on the roadmap. The light theme is part 2: the colours of diffs, conflicts and code are made for a dark background and each needs a light counterpart.

How it is tested

  • the_settings_change_how_dates_read_what_pull_does_and_the_zoom: opens the settings with Ctrl+,, picks "Date and time" and the graph shows the commit's date and time instead of "just now"; picks Rebase, and Pull rebases a branch that went its own way onto origin (no merge commit); Zoom in, Zoom in, Zoom out and Reset give 110%, 120%, 110% and 100%. Then it opens them from the tab bar, picks Merge and closes them with Escape, and Pull merges again. It fails when Pull ignores the setting and when the dates do.

  • times_read_naturally covers the date and time format.

  • Tried on Linux: the window at 100% and 110%, full dates in the graph, blame and file history, Pull with rebase on a clone whose origin moved on, and all three settings still set after closing GitCraft and starting it again.

  • cargo fmt --all, cargo clippy --workspace --all-targets -- -D warnings and cargo test --workspace pass

  • It adds as little code as the change needs, and removes what it makes unnecessary

  • Nothing in it comes from GitKraken or another closed-source client (see CONTRIBUTING.md)

@Lars-
Lars- merged commit 282f7d4 into main Nov 22, 2026
7 checks passed
@Lars- Lars- mentioned this pull request Nov 22, 2026
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