Skip to content

EXC-2110 Open a shield's code owner details in a dialog - #75

Merged
macintacos merged 7 commits into
EXC-2109/show-a-folders-code-owners-from-a-sidebar-shieldfrom
EXC-2110/open-a-shields-code-owner-details-in-a-modal
Oct 29, 2026
Merged

macintacos merged 7 commits into
EXC-2109/show-a-folders-code-owners-from-a-sidebar-shieldfrom
EXC-2110/open-a-shields-code-owner-details-in-a-modal

Conversation

@macintacos

@macintacos macintacos commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Part of: EXC-2110

Change Kind: new feature

What changed

Clicking a code-owner shield now opens a code owner details dialog. That covers a file or folder shield in the Files changed sidebar, and a reviewer's shield in the Conversation tab's Reviewers list, GitHub's or gh-prism's own. The dialog repeats what the shield's hover popup lists, then shows each owning team's first 15 members, linked, and a "See all N members" link to the team's page when it has more; a team GitHub hides from you, or one with no members, says so instead. Each hover popup now ends in a subdued "Click the shield for details" footer that stays put while a long list scrolls. A sidebar shield's click no longer pins its popover open: hover and focus still open the popover, and the click opens the dialog instead.

What to test

  • On sandbox PR #1's Files changed, hover web/app.ts's shield and api/'s: each popover ends in the hint. Click each: a modal dialog lists the owners (or the folder's files) and excerpts @excessive-dev/frontend with @macintacos and @excessive-dev/platform as "This team has no members." Escape returns focus to the row.
  • On sandbox PR #3's Files changed, hover api / modules' shield and scroll its 50-file list: the hint stays at the bottom, flush, with nothing of the list showing under it.
  • On sandbox PR #1's Conversation, hover excessive-dev/frontend's shield in Reviewers: the card ends in the hint. Click it: the dialog, headed @excessive-dev/frontend, lists the team's two files and @macintacos, and Escape returns focus to the shield.

Reviewer hand checks

No command can run these.

  1. On a work PR whose Reviewers list is GitHub's React overview, click a reviewer's code-owner IconButton. The details dialog opens, and GitHub's own button does nothing else alongside it. That list has never been observed live from the run's account; its hooks come from GitHub's bundle and a fixture.
  2. As an organization member on a work PR, open the dialog of a team with more than 15 members. It lists 15, and the "See all N members" link opens the team's page.
  3. Judge the dialog and the hover hint in light and dark: the screenshots below are the run's.

What the live check couldn't show

  • A hidden team's members. src: make crypto backend checks explicit nodejs/node#67056 (and #67083, #66944) show this account no code-owner shield today, GitHub's or gh-prism's, so the "GitHub doesn't show you this team's members." path is proven by the unit and Chromium cases on the repo's node fixture only.
  • The 15-member cap on a real team. The sandbox's teams have one member and none, and no larger team is visible to this account. The team-members-large.json fixture (214 members, 20 listed) proves the cap in the unit and Chromium cases.
  • Escape with the pointer still on the shield reopens the hover popover about 200 ms later. That is hover intent doing its job; with the pointer moved away, nothing reopens, and focus lands on the row.

Follow-ups this change surfaced

  • j / k move the page behind the dialog. This is the first gh-prism modal on the Files changed page, and followFileKeys (diffs/file-keys.ts) still handles j / k while it is open. The fix belongs there: skip a keydown whose target is inside an open dialog.
  • The Primer dialog shell exists twice, in classic/notice.ts and ui/owners-dialog.ts (and their sheets). A shared ui/dialog.ts would keep an accessibility or Primer fix from landing in one only.
  • followHoverIntent could expose close(), replacing the closeOwners / closeCard mirrors both callers keep.
  • A team predicate on CodeOwner (kind: "team" | "user" | "email") would replace the token.includes("/") && url checks repeated across code-owners.ts and its callers.

Screenshots

Captured by the live check with the built extension at 1400 × 900, signed in, on the code-owners sandbox. Each pair is light, then dark.

A file shield's hover popover, ending in the hint (PR #1, web/app.ts).

Light: web/app.ts's code owners popover, @excessive-dev/frontend above the hint "Click the shield for details"

Dark: the same popover and hint

A folder's details dialog (PR #1, api/): its files with their owners, then frontend's member and platform's empty team.

Light: the dialog "Code owners of files in api", listing generated/client.ts and routes.ts, then @excessive-dev/frontend with @macintacos and @excessive-dev/platform with "This team has no members."

Dark: the same dialog

A long folder list scrolled midway (PR #3, api / modules): the hint stays flush at the bottom.

Light: api/modules' 50-file popover scrolled midway, the hint fixed at its bottom edge

Dark: the same popover scrolled midway

A reviewer's files card on the Conversation tab, ending in the same hint (PR #1, excessive-dev/frontend).

Light: frontend's files card listing api/generated/client.ts and web/app.ts above the hint

Dark: the same card

That reviewer's details dialog: the card's list, then the team's member.

Light: the dialog headed @excessive-dev/frontend, "Code owner of 2 files in this pull request", the two files, then @macintacos

Dark: the same dialog

- readTeamMembers resolves the listed logins and the team's member
  count, counting the logins when GitHub gives no total
- teamMembersReader memoizes each team's read for a visit, ignoring
  case, and both visits share one reader with withMemberTeams
- owningTeams lists the teams among a set of code owners, once each
- A click, or Enter or Space, on a file or folder shield closes its
  hover popover and opens a modal dialog that repeats the popover's
  list, then excerpts each owning team's first 15 members, linking
  the team page when it has more
- The dialog says when a team has no members or GitHub hides them
- The hover popover ends in a sticky hint: "Click the shield for
  details"
- The click no longer pins the popover; focus moves to the shield's
  row and returns there when the dialog closes
- A click on a code-owner shield in a Reviewers list, GitHub's or
  gh-prism's, closes its files popup and opens the code owner
  details dialog: the popup's list, then each owning team's members
- One document click listener serves every shield, since GitHub
  replaces the classic sidebar's nodes mid-visit
- The files popup ends in the same sticky "Click the shield for
  details" hint as the sidebar's popover
- The browser's own [popover] padding still applied at the bottom,
  so a scrolled list showed a strip beneath the sticky hint, in the
  sidebar's owners popover and the reviewer's files popup alike
- A file or folder shield's click swaps its hover popover for a
  modal dialog that excerpts 15 members and links the rest; Escape
  and the backdrop close it, and focus lands on the row
- A reviewer shield's click, GitHub's or gh-prism's, opens the
  dialog with one members read, and Escape returns to the shield
- Both hover popups hint at the click, flush with their bottom
- Tests that clicked a shield for its popover now hover or focus it
- A reviewer shield's click opens only the last-clicked shield's
  dialog when the read settles after several clicks
- detailsHint builds the whole sticky footer, so its inset and
  coupling to each popup's padding live once
- owners-popover describes a shield's listing once for the popover
  and the dialog; showSections takes the visit's members reader
- withMemberTeams reuses owningTeams, so a team takes the spelling
  first seen
- Chromium proves the keyboard path: Enter opens the dialog and
  Escape returns to the row
- Docs name the reader's contracts and the dialog's copied shell
…y hold

- closeButton, latestClick, and a shield's listing read as nouns
- Tests name a team members reader teamMembers, as production does
@macintacos
macintacos added this pull request to stack #68 October 28, 2026 21:22
@macintacos
macintacos merged commit c4169a8 into trunk Oct 29, 2026
5 of 6 checks passed
@macintacos
macintacos deleted the EXC-2110/open-a-shields-code-owner-details-in-a-modal branch October 29, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant