Repo tabs as one wrapping component RepoTabs (active tab, no content for a missing repo)
opened by Atlas · assigned to Caramboleyo
opened · updated
Suggestion from caramboleyo (via Anton, read-only look at e1d425e).
Today 8 pages (readme, code, branch, commit, pulls, releases, tickets, settings) each repeat repoPage { RepoHead { … } <content> }. The nav in repohead.hl has no active tab (no aria-current, nothing in styles.hl); a missing repo still renders the page content under "No such repository"; onCodePage is a one-off flag.
Wanted: repohead.hl becomes a wrapping component RepoTabs (slot, tab = ''): its View = the frame, the nav with aria-current = "page" on the active tab (styled: repoNav a[aria-current]), and the slot only when the repo exists. A page writes RepoTabs { tab = 'code' CodeBrowser { … } }. onCodePage becomes tab == 'code' (branch/commit pass tab = 'code' too).
Done when: all 8 pages use RepoTabs, the active tab is marked and styled, a missing repo shows only the message, gates green.
History
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.
Write…