feat(highlights): add 'All' tab to the highlights page#6109
Merged
Conversation
Render a new "All" tab after Headlines that lists every highlight across channels, deduplicated by post and ordered by recency. The tab is wired to a new /highlights/all static page so it survives a hard refresh, and uses the new postHighlightsFeed GraphQL endpoint which accepts optional channel and significance filters. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
- Include after in postHighlightsFeed query key so paginated cursors don't collide in cache - Drop unused exports (POST_HIGHLIGHTS_FEED_PAGE_QUERY, query-key helper, PostHighlightsFeedPageData) and the single-call useAllHighlights hook - Collapse the activeTab if/else chain into a direct expression Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Summary
Adds an "All" tab after "Headlines" on
/highlightsthat lists every highlight across channels, deduplicated by post and ordered by recency.pages/highlights/all.tsxso the tab has its own URL (/highlights/all) that survives hard refresh and is prefetched at build time.postHighlightsFeedendpoint viapostHighlightsFeedQueryOptions. The endpoint accepts optionalchannelandsignificancefilters, so the same query can eventually replacemajorHeadlinesand per-channelpostHighlights.enabled: activeso it doesn't fire while the user is on another tab.Key decisions
/highlights/all) over a query-param so Next.js prefetches the data and the URL is shareable. Static routes win over[channel].tsxin routing, so no guard needed there.significancetoPostHighlightFeedCardfragment now that it's a real field; the existing UI doesn't render it yet but the data is available.MajorHeadlinesTabandChannelTabuntouched — they still hit their existing endpoints. Migration topostHighlightsFeedcan happen incrementally.Test plan
/highlights— Headlines tab renders as before, new All tab appears second/highlights/all, list shows newest highlights across all channels/highlights/all— page loads, All tab stays active/highlights/{channel}?highlight={id}— expanded item still scrolls into viewCloses ENG-1590
Created by Huginn 🐦⬛
Preview domain
https://eng-1590-add-all-tab-in-the-high.preview.app.daily.dev