Skip to content

Rework contributions explorer into a single filterable view#593

Merged
JoaquinBN merged 2 commits intodevfrom
JoaquinBN/contribs-rework
May 4, 2026
Merged

Rework contributions explorer into a single filterable view#593
JoaquinBN merged 2 commits intodevfrom
JoaquinBN/contribs-rework

Conversation

@JoaquinBN
Copy link
Copy Markdown
Collaborator

Replaces the separate Highlights and AllContributions routes with a unified explorer at /all-contributions (and the /builders, /validators, /community variants), backed by category pills, type/mission dropdowns, a debounced search bar with sort: syntax and an info-icon tooltip, and a Both / Highlights only / Contributions only view switch — all serialized to URL params. Highlights render as a horizontal slider with arrows in the Both view and as a 5-col grid in Highlights-only mode; the contributions grid uses the same rebranded card already shown on profiles and the home page (extracted as portal/HighlightCard.svelte and portal/PortalContributionCard.svelte, plus a shared portal/HighlightsSlider.svelte and portal/SearchBar.svelte). The explorer always sends ?submittable_only=true (new backend filter on ContributionViewSet) so badges and journey rewards stay out of the public list, and the legacy consecutive-contribution stacking is removed across the stack — backend grouping override and frontend group_consecutive / disableGrouping paths are gone, along with a dead ui/HighlightCards.svelte. Loading skeletons now mimic the card layout, empty states show an icon plus a filter-aware CTA (Clear filters or Submit a contribution), the Dashboard highlights strip shows the latest 10 sorted by date, and the explorer closes with the same branded CTA footer used on Overview / How it works.

JoaquinBN added 2 commits May 4, 2026 16:15
Replace the separate Highlights and AllContributions routes with a
unified explorer at /all-contributions and the /builders, /validators,
/community variants. The page renders a Highlights section (horizontal
slider with arrows in Both mode, paginated grid in Highlights-only
mode) and a Contributions grid using the same rebranded card already
shown on profiles and the home page. A category pill toggle, type and
mission dropdowns, a debounced search bar with sort: syntax and an
info-icon tooltip, and a Both / Highlights only / Contributions only
view switch all serialize to URL params. The dropdown lists only
submittable contribution types and the explorer always asks the API
to hide non-submittable ones, so badge and journey contributions stay
out of the public list. Card stacking when consecutive contributions
share a type is removed everywhere — the backend grouping override
and the frontend grouping branch are gone. Loading skeletons now
mimic the card layout and empty states show an icon plus a filter-
aware CTA. The page closes with the same branded CTA footer used on
Overview and How it works.

## Claude Implementation Notes
- frontend/src/routes/AllContributions.svelte: full rewrite as the unified explorer (filter bar, view toggle, snippet-based skeletons + empty states, branded footer)
- frontend/src/routes/Highlights.svelte: deleted
- frontend/src/App.svelte: route /highlights, /contributions/highlights and the category-prefixed variants now render AllContributions
- frontend/src/components/portal/HighlightCard.svelte: extracted from PortalHighlights' inline card
- frontend/src/components/portal/HighlightsSlider.svelte: horizontal scroller with arrows, card-shape skeleton, designed empty state
- frontend/src/components/portal/PortalContributionCard.svelte: extracted from ProfileRecentContributions' inline card
- frontend/src/components/portal/SearchBar.svelte: search input + clear + info-icon tooltip with snippet body, optional debounce
- frontend/src/components/portal/PortalHighlights.svelte: now uses HighlightsSlider; sorts newest-first and slices to limit
- frontend/src/components/profile/ProfileRecentContributions.svelte: uses PortalContributionCard
- frontend/src/components/HighlightedContributions.svelte: View All link preserves user/type filters via /all-contributions?view=highlights
- frontend/src/components/Missions.svelte: drops forced validator fallback when pushing to the explorer
- frontend/src/components/ui/HighlightCards.svelte: deleted (dead code, never imported)
- frontend/src/components/ContributionsList.svelte: grouping branch removed; renders one ContributionCard per contribution
- frontend/src/components/ContributionCard.svelte: removed count-badge, date-range fallback, grouped_items expanded section, group_*-id resolution
- frontend/src/components/RecentContributions.svelte: drops group_consecutive and disableGrouping props
- frontend/src/components/ContributionsTable.svelte, frontend/src/routes/ContributionPreview.svelte: removed redundant group_consecutive: false
- frontend/src/lib/api.js: getContributions no longer auto-injects group_consecutive; getContributionsByUser drops the URL flag
- frontend/src/routes/Dashboard.svelte: highlights section shows 10 latest with neutral subtitle
- backend/contributions/views.py: adds ?submittable_only=true filter to ContributionViewSet; removes the group_consecutive list() override
- frontend/CLAUDE.md: route table and component docs updated to reflect the new explorer + portal cards
@JoaquinBN JoaquinBN merged commit cf39df3 into dev May 4, 2026
@JoaquinBN JoaquinBN deleted the JoaquinBN/contribs-rework branch May 4, 2026 14:19
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