Skip to content

feat(giveback): add Causes tab, remove obsolete Campaign tab#6250

Merged
idoshamun merged 4 commits into
mainfrom
feat/giveback-causes-tab
Jun 28, 2026
Merged

feat(giveback): add Causes tab, remove obsolete Campaign tab#6250
idoshamun merged 4 commits into
mainfrom
feat/giveback-causes-tab

Conversation

@idoshamun

@idoshamun idoshamun commented Jun 28, 2026

Copy link
Copy Markdown
Member

Changes

Second step of the giveback design pass from #6247 (PR 2/6). Adds the Causes management tab and removes the obsolete Campaign tab.

Causes tab (new)

  • GivebackCausesPanel — your backed causes sit up top as compact rows (emblem, name, learn-more, remove); a category-filterable discovery grid of the rest sits below. Adding/removing a cause auto-saves with no Save step.
  • useGivebackCauseSelection.toggleAndSave (new) — toggles and persists immediately. Reads the freshest selection through a ref so back-to-back toggles can't persist from a stale snapshot, and rolls the optimistic change back if the save fails. The cause visibly moving between sections is the feedback, so there's no success toast.
  • GivebackCauseCard gains a buttonToggle variant: only the corner "+" toggles (the card isn't a big tap target), used by the discovery grid. Default stays whole-card-tappable for the onboarding funnel. Card layout restructured to its final form.
  • GivebackTabHeading (new) — shared tab header primitive.
  • GivebackFilterChip restyled as a bordered tag pill.
  • Tab nav scrolls horizontally on narrow screens.

Campaign tab removed

The redesign drops the why/Campaign tab entirely (its content is split between the funnel and FAQ), so it's removed here rather than kept as a transitional shim. Deletes the cluster that existed only to serve it: GivebackCampaignPanel (+spec), GivebackSelectedCauses, GivebackEditCausesModal, GivebackBudgetStory.

Tabs are now Take action / Impact / Causes.

Kept GivebackFaq / GivebackHeadline / GivebackMascot / GivebackSection — they're wired in by the upcoming FAQ (PR4) and hero (PR5) PRs, not compat. GivebackCommunityGoalProgress also stays (still used by the Impact tab; removed when PR3 redesigns it).

Scope notes

  • Dual useGivebackCauseSelection instances (page-level + this panel) share the same React Query key, so no double fetch, and hasSavedCauses is query-derived so it stays consistent after a save. Their local selectedIds diverge, but the inline onboarding picker and this tab are never interactive at the same time, so it isn't user-visible.
  • The save() toast-timer polish from feat(giveback): full design pass — warm-up funnel, reward-ladder impact, causes tab #6247 is deferred to the funnel PR; only toggleAndSave is included here.
  • No Storybook stories yet (would pull in the large giveback mocks infra) — deferred, consistent with PR1.

Verification

  • ✅ Strict typecheck on changed files
  • ✅ ESLint clean
  • ✅ Shared + webapp tsc: no new errors (27 pre-existing, unrelated)
  • ✅ No dangling references to any deleted component
  • ✅ Giveback tests: 11 suites / 54 pass, incl. 3 new toggleAndSave tests (immediate persist, back-to-back chaining, optimistic rollback)

Preview domain

https://feat-giveback-causes-tab.preview.app.daily.dev

New "Causes" tab to manage your backed causes: your picks sit up top as
compact rows, with a category-filterable discovery grid below. Add/remove
auto-saves via a new toggleAndSave on useGivebackCauseSelection, which
reads the freshest selection through a ref (no stale closure on rapid
toggles) and rolls back the optimistic change if the save fails.

- GivebackCauseCard gains a buttonToggle variant (corner + toggles, card
  isn't a big tap target) for the discovery grid
- Shared GivebackTabHeading primitive for consistent tab headers
- GivebackFilterChip restyled as a bordered tag pill
- Tab nav now scrolls horizontally on narrow screens

The old 'why'/Campaign tab stays for now; it is removed in the final
restructure PR.
@vercel

vercel Bot commented Jun 28, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
daily-webapp Ready Ready Preview Jun 28, 2026 12:27pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
storybook Ignored Ignored Jun 28, 2026 12:27pm

Request Review

The redesign drops the 'why'/Campaign tab entirely (its content is split
between the funnel and FAQ), so remove it now instead of keeping a
transitional shim. Deletes the tab plus the cluster that existed only to
serve it: GivebackCampaignPanel, GivebackSelectedCauses,
GivebackEditCausesModal, GivebackBudgetStory.

Tabs are now Take action / Impact / Causes. Kept GivebackFaq, Headline,
Mascot and Section: those are wired in by the upcoming FAQ and hero PRs.
@idoshamun idoshamun changed the title feat(giveback): add Causes management tab feat(giveback): add Causes tab, remove obsolete Campaign tab Jun 28, 2026
The causes tab fires SaveGivebackCauses on every toggle but couldn't tell
an add from a removal. Capture the direction from the pre-toggle state so
the event carries action: 'add' | 'remove' alongside cause_id and origin.
The edit-causes modal flow was removed with the Campaign tab; this event
is no longer fired anywhere. The 'opened cause manager' signal is now
ClickGivebackTab with tab='causes'.
@idoshamun idoshamun merged commit 0eeceae into main Jun 28, 2026
12 checks passed
@idoshamun idoshamun deleted the feat/giveback-causes-tab branch June 28, 2026 13: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