Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,9 @@ unblock a PR.

### 6. Close the loop

Thank the contributor and link any follow-up work. The PR owner checks the post-merge result and
Thank the contributor and link any follow-up work. Once merged, the author appears in the
"Thank you" section of the [Contribute page](https://microsoft.github.io/scope/community/contribute/#thank-you)
and on the landing page within about an hour. The PR owner checks the post-merge result and
coordinates a fix or revert if needed.

If a contribution is not a fit, explain why and close it promptly. When a PR is waiting on the
Expand Down
34 changes: 34 additions & 0 deletions website/AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,40 @@ build:
- Motion uses the Web Animations API, with no animation library. Gate
any new motion on `prefers-reduced-motion`.

### Contributors

The landing page (an avatar wall under the open calls) and the
"Thank you" section of **Community → Contribute** (a card grid)
thank every author of a merged pull request, community and
Microsoft alike:

- The same workflow writes `contributors.jsonl` to `website-data` in
the same commit as `issues.jsonl`. It counts merged PRs whose
author is a user, not a bot (`[bot]` suffix). Team members count
too; don't filter on `authorAssociation`.
- One line per person, `{"login":"…","prs":N}`, with sorted keys and
sorted by lowercase login. No avatar URLs or timestamps; avatars come
from `https://github.com/<login>.png`, and a failed image shows the
login's initial.
- The browser sorts by merged PRs, then login. The wall shows up to
`limit` items; the last slot becomes a "+N" bubble that links to
the full grid. The grid shows `limit` cards (30 on the Contribute
page) and a "Show all N contributors" button, unless only one card
would stay hidden. Each person links to their merged PRs.
- Wall tooltips get a `--tip-shift` so they stay inside the wall (a
hidden tip on an edge avatar would otherwise make narrow pages scroll
sideways). The intro and count are hidden in the empty and error
states. Check 0, 1, a few, and more contributors than fit the width,
on desktop and mobile, when changing the layout.
- Set `PUBLIC_CONTRIBUTORS_URL` to point at another file
([`contributors.ts`](src/scripts/contributors.ts)). In
`pnpm run dev` a failed fetch falls back to
[`contributors.sample.jsonl`](src/data/contributors.sample.jsonl),
which lists real contributors only; don't pad it with other
accounts.
- Logins are user data: render them with `textContent` or attributes
only.

### Style

- Hard-wrap prose at ~70–80 columns for readable diffs.
Expand Down
17 changes: 10 additions & 7 deletions website/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ development, contribution, and support guidance live under
│ ├── assets/
│ ├── components/ # Astro landing, interactive example, header, page title, site footer
│ │ ├── community/ # article/talk lists + landing teaser
│ │ └── contribute/ # open calls for contributions (landing + page)
│ │ └── contribute/ # open calls + contributor thanks (landing + page)
│ ├── content/
│ │ ├── docs/ # all user-facing pages (.md / .mdx)
│ │ │ ├── introduction/
Expand All @@ -38,15 +38,16 @@ development, contribution, and support guidance live under
│ │ │ └── community/
│ │ ├── articles/ # one YAML per published article
│ │ └── talks/ # one YAML per talk
│ ├── data/ # dev-only sample of the contribution issues list
│ ├── data/ # dev-only samples: contribution issues, contributors
│ ├── openapi/scope-openapi.json # artifact generated from the API registry
│ ├── plugins/
│ │ ├── remark-base-path.mjs # applies the deployment base to internal links
│ │ └── remark-http-snippets.mjs # turns ```http blocks into multi-language tabs
│ ├── scripts/
│ │ ├── analytics.ts # consent-gated website-only 1DS analytics
│ │ ├── flow-demo.ts # progressive-enhancement example controller
│ │ └── contribution-issues*.ts # open calls: data helpers + custom element
│ │ ├── contribution-issues*.ts # open calls: data helpers + custom element
│ │ └── contributors*.ts # contributor thanks: data helpers + custom element
│ ├── styles/landing.css # shared brand tokens + scoped landing styles
│ └── content.config.ts
├── astro.config.mjs # sidebar, plugins, starlight-openapi config
Expand Down Expand Up @@ -195,13 +196,15 @@ table of contents, code examples, and previous/next navigation.
separate Portal, CLI, and API entry points. Access requirements are
explicit rather than promising instant access to a hosted service.
- **Motion:** limited to the silent showreel, the interactive
example, and the open-calls cards (staggered entrance, count-up,
cursor glow, a rotation through all open calls), with pause controls
example, the open-calls cards (staggered entrance, count-up,
cursor glow, a rotation through all open calls), and the
contributor avatars (pop-in, hover tooltips), with pause controls
and reduced-motion support. The logo and documentation chrome remain
still.
- **Contribution:** a "Help build Scope" section lists open calls
for contributions, refreshed hourly from a data branch without a
redeploy. See "Contribution issues" in `AGENTS.md`.
for contributions and thanks every contributor, refreshed
hourly from a data branch without a redeploy. See "Contribution
issues" and "Contributors" in `AGENTS.md`.

### Showreel

Expand Down
12 changes: 12 additions & 0 deletions website/src/components/contribute/ContributeTeaser.astro
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
// Licensed under the MIT License.

import ContributionIssues from './ContributionIssues.astro';
import Contributors from './Contributors.astro';

const allHref = `${import.meta.env.BASE_URL.replace(/\/$/, '')}/community/contribute/`;
---
Expand All @@ -27,4 +28,15 @@ const allHref = `${import.meta.env.BASE_URL.replace(/\/$/, '')}/community/contri
</ContributionIssues>
<a class="scope-text-link scope-contrib__all" href={allHref}>See all open calls <span aria-hidden="true">&rarr;</span></a>
</div>
<Contributors variant="wall" limit={24}>
<div class="thanks-head" data-reveal>
<h3 id="thanks-heading"><span class="thanks-heart" aria-hidden="true">&hearts;</span> Thank you, contributors</h3>
<p class="contrib-count" data-count-pill>
<span class="contrib-count__pulse" aria-hidden="true"></span>
<span aria-hidden="true"><span class="contrib-count__value" data-count>0</span> <span data-count-label>contributors</span> · <span data-prs>0 merged PRs</span></span>
<span class="sr-only" data-count-text></span>
</p>
</div>
<p class="thanks-intro" data-reveal>Everyone below got a pull request merged into Scope. Hover an avatar to see how many.</p>
</Contributors>
</section>
65 changes: 65 additions & 0 deletions website/src/components/contribute/Contributors.astro
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
---
// Copyright (c) Microsoft Corporation.
// Licensed under the MIT License.

// Thanks contributors: everyone (bots aside) who got a pull request merged.
// The contribution-issues workflow publishes the list to the website-data
// branch, and the browser fetches it. See website/AGENTS.md.
import '../../styles/contribution-issues.css';
import '../../styles/contributors.css';
import { CONTRIBUTORS_DATA_URL, CONTRIBUTORS_GRAPH_URL } from '../../scripts/contributors';

interface Props {
/** `wall` for the landing avatar wall, `grid` for the docs page cards. */
variant?: 'wall' | 'grid';
/**
* Wall: maximum number of items, including the "+N" bubble.
* Grid: cards shown before the "Show all" button.
*/
limit?: number;
}

const { variant = 'wall', limit } = Astro.props;
const src = import.meta.env.PUBLIC_CONTRIBUTORS_URL || CONTRIBUTORS_DATA_URL;
const base = import.meta.env.BASE_URL.replace(/\/$/, '');
const moreHref = `${base}/community/contribute/#thank-you`;
const openCallsHref = `${base}/community/contribute/#open-calls`;
const skeletons = variant === 'wall' ? 8 : 3;
const listId = `thanks-list-${variant}`;
---

<scope-contributors class={`thanks thanks--${variant} not-content`} data-variant={variant} data-limit={limit} data-src={src} data-more-href={moreHref} data-state="loading">
<slot />
<p class="contrib-sample-tag" data-sample-tag hidden>Sample data · dev only</p>
<ul class="thanks-list" id={listId} data-list aria-busy="true" aria-label="Contributors">
{
Array.from({ length: skeletons }, () => (
<li class="thanks-item thanks-skeleton" aria-hidden="true" />
))
}
</ul>
{
variant === 'grid' && (
<button type="button" class="thanks-show-all" data-show-all aria-controls={listId} hidden>
<span data-show-all-label>Show all contributors</span>
<span aria-hidden="true">&darr;</span>
</button>
)
}
<p class="contrib-message thanks-message--empty">
No pull request has been merged yet. Be the first:
<a href={openCallsHref}>pick an open call</a>.
</p>
<p class="contrib-message thanks-message--error">
We couldn't load the list. See
<a href={CONTRIBUTORS_GRAPH_URL} target="_blank" rel="noopener noreferrer">contributors on GitHub<span class="sr-only"> (opens in a new tab)</span></a>.
</p>
<p class="contrib-fallback">
See
<a href={CONTRIBUTORS_GRAPH_URL} target="_blank" rel="noopener noreferrer">contributors on GitHub<span class="sr-only"> (opens in a new tab)</span></a>.
</p>
</scope-contributors>

<script>
import '../../scripts/contributors-element';
</script>
9 changes: 9 additions & 0 deletions website/src/content/docs/community/contribute.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ description: Open issues where the Scope team is calling for contributions, and
---

import ContributionIssues from '../../../components/contribute/ContributionIssues.astro';
import Contributors from '../../../components/contribute/Contributors.astro';

<section data-contribution-calls>

Expand All @@ -30,3 +31,11 @@ The list refreshes about every hour.
<ContributionIssues variant="list" />

</section>

## Thank you

Thank you to everyone who got a pull request merged, from the community
and the Scope team alike. Select a name to see their merged pull requests. This list also
refreshes about every hour.

<Contributors variant="grid" limit={30} />
9 changes: 9 additions & 0 deletions website/src/data/contributors.sample.jsonl
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{"login":"cedricvidal","prs":11}
{"login":"chanezon","prs":1}
{"login":"cmaneu","prs":2}
{"login":"duffney","prs":3}
{"login":"Gile987","prs":1}
{"login":"idhanth","prs":2}
{"login":"itsmeasadali","prs":1}
{"login":"manekinekko","prs":14}
{"login":"mnkj0021","prs":1}
Loading
Loading