feat(volunteer): list open roles from the Hub in place of the Notion button - #540
Open
mohanadft wants to merge 1 commit into
Open
feat(volunteer): list open roles from the Hub in place of the Notion button#540mohanadft wants to merge 1 commit into
mohanadft wants to merge 1 commit into
Conversation
…button
The "Current Volunteer Needs" button sent people to a Notion board. Replace it
on /volunteer and /volunteer-new with a filterable list of the live open roles
from the Hub's public API.
- Add /api/open-roles, a server proxy over
hub.techforpalestine.org/api/public/open-roles. One retry on 5xx for cold
starts, tolerates a bare array or a wrapped envelope, no-store, and returns a
generic error to the client with details going to Sentry.
- Normalize the upstream rows at the boundary (openRoleData.ts): flatten
project/team into a single orgName, coerce and cap strings, drop rows without
an id or title, sort newest-first.
- Render as a single-column list of bands rather than a card grid, so expanding
a long description doesn't reflow siblings. Collapsed previews flatten
whitespace because several descriptions open with a short heading line that
would otherwise waste the three-line clamp.
- Apply targets follow how a role is staffed: team roles point at /membership
("Become a member"), project roles at the volunteer form.
- Skill filters cap at the 8 most common with the tail behind a toggle; 15
categories, 9 of them with a single role, would have outweighed the list.
The active filter stays visible even when it lives in the tail.
- The island carries a skin prop because the two pages use different design
systems (Layout.astro's indigo/white vs HomeLayout's cream/rose and ts-*
scale, which only that layout loads). Each skin borrows its host's tokens
instead of introducing a third identity.
- Repoint the in-prose "specific roles we're looking for" link at #open-roles;
it would otherwise have kept the replaced Notion board linked.
Deploying website with
|
| Latest commit: |
c9a1911
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://09d7e9ee.website-aun.pages.dev |
| Branch Preview URL: | https://feat-volunteer-open-roles.website-aun.pages.dev |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Current Volunteer Needs button on
/volunteerand/volunteer-newpointed at a Notion board. This replaces it with a filterable list of the live open roles from the Hub's public API (hub.techforpalestine.org/api/public/open-roles— 20 roles at time of writing).How
/api/open-roles— server proxy following the/api/projectspattern. One retry on 5xx for cold starts (4xx returns immediately), tolerates a bare array or a{data}/{roles}envelope,no-store,ACAO: *(read-only GET over public data). Client gets a generic{ error }; details go toconsole.error+ Sentry viareportError. No secret needed — the upstream endpoint is public.openRoleData.ts— normalizes upstream rows at the boundary: flattensproject.name/team.nameinto a singleorgName, coerces and length-caps every string, drops rows missingid/title, sorts newest-first. A shape change upstream now fails in one place.OpenRoles.tsx/OpenRoleCard.tsx— client island (client:only="react"), fetched from/api/open-rolesso a Hub outage never blocks the page render.Design notes
/volunteerisLayout.astro(indigo/green, white cards, system font) and/volunteer-newisHomeLayout.astro(cream/sand/butter + rose#AB4956, Fraunces/Outfit via thets-*scale, which only that layout loads). The island takes askinprop that maps to the host page's tokens rather than introducing a third identity./volunteer-newfollowprojects-new.astro: the section sits onbg-pagewith anh-px bg-ink-dividerrule closing the hero. Putting it onbg-sandbroke the page's page/sand alternation for every section below it and put sand cards on a sand ground.whitespace-pre-line. Several descriptions open with a short heading line that would otherwise spend the whole three-line clamp.type === "team"→/membership("Become a member", matching that page's own title); otherwise the volunteer form ("Apply to volunteer", matching the existing CTA). The label carries the distinction, not just colour, and team roles also get a bordered "T4P team" marker.ProjectCard. Skeletons carrymotion-reduce:animate-none.aria-pressedbuttons, the disclosure isaria-expanded/aria-controls, the result count is anaria-live="polite"region, targets are ≥44px, and each apply link carries ansr-onlyrole name so 20 otherwise-identical links read distinctly.Also in this change
The in-prose "Check out specific roles we're looking for right now!" link on both pages is repointed at
#open-roles. Left alone, it would have kept the replaced Notion board linked from the page.Known upstream quirks (not worked around)
project.idisnullon every row, so cards can't deep-link to a project page.Fact Checke; rendered as-is rather than patched client-side.Test plan
/volunteer— roles load, styling matches the page's indigo/white system, filters and Read-the-full-role work/volunteer-new— roles load, styling matches the cream/rose system, hero divider reads correctly and section surfaces still alternate below/membership; project roles link to the volunteer form/api/open-rolesin devtools and confirm the notice + working Try again