#171

Button to see all / show more contributors

Opennotkainoaopened 6mo ago

On github if there are more contributors than can fit, it has a button like +23 contributors. And if you click it, it sends you to https://github.com/pingdotgg/t3code/graphs/contributors. That would be nice here

Activity

1
tembo[bot]6mo ago

The repo detail sidebar already shows a "+ N more" line when the contributor list is truncated, but it is plain text right now, not a link. You can find it in apps/dashboard/src/components/repo/repo-sidebar.tsx inside ContributorsSection (the data.totalCount > data.contributors.length branch).

repo.owner and repo.name on RepoOverview are enough to build the same destination GitHub uses: https://github.com/{owner}/{repo}/graphs/contributors (e.g. what you linked for t3code).

On the data side, getRepoContributors calls repos.listContributors with per_page: 30 and derives totalCount from the API Link header, so the overflow row appears when there are more than 30 contributors. Wrapping the "+ N more" text in a normal anchor with target="_blank" and rel="noopener noreferrer" would match how other parts of the app link out to github.com (see e.g. profile follow links in _protected/$owner/index.tsx).

If you only want a single affordance, turning that span into the button/link is the minimal change; loading more avatars in-app would be a larger follow-up.