Improves Git's user interface

This commit is contained in:
2026-11-24 16:43:20 +01:00
parent 2887965a9e
commit 28079e80c5
6 changed files with 114 additions and 26 deletions
+9 -7
View File
@@ -69,13 +69,13 @@ From top to bottom:
- Background `#18202B`, bottom border `1px #232C39`.
- **Message textarea**: full width, auto-grows (`field-sizing: content`) from 56px up to 180px.
- Background `#101720`, no border except a `1px #232C39` bottom border, which turns `#E8913A` on focus.
- Padding `14px 16px`, Plex Mono 400, 14px / 1.6, colour `#F4F5F4`, caret `#E8913A`.
- Placeholder: `Commit message`. The field gets focus when the Git view opens.
- **Footer row**: 52px tall, padding `0 14px 0 16px`, gap 16px.
- **Gen. Commit Message** (small secondary), first on the left: 32px tall, padding `0 12px`, radius 2px, a `1px #232C39` border, the pass-on spark glyph (12px, stroke) then the label in the commit-button type, text `#BAC0C0`; hover fills `#1E2733` and turns glyph and text `#F4F5F4`. While it runs the label reads `Generating…`. Disabled (40% opacity, default cursor, no clicks) when nothing is staged or while it runs. A click sends the staged diff to the Claude CLI and puts its one-line answer in the message field (replacing the draft, lowercased like typed text) and focuses the field; a failure toasts `Couldn't generate a commit message` with the reason (`claude not found`, the CLI's first error line, `timed out`). Native build only.
- Author `Jonathan van Rij <jonathan@blijnder.nl>` in Plex Mono 12px `#828D9A`. In the real build, read this from `git config user.name` and `user.email`.
- Padding `14px 16px`, Plex Mono 400, 14px / 1.6, colour `#F4F5F4`, caret `#E8913A`, text right-aligned.
- Placeholder: `Commit message`, right-aligned. The field gets focus when the Git view opens.
- **Footer row**: 52px tall, padding `0 14px 0 16px`, gap 16px. Order: author, hint, a spacer, then Gen. Commit Message and the three commit buttons, gap 8px.
- **Gen. Commit Message** (small secondary), on the right just before Add, Stage & Commit: 32px tall, padding `0 12px`, radius 2px, a `1px #232C39` border, the pass-on spark glyph (12px, stroke) then the label in the commit-button type, text `#BAC0C0`; hover fills `#1E2733` and turns glyph and text `#F4F5F4`. While it runs the label reads `Generating…`. Disabled (40% opacity, default cursor, no clicks) when nothing is staged or while it runs. A click sends the staged diff to the Claude CLI and puts its one-line answer in the message field (replacing the draft, lowercased like typed text) and focuses the field; a failure toasts `Couldn't generate a commit message` with the reason (`claude not found`, the CLI's first error line, `timed out`). Native build only.
- Author `Jonathan van Rij <jonathan@blijnder.nl>` in Plex Mono 12px `#828D9A`, first on the left; it truncates when space runs out. In the real build, read this from `git config user.name` and `user.email`.
- Hint `⌘↵ commits` in Plex Mono 12px `#6C7783`.
- A spacer, then **three buttons** side by side, gap 8px, each radius 2px, 32px tall, padding `0 18px`, Plex Sans 600 13px:
- A spacer, then Gen. Commit Message and **three buttons** side by side, gap 8px, each radius 2px, 32px tall, padding `0 18px`, Plex Sans 600 13px:
- **Add, Stage & Commit** (secondary), on the left: the same look as Commit. Stages every unstaged path with `git add -- <paths>`, then commits without a push. An empty message stages nothing and focuses the message field. Disabled (40% opacity, default cursor, no clicks) with no changes, during a merge conflict, or while a push or pull runs.
- **Commit** (secondary): min-width 160px, label `Commit N file(s)`, or `Nothing staged` when nothing is staged. Transparent with a `1px #232C39` border and text `#BAC0C0`; hover fills `#1E2733` and turns the text `#F4F5F4`.
- **Commit and push** (primary), on the right. Ready state (≥1 staged file **and** a non-empty message): background `#E8913A`, text `#101720`, hover amber-deep `#C4741F`. Otherwise: background `#232C39`, text `#828D9A`, hover `#202834`. With files staged it stays clickable, so git's own error appears in the console.
@@ -149,7 +149,9 @@ If there are no changes at all, the area shows only: `— No changes. The workin
- Added files show everything on the right; deleted files show everything on the left.
- The prototype uses an LCS line diff (`diffOps`). In production, use `git diff` hunks (`--unified=3`), or a proper diff library, and pair `-`/`+` runs line by line.
### 5. Bottom strip — 230px, split 50/50
### 5. Bottom strip — 230px, split 50/50 (side columns from 1600px)
- **Window ≥ 1600px** (native build only): no strip. Under the top bar three full-height columns: left 480px with branches over commits (half the height each, a `1px #232C39` line between, a `1px #232C39` right border), the commit block and sections in the middle, the console right at 560px (`1px #232C39` left border). Both side columns have background `#18202B`.
- **Narrower**: the strip below, as follows.
- Background `#18202B`, top border `1px #232C39`.
- `display: grid; grid-template-columns: minmax(0,1fr) minmax(0,1fr)`. The left half has a `1px #232C39` right border.
- Native build: console and branches each stop at 820px. When at least 260px is left after them, a **commits** list fills the rest behind a `1px #232C39` left border; below that the rest stays empty. Not in the prototype.