Disable deferred org tabs
- SHA
30664c29d7c162d6a152a0e53930df00ffba18cf- Parents
-
d882795 - Tree
334f971
30664c2
30664c29d7c162d6a152a0e53930df00ffba18cfd882795
334f971| Status | File | + | - |
|---|---|---|---|
| M |
docs/internal/orgs.md
|
35 | 15 |
| M |
internal/web/static/css/shithub.css
|
13 | 0 |
| M |
internal/web/templates/orgs/profile.html
|
8 | 9 |
docs/internal/orgs.mdmodified@@ -32,6 +32,35 @@ POST /invitations/{token}/accept | ||
| 32 | 32 | POST /invitations/{token}/decline |
| 33 | 33 | ``` |
| 34 | 34 | |
| 35 | +## Organization profile | |
| 36 | + | |
| 37 | +`GET /{slug}` renders a GitHub-style organization overview when | |
| 38 | +`principals.Resolve` returns `kind='org'`. | |
| 39 | + | |
| 40 | +The overview data is built in `internal/web/handlers/profile`: | |
| 41 | + | |
| 42 | +* org identity header with slug, display name, description, location, | |
| 43 | + website, avatar fallback, and owner/member view state. | |
| 44 | +* org underline nav with Overview active, repository and member counts, | |
| 45 | + links to the shipped people/teams surfaces, and disabled parity tabs | |
| 46 | + for deferred GitHub org sections. | |
| 47 | +* pinned repo cards derived from the viewer-visible org repos, sorted | |
| 48 | + by stars and recent update time until a first-class pin table ships. | |
| 49 | +* recent visible repositories, sorted by `updated_at`, with visibility | |
| 50 | + badges, language, license, star/fork counts, topics, and update time. | |
| 51 | +* right rail aggregates for people, top primary languages, and most | |
| 52 | + used topics. | |
| 53 | + | |
| 54 | +Repo visibility is filtered through `policy.IsVisibleTo` using an actor | |
| 55 | +constructed from `middleware.CurrentUser`, including suspension, | |
| 56 | +site-admin, and impersonation write-mode fields. Anonymous viewers only | |
| 57 | +see public repositories; members and owners see whatever the policy | |
| 58 | +layer grants them. | |
| 59 | + | |
| 60 | +There is no dedicated `/orgs/{org}/repositories` page yet. The Overview | |
| 61 | +nav's Repositories item anchors to the homepage repository list until a | |
| 62 | +full org repositories tab lands. | |
| 63 | + | |
| 35 | 64 | `/{slug}` resolution flow inside `internal/web/handlers/profile/profile.go`: |
| 36 | 65 | |
| 37 | 66 | 1. Reserved-name check (defense in depth — chi already matches static |
@@ -43,8 +72,8 @@ POST /invitations/{token}/decline | ||
| 43 | 72 | |
| 44 | 73 | ## Member roles |
| 45 | 74 | |
| 46 | -* `owner` → implicit `admin` on every org-owned repo (policy hook | |
| 47 | - forthcoming). | |
| 75 | +* `owner` → implicit `admin` on every org-owned repo through | |
| 76 | + `policy.Can`. | |
| 48 | 77 | * `member` → org-membership badge; no implicit access to private repos. |
| 49 | 78 | Repo-level access is granted via direct collaboration (S15) or |
| 50 | 79 | teams (S31). |
@@ -88,19 +117,10 @@ old slug for 301s during the rename cooldown. | ||
| 88 | 117 | (each one gets a regenerated model). Org renames aren't in the |
| 89 | 118 | S30 DoD; deferred to a follow-up sprint that owns the rename |
| 90 | 119 | refactor end to end. |
| 91 | -* **Owner-implicit-admin in policy.Can**. The `org_members.role` | |
| 92 | - shape is in place; wiring it into `policy.Can` so org owners | |
| 93 | - automatically get `admin` on org-owned repos lands when the | |
| 94 | - policy refactor next touches the repo-permission resolver. | |
| 95 | -* **Repo creation owner picker**. Repo create form still defaults | |
| 96 | - to user-owner; extending the picker to list orgs the viewer is a | |
| 97 | - member of (and honoring `allow_member_repo_create`) is one | |
| 98 | - follow-up handler change. | |
| 99 | -* **Org-level audit log surface**, **suspension UI**, **soft-delete | |
| 100 | - + grace + `org:hard_delete` worker**, **org settings page**, | |
| 101 | - **avatar upload**, **email notifications for invite / role-change | |
| 102 | - / remove**. Schema columns are present; UI + worker land in | |
| 103 | - follow-ups. | |
| 120 | +* **Org-level audit log surface**, **suspension UI**, **org settings | |
| 121 | + page**, **avatar upload**, **email notifications for role-change / | |
| 122 | + remove / suspension / deletion**. Schema columns are present; UI and | |
| 123 | + notification fan-out land in follow-ups. | |
| 104 | 124 | * **Org renaming via `principal_redirects`** — depends on the |
| 105 | 125 | rename refactor. |
| 106 | 126 | * **Daily digest / billing / SAML** — post-MVP per spec. |
internal/web/static/css/shithub.cssmodified@@ -215,6 +215,10 @@ code { | ||
| 215 | 215 | border: 1px solid transparent; |
| 216 | 216 | cursor: pointer; |
| 217 | 217 | } |
| 218 | +.shithub-button:disabled { | |
| 219 | + cursor: default; | |
| 220 | + opacity: 0.65; | |
| 221 | +} | |
| 218 | 222 | .shithub-button-small { |
| 219 | 223 | padding: 0.25rem 0.7rem; |
| 220 | 224 | font-size: 0.75rem; |
@@ -1243,6 +1247,14 @@ code { | ||
| 1243 | 1247 | border-bottom-color: #fd8c73; |
| 1244 | 1248 | font-weight: 600; |
| 1245 | 1249 | } |
| 1250 | +.shithub-org-nav-item.is-disabled { | |
| 1251 | + color: var(--fg-muted); | |
| 1252 | + cursor: default; | |
| 1253 | +} | |
| 1254 | +.shithub-org-nav-item.is-disabled:hover { | |
| 1255 | + background: transparent; | |
| 1256 | + border-radius: 0; | |
| 1257 | +} | |
| 1246 | 1258 | .shithub-org-layout { |
| 1247 | 1259 | display: grid; |
| 1248 | 1260 | grid-template-columns: minmax(0, 2fr) minmax(260px, 0.72fr); |
@@ -1452,6 +1464,7 @@ code { | ||
| 1452 | 1464 | .shithub-org-viewas { |
| 1453 | 1465 | width: 100%; |
| 1454 | 1466 | justify-content: center; |
| 1467 | + cursor: default; | |
| 1455 | 1468 | } |
| 1456 | 1469 | .shithub-org-people-strip { |
| 1457 | 1470 | display: flex; |
internal/web/templates/orgs/profile.htmlmodified@@ -13,7 +13,7 @@ | ||
| 13 | 13 | </ul> |
| 14 | 14 | </div> |
| 15 | 15 | <div class="shithub-org-hero-actions"> |
| 16 | - {{ if .IsOwner }}<a href="/{{ .Org.Slug }}/settings/profile" class="shithub-button">Settings</a>{{ else }}<button type="button" class="shithub-button">Follow</button>{{ end }} | |
| 16 | + {{ if .IsOwner }}<button type="button" class="shithub-button" disabled>Settings</button>{{ else }}<button type="button" class="shithub-button" disabled>Follow</button>{{ end }} | |
| 17 | 17 | </div> |
| 18 | 18 | </div> |
| 19 | 19 | </header> |
@@ -21,13 +21,13 @@ | ||
| 21 | 21 | <nav class="shithub-org-nav" aria-label="Organization"> |
| 22 | 22 | <a href="/{{ .Org.Slug }}" class="shithub-org-nav-item is-active">{{ octicon "home" }} Overview</a> |
| 23 | 23 | <a href="#org-repositories" class="shithub-org-nav-item">{{ octicon "repo" }} Repositories <span class="shithub-tab-count">{{ .RepoCount }}</span></a> |
| 24 | - <a href="/{{ .Org.Slug }}/projects" class="shithub-org-nav-item">{{ octicon "table" }} Projects</a> | |
| 25 | - <a href="/{{ .Org.Slug }}/packages" class="shithub-org-nav-item">{{ octicon "package" }} Packages</a> | |
| 24 | + <span class="shithub-org-nav-item is-disabled" aria-disabled="true">{{ octicon "table" }} Projects</span> | |
| 25 | + <span class="shithub-org-nav-item is-disabled" aria-disabled="true">{{ octicon "package" }} Packages</span> | |
| 26 | 26 | <a href="/{{ .Org.Slug }}/teams" class="shithub-org-nav-item">{{ octicon "people" }} Teams</a> |
| 27 | 27 | <a href="/{{ .Org.Slug }}/people" class="shithub-org-nav-item">{{ octicon "person" }} People <span class="shithub-tab-count">{{ .MemberCount }}</span></a> |
| 28 | - <a href="/{{ .Org.Slug }}/security" class="shithub-org-nav-item">{{ octicon "shield-check" }} Security and quality</a> | |
| 29 | - <a href="/{{ .Org.Slug }}/insights" class="shithub-org-nav-item">{{ octicon "pulse" }} Insights</a> | |
| 30 | - {{ if .IsOwner }}<a href="/{{ .Org.Slug }}/settings/profile" class="shithub-org-nav-item">{{ octicon "gear" }} Settings</a>{{ end }} | |
| 28 | + <span class="shithub-org-nav-item is-disabled" aria-disabled="true">{{ octicon "shield-check" }} Security and quality</span> | |
| 29 | + <span class="shithub-org-nav-item is-disabled" aria-disabled="true">{{ octicon "pulse" }} Insights</span> | |
| 30 | + {{ if .IsOwner }}<span class="shithub-org-nav-item is-disabled" aria-disabled="true">{{ octicon "gear" }} Settings</span>{{ end }} | |
| 31 | 31 | </nav> |
| 32 | 32 | |
| 33 | 33 | {{ if .Org.SuspendedAt.Valid }} |
@@ -40,7 +40,7 @@ | ||
| 40 | 40 | <section class="shithub-org-pinned" aria-labelledby="org-pinned-heading"> |
| 41 | 41 | <div class="shithub-org-section-head"> |
| 42 | 42 | <h2 id="org-pinned-heading">Pinned</h2> |
| 43 | - {{ if .IsOwner }}<a href="/{{ .Org.Slug }}/settings/profile">Customize pins</a>{{ end }} | |
| 43 | + {{ if .IsOwner }}<span class="shithub-muted">Customize pins</span>{{ end }} | |
| 44 | 44 | </div> |
| 45 | 45 | <ol class="shithub-org-pinned-grid"> |
| 46 | 46 | {{ range .PinnedRepos }} |
@@ -125,14 +125,13 @@ | ||
| 125 | 125 | |
| 126 | 126 | <aside class="shithub-org-sidebar" aria-label="Organization sidebar"> |
| 127 | 127 | <section class="shithub-org-sidebox"> |
| 128 | - <button type="button" class="shithub-button shithub-org-viewas">{{ octicon "eye" }} View as: {{ .ViewAs }}</button> | |
| 128 | + <span class="shithub-button shithub-org-viewas" aria-label="View mode">{{ octicon "eye" }} View as: {{ .ViewAs }}</span> | |
| 129 | 129 | <p>You are viewing the public profile, README, and visible repositories for this organization.</p> |
| 130 | 130 | </section> |
| 131 | 131 | |
| 132 | 132 | <section class="shithub-org-sidebox"> |
| 133 | 133 | <h2>Discussions</h2> |
| 134 | 134 | <p>Set up discussions to engage with your community.</p> |
| 135 | - {{ if .IsOwner }}<a href="/{{ .Org.Slug }}/settings/profile">Turn on discussions</a>{{ end }} | |
| 136 | 135 | </section> |
| 137 | 136 | |
| 138 | 137 | <section class="shithub-org-sidebox"> |