about summary refs log tree commit diff
path: root/src/state/queries
Commit message (Collapse)AuthorAgeFilesLines
...
* [🐴] Decrement app badge when opening unread chat (#4040)Hailey2024-05-161-4/+13
| | | | | | | | | * decrement badge count for chats * handle decrement in `useMarkAsRead` * remove async * oops
* [🐴] infinite stale time (#4051)Hailey2024-05-161-0/+2
|
* [🐴] Block states, read only (#4022)Eric Bailey2024-05-141-1/+32
| | | | | | | | | | | * Refactor ChatListItem for mod state * Refactor Conversation Header for mod state * Invalidate query for list when blocking/unblocking * Remove unused prop, restore border * Add mutations, hook up profile shadow to list query, use shadow-aware query for convo (#4024)
* [🐴] Settings screen (#3830)Samuel Newman2024-05-141-0/+64
| | | | | | | | | * create settings screen + api * update api package * use putrecord API with validate false * create new RadioGroup component
* [🐴] Swap in new package, update usages (#3992)Eric Bailey2024-05-147-67/+38
| | | | | | | * Swap in new package, update usages * Remove uneccessary patch * Override type in safe place
* Gate base following feed usage (#3994)Eric Bailey2024-05-131-1/+11
|
* Swap in base following (#3991)Eric Bailey2024-05-131-2/+1
|
* FeedFeedback fixes (#3968)dan2024-05-121-1/+1
| | | | | | | | | | | * Lower seen threshold to 1.5s * Send feedContext for replies * Use a simpler and more reliable feedContext fallback --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Fix flashes when replacing For You (#3967)dan2024-05-111-0/+40
| | | | | * Fix flashes when replacing For You * Switch to Discover if pinned after removing
* Onboarding fixes (#3966)dan2024-05-111-12/+25
| | | | | | | | | | | | | | | * Ensure prefs are up-to-date before leaving onboarding * Parallelize upsertProfile call * Don't upsertProfile if no image * Don't waterfall blob upload * Fix useProfileUpdateMutation to parallelize uploads * Invalidate user profile before leaving onboarding * Ungate setting the pic
* Movable following feed (#3593)Eric Bailey2024-05-115-102/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* [🐴] Mutate data instead of invalidating queries when muting or unmuting ↵Hailey2024-05-103-57/+62
| | | | | | | | | | | | | | | | | | | | | (#3946) * mutate for mutes * mutate data for mutes * add initial data, `useConvoQuery` in `ConvoMenu` * `useInitialData` * don't use `identifier` for notifications, use `dates` instead * better implementation * simplify * simplify * fix types
* actually optimistic mark as read (#3917)Samuel Newman2024-05-082-5/+9
|
* [🐴] Mark as read in convo menu (#3913)Samuel Newman2024-05-082-7/+22
| | | | | | | * add mark as read option * optimistic update + link up menu * rm messageid
* [🐴] Unread messages badge (#3901)Samuel Newman2024-05-072-3/+140
| | | | | | | | | | | | | | | | | | | | | * add badge * move stringify logic to hook * add mutation hooks * optimistic mark convo as read * don't count muted chats * Integrate new context * Integrate mark unread mutation * Remove unused edit --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Implement FeedFeedback API (#3498)Paul Frazee2024-05-071-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement onViewableItemsChanged on List.web.tsx * Introduce onItemSeen to List API * Add FeedFeedback tracker * Add clickthrough interaction tracking * Add engagement interaction tracking * Reduce duplicate sends, introduce a flushAndReset to be triggered on refreshes, and modify the api design a bit * Wire up SDK types and feedContext * Avoid needless function allocations * Fix schema usage * Add show more / show less buttons * Fix minor rendering issue on mobile menu * Wire up sendInteractions() * Fix logic error * Fix: it's item not uri * Update 'seen' to mean 3 seconds on-screen with some significant portion visible * Fix non-reactive debounce * Move methods out * Use a WeakSet for deduping * Reset timeout * 3 -> 2 seconds * Oopsie * Throttle instead * Fix divider * Remove explicit flush calls * Rm unused --------- Co-authored-by: dan <dan.abramov@gmail.com>
* remove trailing period from query term in `useActorAutocompleteQuery` (#3765)Hailey2024-05-061-1/+5
| | | | | | | | | * remove trailing period from query term * Rm useMemo --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* add focus refresh + polling (#3846)Samuel Newman2024-05-031-1/+2
|
* [Clipclops] Clop menu, leave clop, mute/unmute clop (#3804)Samuel Newman2024-05-023-1/+157
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * convo menu * memoize convomenu * add convoId to useChat + memoize value * leave convo * Create mute-conversation.ts * add mutes, remove changes to useChat and use chat.convo instead * add todo comments * leave convo confirm prompt * remove dependency on useChat and pass in props instead * show menu on long press * optimistic update * optimistic update leave + add error capture * don't `popToTop` when unnecessary --------- Co-authored-by: Hailey <me@haileyok.com>
* [Clipclops] 2 Clipped 2 Clopped (#3796)Eric Bailey2024-05-014-0/+99
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add new pkg * copy queries over to new file * useConvoQuery * useListConvos * Use useListConvos * extract useConvoQuery * useGetConvoForMembers * Delete unused * exract useListConvos * Replace imports * Messages/List/index.tsx * extract getconvoformembers * MessageItem * delete chatLog and rename query.ts * Update import * Clipclop service (#3794) * Add Chat service * Better handle deletions * Rollback unneeded changes * Better insertion order * Use clipclops * don't show FAB if error * clean up imports * Update Convo service * Remove temp files --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Performance improvements: structural sharing & moderation opts context (#3785)Paul Frazee2024-04-306-53/+11
| | | | | | | | | | | | | * Fix: correctly apply structural sharing to preferences object * Move moderation opts into a context * Fix import * Remove log * Pass userdid directly * Pass moderationPrefs directly
* [Session] Refactor to prepare for V2 (#3781)dan2024-05-011-8/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Move types to another file Co-authored-by: dan <dan.abramov@gmail.com> * Move utilities out Co-authored-by: dan <dan.abramov@gmail.com> * Move PUBLIC_BSKY_AGENT Co-authored-by: dan <dan.abramov@gmail.com> * Move createPersistSessionHandler inline Co-authored-by: dan <dan.abramov@gmail.com> * Call configureModeration when clearing account too This ensures that the app labelers get reset in a test environment. Co-authored-by: dan <dan.abramov@gmail.com> * Make guest configureModeration sync, non-guest async * Extract isSessionExpired Co-authored-by: dan <dan.abramov@gmail.com> * Flip isSessionExpired condition Co-authored-by: dan <dan.abramov@gmail.com> * Extract agentToSessionAccount Co-authored-by: dan <dan.abramov@gmail.com> * Extract createAgent* Co-authored-by: dan <dan.abramov@gmail.com> * Simplify isSessionExpired --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Send Bluesky feeds and suggested follows more data (#3695)Eric Bailey2024-04-292-9/+36
| | | | | | | | | | | | | | | | | * WIP * Fix constructors * Clean up * Tweak * Rm extra assignment * Narrow down the argument --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* remove precacheThreadPostProfiles (#3729)Hailey2024-04-273-62/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * remove `precacheThreadPostProfiles` * add `displayName` to `PreviewableUserAvatar` * memo * use `precacheProfile` * pass `profile` directly to `PreviewableUserAvatar` * update the `UserAvatar`'s props * remove feed cache * one more spot * rm unused queryClient * Don't call fn unnecessarily * Preload for display name too * try notification item * add to feeditem * and finally, precache for post threads * timestamp * Fix * onBeforePress --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Improve usability of search on web (#3663)Hailey2024-04-271-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * dont select the text on web * TODO REVERT THESE CHANGES * use `usethrottledvalue` for autocomplete * use `isFetching` from query * rm setTimeout * getting there * improve functionality of cancel button * rm todo * add comment back * encode `searchText` rather than `queryTerm` * use "back" on web in some cases * don't flash results in autocomplete * remove unnecesary usestate * rename everything to `query` temporarily * revert accidental lint * rm todo * rm comment * use `useFocusEffect` to update the query term on back navigation * `searchText` is always defined here * Fix race * remove back functionality * use `keepPreviousData` for query * rename `q` to `queryParam` * remove hack * remove `q=` on cancel * blur on submit * use `setParams` instead of `replace` * use `replace` on web still * clear the search input when we clear `q` on native * onPress dismiss attempt * Adjustments * Fix search history * Always hide autocomplete * Clear right pane search on select * `blur` on autosuggestion press * Rename to reduce diff * Fixes * Unify codepaths * Fixes * precache the autosuggestion * do the cache in the link card * Revert "precache the autosuggestion" This reverts commit 79c433e984621ba4231a2a4c4b3f4690b0516b4d. * use `throttledValue` and `keepPreviousData` in sidebar search * show spinner when fetching pt 1 * show spinner when fetching pt 2 * show spinner properly for autocomplete * Fix extra border * Position fixed * TS * Revert "TS" This reverts commit df187ea2d7a96d0f1832bc2392215f4d969a87c9. * Revert "Position fixed" This reverts commit 9c721c952b0fa4e5e4a23de38cab916ab13397e6. * Maybe fix iPad * Revert "TODO REVERT THESE CHANGES" This reverts commit 279f717f3091c9df8c73ba35f9a038e12f5a1122. * Rename var --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Add `useAgent` hook and replace (#3706)Eric Bailey2024-04-2531-37/+122
| | | | | | | | | | | * Hook it up * Memoize getAgent method * Use one shared reference --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Drill `getAgent` into `notifications/utils` (#3703)Eric Bailey2024-04-253-9/+16
| | | | | | | | | | | * Drill into notifications/util (cherry picked from commit 84b535ed54f4fe93debcd198809bb184519c3507) * Thread getAgent instead --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Drill into `getAgent` into `whenAppViewReady` (#3702)Eric Bailey2024-04-252-20/+45
| | | | | | | | | | | * Drill into whenAppViewReady (cherry picked from commit e290e5be3df509bdd9d0e626a164996c9dee3636) * Drill getAgent instead --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Drill `getAgent` into feed APIs (#3701)Eric Bailey2024-04-251-16/+30
| | | | | | | | | | | * Update to desired post-feed usage * Drill agent into feed apis * Thread getAgent instead --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* [Session] Base (#3541)Eric Bailey2024-04-251-1/+3
| | | | | * Add readLastActiveAccount to use accounts[] as source of truth * Add public service constant, use
* Remove old Suggested Follows logic (#3689)dan2024-04-241-25/+0
|
* rm country param (#3653)Samuel Newman2024-04-231-4/+0
|
* [GIFs] Replace GIPHY with Tenor (#3651)Samuel Newman2024-04-222-280/+177
| | | | | | | | | * replace GIPHY with Tenor * remove "directly" wording * replace GIPHY wording * remove log
* Add GIF select to composer (#3600)Samuel Newman2024-04-191-0/+280
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * create dialog with flatlist in it * use alf for composer photos/camera/gif buttons * add gif icons * focus textinput on gif dialog close * add giphy API + gif grid * web support * add consent confirmation * track gif select * desktop web consent styles * use InlineLinkText instead of Link * add error/loading state * hide sideborders on web * disable composer buttons where necessary * skip cardyb and set thumbnail directly * switch legacy analytics to statsig * remove autoplay prop * disable photo/gif buttons if external media is present * memoize listmaybeplaceholder * fix pagination * don't set `value` of TextInput, clear via ref * remove console.log * close modal if press escape * pass alt text in the description * Fix typo * Rm dialog --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* delete useMyFollowsQuery (#3529)Samuel Newman2024-04-172-80/+3
|
* add sort to searchPosts request (#3581)Samuel Newman2024-04-161-12/+7
|
* bump api, remove `as number` from types (#3580)Hailey2024-04-161-4/+3
| | | | | * bump api, remove `as number` from types * bump dev env
* Improve the language behaviors around the PWI (#3545)Paul Frazee2024-04-131-0/+8
| | | | | | | | | * Handle leftnav overflow with longer languages' copy * Update the language dropdown to set ALL language prefs * Add hackfix to language cachebusting on PWI * Reset feeds on language change
* cache fix for search post results (#3520)Hailey2024-04-121-0/+4
|
* Profile card hover preview (#3508)Eric Bailey2024-04-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: initial user card hover * feat: flesh it out some more * fix: initialize middlewares once * chore: remove floating-ui react-native * chore: clean up * Update moderation apis, fix lint * Refactor profile hover card to alf * Clean up * Debounce, fix positioning when loading * Fix going away * Close on all link presses * Tweak styles * Disable on mobile web * cleanup some of the changes pt. 1 * cleanup some of the changes pt. 2 * cleanup some of the changes pt. 3 * cleanup some of the changes pt. 4 * Re-revert files * Fix handle presentation * Don't follow yourself, silly * Collapsed notifications group * ProfileCard * Tree view replies * Suggested follows * Fix hover-back-on-card edge case * Moar --------- Co-authored-by: Mary <git@mary.my.id> Co-authored-by: Hailey <me@haileyok.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>
* Fix stale Notifications after push (#3507)dan2024-04-121-7/+27
|
* QT Jump Pt. 2 - Remove code duplication (#3506)Hailey2024-04-121-9/+2
| | | | | * remove code duplication * now it's safe to remove shimmer
* add `likeCount` etal. to `embedViewRecordToPostView` (#3500)Hailey2024-04-121-1/+5
| | | | | | | | | | | | | | | | | | | * fix qt jumps Revert "don't show loading placeholder if we don't need it" This reverts commit 406f801f217b2733fdd82732c0af74186fc47464. don't show loading placeholder if we don't need it add `likeCount` etal. to `embedViewRecordToPostView` * lint * Revert the shimmer change --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Search - only enable queries once tab is active (#3471)Samuel Newman2024-04-102-5/+14
| | | | | | | * only enable queries once tab is active * remove hasBeenTrue hook * make enabled optional
* Search - extra tabs (#3408)Samuel Newman2024-04-101-9/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | * add extra tab to search and translate tab names * add feature gate * flatten pager children * Revert "flatten pager children" This reverts commit 0050d42558c2c9b7bc4f2ad2df4ae2908fa26f65. * have pager children as array * move gate to custom hook * bundle titles and pages together * remove comment * Fix a crash * Use Views as children --------- Co-authored-by: dan <dan.abramov@gmail.com>
* [Statsig] Track like/follow metadata (#3435)dan2024-04-082-11/+60
| | | | | | | | | | | * Track becoming mutuals * Track poster/liker status * Track post and followee clout * Track follower and liker clout * Extract utility
* replace deprecated `term` with `q` in search actor (#3405)Hailey2024-04-042-3/+3
|
* Extract query key roots to constants (#3404)dan2024-04-0430-137/+195
| | | | | | | * Extract query key roots to constants * Dedupe labelers-detailed-info * Align naming
* Don't mutate array (#3403)dan2024-04-041-5/+5
|