Repository navigation
feat: add settings to zoom, pick how dates read and whether pull rebases - #61
Merged
Merged
Conversation
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
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_naturallycovers 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 warningsandcargo test --workspacepassIt 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)