Repository navigation
Fold Projects into a Clients master-detail tab (ALI-2617) - #16
Merged
Merged
Conversation
The TUI goes from four tabs to three. The Clients tab lists each client with its rate, this month's hours and earned, its unbilled amount and a project count, beside a pane with the selected client's projects (hours and earned this month), "+ Add project", and the client's rate, start date, all-time totals and unbilled. Below 120 columns the list takes the width and → opens the pane in its place. Keys: n new client, a add project, e edit, → into projects, d delete; in the pane e and d act on the project, enter edits it or adds one on "+ Add project", and ← or esc go back. The project form and delete confirm keep their behaviour (ID stored on open, re-read on save, Client field moves a project). The client modal is 60 wide, per the board. Tabs renumber to 1-3; the keys sheet, README and landing page follow. New layout tokens: tui-modal-width-narrow and the tui-client-* columns.
Member
Author
Review round 1A fresh reviewer ran
The decided rules hold:
Being fixed:
No change: loading every entry on each Clients reload is fine at normal data sizes. |
- Count the project form's field errors in the status line. - Close the projects pane, and say so, when a reload no longer has its client, instead of showing a neighbour's projects. - Offer n new client in the pane's hotkey line; it fits at 90 columns. - Count the pane's fixed rows from the rows it draws. - Never cut an amount: money columns drop the cents, then go compact ($123k, $1.2M), to fit. - Say which forms use tui-modal-width.
Member
Author
Review round 2 (final, narrow)f3a3af1 fixed round 1's findings:
A fresh reviewer checked that commit. Its
All six claims hold, and nothing was found at P1 or P2. Not changed (P3, pre-existing):
The review stops here. |
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.
Fixes ALI-2617
What changed
The TUI goes from four tabs to three (Timers, Clients, Reports). Projects are now the detail side of Clients, drawn from the "Redesign · TUI · Clients" and "Edit client, with error" boards on the Notch design canvas.
clients -json), and a project count under each client. A client with no rate shows—for rate, earned and unbilled.nnew client,aadd project,eedit,→(orenter) into projects,ddelete. In the pane,eanddact on the project,enteredits it (or adds one on "+ Add project"), and←orescgo back.tui-wide(120) the list takes the whole width, and→opens the pane in its place.tui-modal-width-narrow). A rate that isn't a number shows "✕ Enter a number, like 95 or 95.50." under Rate, and the status line counts it.projects.go, nowprojectsPane): they keep their behaviour. Each stores the project ID when it opens and re-reads it, closing with "That project no longer exists" if it's gone.escandnkeep in the confirm, and the Client field with suggestions still moves a project to another client. New project opens with the selected client filled in and the focus on Name. Typing a client name without picking a suggestion now prefers the exact-case match.IsBusycovers the project form and confirm, soqtypes there and onlyctrl+cquits.?keys sheet (still fits at 90×32 without scrolling), the README key tables and the landing page follow.design/tokens.json:tui-modal-width-narrow,tui-client-name-min,tui-client-col-rate|hours|earned|unbilled,tui-client-pane-earned|label|gap. The usage notes forwarning,tui-wideandtui-min-widthare updated. No new colours.Testing
gofmt -l .(empty),go vet ./...,go test -count=1 ./...,go run ./design/build -check(31 contrast pairs pass).projectsPaneinprojects_test.go.internal/ui/clients_test.go);eanddfollowing the focus;loadClientsData;qtyping in the project form;akey, the modal width, rate validation,IsBusy, the reload, the keys sheet, the unbilled entry count, andein the pane.Design notes
→opens the pane in place of the list (like the Timers compact layout's details).To try live
2on real data: check the figures againstnotch clients -json, and that the "Since" date reads right.→into a client's projects, add, rename, move and delete a project, and←back.→/←.95/hr, and check the error and the "1 field needs fixing" status.