about summary refs log tree commit diff
path: root/src/state/queries/feed.ts
Commit message (Collapse)AuthorAgeFilesLines
* Don't kick to login screen on network error (#4911)dan2024-08-131-1/+2
| | | | | | | | | | | | | | | | | | | | | * Don't kick the user on network errors * Track online status for RQ * Use health endpoint * Update test with new behavior * Only poll while offline * Handle races between the check and network events * Reduce the poll kickoff interval * Don't cache partially fetched pinned feeds This isn't a new issue but it's more prominent with the offline handling. We're currently silently caching pinned infos that failed to fetch. This avoids showing a big spinner on failure but it also kills all feeds which is very confusing. If the request to get feed gens fails, let's fail the whole query. Then it can be retried.
* Respect labels on feeds and lists (#4818)Eric Bailey2024-08-021-20/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prep * Pass in optional moderation to FeedCard * Compute moderation decision, filter contentList contexts, pass into card * Let's go a different route * Filter from within search queries * Use same search query for starter packs * Filter lists from profile tabs * Cleanup * Filter from profile feeds * Moderate post embeds * Memoize * Use ScreenHider on lists * Hide both list types * Fix crash on iOS in screen hider, fix lineheight * Memoize renderItem * Reuse objects to prevent re-renders
* Fix crash in Feeds and Starter Packs (#4616)dan2024-06-241-16/+28
| | | | | | | * Remove useless check * Fix the bug by only adding resolved feeds/lists * Clarify the purpose of the count field
* Starter Packs (#4332)Hailey2024-06-211-0/+17
| | | | | | | Co-authored-by: Dan Abramov <dan.abramov@gmail.com> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Tweak feed card to prevent spinnerz when pushing to screen (#4600)Hailey2024-06-211-1/+9
|
* Pinned feeds cards (#4526)Eric Bailey2024-06-221-0/+139
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add lists support to FeedCard * Add useSavedFeeds query, similar to usePinnedFeedInfos * Integrate into Feeds screen * Fix alignment on mobile * Update usages * Add placeholder loading state * Handle no feeds state * Reuse previous data for placeholder * Staged loading * Improve staged loading * Use setQueryData approach to pre-caching * Add types for a little more safety * Fix precaching --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Select, don't mutate (#4541)Eric Bailey2024-06-171-19/+21
|
* Redo explore page (#4491)Eric Bailey2024-06-141-2/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Redo explore page, wip * Remove circle icons * Load more styling * Lower limit * Some styling tweaks * Abstract * Add tab, query, factor out * Revert unneeded change * Revert unneeded change v2 * Update copy * Load more styling * Header styles * The thin blue line * Make sure it's hairline * Update query keys * Border * Expand avis * Very load more copy
* Reuse overfetching for popular feeds, add in existing filtering (#4501)Eric Bailey2024-06-141-5/+95
|
* Replace getAgent() with reading agent (#4243)dan2024-05-281-12/+12
| | | | | * Replace getAgent() with agent * Replace {agent} with agent
* Movable following feed (#3593)Eric Bailey2024-05-111-37/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle home algo with backwards compat * Remove todo, fix pwi view * Simplify filter logic * Handle edge case * Handle home algo in FeedSourceCard * Fix handling of pinned feed if home algo is disabled * Handle home algo on ProfileFeed screen * Rename * Fix pinned feeds key * Improve perf of pinned feeds with primary algo * Update statsig API * Revert unneeded changes * Support following feed as well * Better formatting * Clarify primary algo usage * Better comment * Handle saved feed screen edge case * Restore Feeds sparkle, fix line height * Move gate call down * Filter out primary algo from feeds page * Filter dupe from Feeds screen * Simplify logic * Missing following handling * Hide primary feed setting outside exp * Revert testing change * Migrate usePinnedFeedInfos * Migrate FeedSourceCard * Migrate Feeds screen * Migrate SavedFeeds screen * Handle timeline in feed infos * Finish migrating ProfileFeed, FeedSourceCard * Migrate ProfileList * Finalize mutation hooks * Allow unsaving lists * Handle following feed on Feeds screen * Handle following on SavedFeeds * Get rid of deprecated interface usages * Handle no pinned feeds * Handle no feeds on Feeds screen * Reuse component on SavedFeeds screen * Handle no following feed * Remove primary algo references * Migrate to new plural APIs * Remove unused event * Prevent duplicate keys * Make handling much more clear * Dedupe useHeaderOffset * Filter unknown feed types at source * Use just following * Immprove key handling * Resume from last tab * Bump sdk * Revert Gemfile * Additional protection in FeedSourceCard * Fix ProfileList save/unsave handling * Translate * Translate * Match existing handling post-signup * Ensure onboarding results in correct selected feeds * Some testing tweaks on create/onboarding * Revert primary algo consderations * Remove comment * Handle default feed setting * Rm unnecessary type cast * Remove premature gate check * Remove nullable check in onPageSelecting, assume the pager checks bounds * Use null for default selected feed * Rm unrelated change * Remove the concept of __key__ I don't think this concept is consistent. It's introduced on FeedSourceInfo which is used both by pinned feeds and by useFeedSourceInfoQuery. Pinned feeds use the pinning ID there. But there is no pinning ID for useFeedSourceInfoQuery. So this means this field is sometimes one thing and sometimes some other thing. That is a decent sign that it shouldn't be on that type at all. It's not used anywhere except the desktop feed enumeration. It seems reasonable to assume there that we wouldn't want to show the same feed URL twice. (And if it does occur in the array twice, IMO we should solve that at the API level and dedupe it on read or next write.) So I think we should just use the URL in that place. (I used the descriptor, which is equivalent.) * Dedupe pinned feeds by URL on read * Filter timeline out of mergefeed sources * Put FeedDescriptor into FeedSourceInfo * Group saved info with feed for pins This removes a loop within a loop within a loop. * Fix Feeds link on native --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Add `useAgent` hook and replace (#3706)Eric Bailey2024-04-251-1/+5
| | | | | | | | | | | * Hook it up * Memoize getAgent method * Use one shared reference --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* PWI improvements (#3489)Paul Frazee2024-04-121-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enable home and feeds on the PWI * Add global SigninDialog to drive useRequireAuth() * Tweak desktop styles * Make the logo in leftnav PWI a clickable home link * Add label * Improve dialog on web * Fix query key * Go to home after signout from settings screen * Filter out feeds from the discover listing for logged out users which are known to break without auth * Update profile header follow/subscribe to give signin prompt * Show profile feeds tabs on pwi * Add language selector to account creation footer and pwi left nav desktop --------- Co-authored-by: dan <dan.abramov@gmail.com>
* Extract query key roots to constants (#3404)dan2024-04-041-14/+17
| | | | | | | * Extract query key roots to constants * Dedupe labelers-detailed-info * Align naming
* Fix wrong feed being shown (#3015)dan2024-02-281-78/+51
|
* Avatar type for Feed check (#2661)Prates2024-01-301-0/+4
| | | | | * Changed type from algo to list * Fixed to check if it's a feed or a list
* Reduce some Sentry logs (#2549)Eric Bailey2024-01-161-1/+2
| | | | | * Reduce some Sentry logs * Update tests
* Fix blank home screen (close #2281) (#2291)Paul Frazee2023-12-241-1/+4
|
* Use same source for pinned feeds on Home and tab/sidebars (#2235)Eric Bailey2023-12-181-0/+1
|
* Traffic reduction and tuned caching strats (#2215)Paul Frazee2023-12-151-45/+0
| | | | | | | | | | | | | * Update the feed to only check latest on focus after 30s, but to do a full reset on focus after 1 hour to avoid very stale data * Remove the isFeedPublic query * Fix: avoid double next-page fetches * Reduce some poll intervals to reduce server load * Guard against double-fires of fetchNextPage * Reduce polling on blurred screens
* Handle failed pinned feed fetches when rendering list of pinned feeds (#2173)Eric Bailey2023-12-111-20/+33
|
* Surface raw server error if exists (#2096)Eric Bailey2023-12-051-3/+15
| | | | | | | | | | | * Surface raw server error if exists * Update copy * Update translation files --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Better handle feed auth failures (#2060)Eric Bailey2023-12-011-6/+7
| | | | | * Better handle feed auth failures * Add comment
* Slightly less verbose variablePaul Frazee2023-11-291-3/+3
|
* Add hasPinnedCustomFeedOrList to usePinnedFeedsInfos hookCooper Edmunds2023-11-291-2/+9
|
* Fix pinned feeds mutation issue (#2016)Eric Bailey2023-11-281-8/+1
|
* Handle other feed auth response (#2012)Eric Bailey2023-11-281-0/+3
|
* Fall back for non-public feeds (#1988)Eric Bailey2023-11-241-0/+29
|
* Move the current agent to a global and reset RQ queries on agent change (#1946)Paul Frazee2023-11-161-14/+7
|
* Caching heuristics (#1938)Eric Bailey2023-11-161-0/+2
| | | | | * Tempfix profile load * First pass at staleTime
* Factor our feed source model (#1887)Eric Bailey2023-11-131-33/+35
| | | | | | | | | | | | | | | | | | | | | * Refactor first onboarding step * Replace old FeedSourceCard * Clean up CustomFeedEmbed * Remove discover feeds model * Refactor ProfileFeed screen * Remove useCustomFeed * Delete some unused models * Rip out more prefs * Factor out treeView from thread comp * Improve last commit
* More prefs cleanup (#1882)Eric Bailey2023-11-131-11/+121
| | | | | | | | | | | * Update useHomeTabs * Use queryClient to fetch * Replace useHomeTabs and useDesktopRightNavItems * Fix type error * Some cleanup
* Refactor My Feeds (#1877)Eric Bailey2023-11-121-2/+68
| | | | | | | * Refactor My Feeds screen * Remove unused feed UI models * Add back PTR
* Eric/preferences (#1873)Eric Bailey2023-11-121-0/+106
* Add initial preferences query, couple mutations * Remove unused * Clean up labels, migrate getModerationOpts * Add birth date handling * Migrate feed prefs * Migrate thread view prefs * Migrate homeFeed to use existing key name * Fix up saved feeds in response, no impl yet * Migrate saved feeds to new hooks * Clean up more of preferences * Fix PreferencesThreads load state * Fix modal dismissal * Small spacing fix --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>