about summary refs log tree commit diff
path: root/src/lib/hooks
Commit message (Collapse)AuthorAgeFilesLines
...
* [Session] Extract selectAccount out (#3812)dan2024-05-021-5/+11
|
* Session fixes, pt. 1 (#3762)dan2024-04-301-5/+14
| | | | | | | | | | | | | | | | | * Update persisted schema for new source of truth, implement in existing session (cherry picked from commit b1e5f12baee932721d66c60dd51c981b46b0c274) * Improve toasts, log caught error, during switch account (cherry picked from commit fe0d1507063d2e532b7b1a447670b689292d1dc3) * Handle thrown errors from initSession during login (cherry picked from commit 2c85c045917e923901284b9ba310a82e28f37b5c) --------- Co-authored-by: Eric Bailey <git@esb.lol>
* [Clipclops] New routes with placeholder screens (#3725)Samuel Newman2024-04-271-1/+4
| | | | | | | | | | | * add new routes with placeholder screens * gate content * add filled envelope style * swap filled state * switch to `useAgent`
* properly close the switch account dialog (#3558)Hailey2024-04-221-14/+4
| | | | | | | | | | | | | | | | | | | * properly close the switch account dialog * use it for switch account as well * ensure dialog is closed on unmount Revert "properly check if the ref is null" This reverts commit 8f563808a5d39389b0bc47a31e73cd147d1e7e8b. properly check if the ref is null ensure dialog is closed on unmount * Revert "ensure dialog is closed on unmount" This reverts commit a48548fd8ed53ae3eb08a0e05bb89f641c112b95.
* remove gate from updates (#3646)Hailey2024-04-221-3/+1
|
* [Statsig] Make gate checks lazily (#3594)dan2024-04-181-2/+2
|
* Enable updates for `production` behind `receive_updates` gate (#3496)Hailey2024-04-122-34/+37
| | | | | | | | | | | * add gate type * gate the updates * enable updates in `production` * web placeholder for `useOTAUpdates()` * update comment
* migrate to `expo-application` (#3417)Hailey2024-04-041-2/+2
| | | | | * migrate to `expo-application` * replace additional usage
* Add OTA updates support for `testflight` channel (#3291)Hailey2024-04-031-0/+142
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * some progress another adjustment, testing another adjustment, testing fix again fix again set default runtime version fix test this script test this script test this script add build numbers to the deployment url clean give script access to build number add `useBuildNumberEnv` without a bump new line fix missing async add channel name to deployment url add updates check on launch for testflight users ver bump init updates on launch for native add `testflight` as default in build submit add is_testflight check * disable inline predictions to prevent ios composer jank * temp bump * Revert "temp bump" This reverts commit 44c51134a35d817c73edb1e635495597c95117b3. * adjustments version bump adjust fixes test * cleanup and finalize drop check down to every 15 minutes adjustments change to 15 mins use jq to get version if necessary rm test on push figured it out remove nightly testflight releases test again again again again again AGAIN ONCE MORE test again again again again again AGAIN test again again again again again AGAIN test again again again again again test again again again again test again again again test again again test again test test test run deploy if necessary run deploy if necessary run deploy if necessary run deploy if necessary run deploy if necessary remove test message fix environment oops cleanup merge in changes * remove unnecessary `workflow_call` * remove changes that have been merged into main now * finalize android update git ignore rm test stuff from the bundle action remove test message test message fix test message test message few android fixes few android fixes fix jq add a test message fix slack webhook create android deployments test 2 create android deployments add `testflight-android` profile to eas.json more cleanup some more cleanup simplify some logic remove unnecessary channel rename to `useOTAUpdates` * rm test portion
* [Statsig] Track login/logout (#3286)dan2024-03-191-2/+6
| | | | | * [Statsig] Track login/logout * Fix missing attribution
* remove scrollbar gutter for Chrome when body scroll is lockedAlexander K2024-03-171-0/+2
|
* ALF confirmation dialogs (Dialogs Pt. 3) (#3143)Hailey2024-03-121-37/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Improve a11y on ios * Format * Remove android * Fix android * ALF confirmation dialog * Use ALF for Delete Post confirmation organize diff fix text minimize change copy alternative confirm prompt revert type changes add ButtonColor param * small adjustment to buttons in prompt * full width below gtmobile * update hide post dialog * space out dialogs * update dialogs for lists * add example * add to app passwords * Revert some changes * use sharedvalue for `importantForAccessibility` * add back `isOpen` * fix some more types * small adjustment to buttons in prompt * full width below gtmobile * update the rest of the prompts rm old confirm modal rm update prompt feed error prompt feed source card and profile block/unblock composer discard * Update src/view/screens/AppPasswords.tsx Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com> * lint * How about a default * Reverse reverse * Port over confirm dialogs * Add some comments * Remove unused file * complete merge * add testID where needed --------- Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: surfdude29 <149612116+surfdude29@users.noreply.github.com>
* Dedupe navigation events (push, navigate, pop, etc) (#3179)Hailey2024-03-122-0/+97
|
* Adjust FlatList performance in main feeds (#3134)Hailey2024-03-061-0/+11
| | | | | | | | | * adjust flatlist perf settings * calculate initial num to render based on screen height * adjust window size * don't react to screen height changes
* Simplify intent path logic, ensure all variations work for bluesky://, ↵Hailey2024-03-011-9/+11
| | | | | | | bluesky:///, and https://bsky.app/ (#3045) * Simplify intent path logic, ensure all variations work * use startsWith
* close open dialogs when deep linking to composer (#3020)Hailey2024-02-281-1/+5
|
* Share Extension/Intents (#2587)Hailey2024-02-271-6/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add native ios code outside of ios project * helper script * going to be a lot of these commits to squash...backing up * save * start of an expo plugin * create info.plist * copy the view controller * maybe working * working * wait working now * working plugin * use current scheme * update intent path * use better params * support text in uri * build * use better encoding * handle images * cleanup ios plugin * android * move bash script to /scripts * handle cases where loaded data is uiimage rather than uri * remove unnecessary logic, allow more than 4 images and just take first 4 * android build plugin * limit images to four on android * use js for plugins, no need to build * revert changes to app config * use correct scheme on android * android readme * move ios extension to /modules * remove unnecessary event * revert typo * plugin readme * scripts readme * add configurable scheme to .env, default to `bluesky` * remove debug * revert .gitignore change * add comment about updating .env to app.config.js for those modifying scheme * modify .env * update android module to use the proper url * update ios extension * remove comment * parse and validate incoming image uris * fix types * rm oops * fix a few typos
* Intent handler (#2992)Hailey2024-02-271-0/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Handle URL params * Add resources * Add other params * refactor for scope * modify the pr to support intents rather than utm remove linebreak remove linebreak handle web adjust path check to work on web add a short delay for opening the composer setup compose intent, move to `intents` directory fix intent logic ignore incoming intents in the navigation router * refactor --------- Co-authored-by: Eric Bailey <git@esb.lol>
* fix web aux click on all browsers (#2633)Hailey2024-02-062-45/+0
|
* Clean up some sentry logs (#2630)Eric Bailey2024-01-251-1/+1
| | | | | | | * Change prop name for sentry ingestion * Fix test * Add default object
* New Web Layout (#2126)dan2024-01-223-0/+83
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Rip out virtualization on the web * Screw around with layout * onEndReached * scrollToOffset * Fix background * onScroll * Shell bars * More scroll * Fixes * position: sticky * Clean up 1 * Clean up 2 * Undo PagerWithHeader changes and fork it * Trim down both versions * Cleanup 3 * Memoize, lint * Don't scroll away modal or lightbox * Add content-visibility for rows * Fix composer * Fix types * Fix borked scroll animation * Fixes to layout * More FlatList parity * Layout fixes * Fix more layout * More layout * More layouts * Fix profile layout * Remove onScroll * Display: none inactive pages * Add an intermediate List component * Fix type * Add onScrolledDownChange * Port pager to use onScrolledDownChange * Fix on mobile * Don't pass down onScroll (replacement TBD) * Remove resetMainScroll * Replace onMainScroll with MainScrollProvider * Hook ScrollProvider to pager * Fix the remaining special case * Optimize a bit * Enforce that onScroll cannot be passed * Keep value updated even if no handler * Also memo it * Move the fork to List.web * Add scroll handler * Consolidate List props a bit * More stuff * Rm unused * Simplify * Make isScrolledDown work * Oops * Fixes * Hook up context scroll handlers * Scroll restore for tabs * Route scroll restoration POC * Fix some issues with restoration * Remove bad idea * Fix pager scroll restoration * Undo accidental locale changes * onContentSizeChange * Scroll to post * Better positioning * Layout fixes * Factor out navigation stuff * Cleanup * Oops * Cleanup * Fixes and types * Naming etc * Fix crash * Match FL semantics * Snap the header scroll on the web * Add body scroll lock * Scroll to top on search * Fix types * Typos * Fix Safari overflow * Fix search positioning * Add border * Patch react navigation * Revert "Patch react navigation" This reverts commit 62516ed9c20410d166e1582b43b656c819495ddc. * fixes * scroll * scrollbar * cleanup unrelated * undo unrel * flatter * Fix css * twk
* Bump react-native to 0.73.1, expo to 50 (#2214)Eric Bailey2023-12-231-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * Bump to react-native@0.73, bump expo@next Includes bumps for all expo deps and dev dependencies. Updates react-native patch and others, and removes the babel-preset-expo patch. * Remove duplicate Splash ref * Bump more deps * Properly install expo-notifications * Bump webview dep * Bump packages according to expo fix; remove pager-view patch as it is no longer needed * Don't access expo-camera from Web * Fix crypto dep on web * Fix some type issues * Build esnext modules to support dynamic imports --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Make scroll handling contextual (#2200)dan2023-12-131-125/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add an intermediate List component * Fix type * Add onScrolledDownChange * Port pager to use onScrolledDownChange * Fix on mobile * Don't pass down onScroll (replacement TBD) * Remove resetMainScroll * Replace onMainScroll with MainScrollProvider * Hook ScrollProvider to pager * Fix the remaining special case * Optimize a bit * Enforce that onScroll cannot be passed * Keep value updated even if no handler * Also memo it
* Memoize usePalette (#2201)dan2023-12-131-34/+38
|
* Fix scroll on native (#2170)dan2023-12-112-42/+41
|
* Fix scroll on profile lists/feeds (#2168)dan2023-12-112-41/+42
|
* Fixes issue with (#2119)Ansh2023-12-071-3/+3
| | | | | | | | | | | * Allow going directly to password input screen when switching accounts and password is required * Revise state handling * Handle logged out states, enable clearing requestedAccount --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Navigate Home on account switch (#2138)dan2023-12-071-12/+7
|
* Improve account switching on mobile (#2135)Eric Bailey2023-12-071-1/+9
| | | | | * Improve account switching on mobile * Clarify comment
* Fix scuffed web styles caused by overlapping viewport breakpoint boundaries ↵Cλctys2023-11-301-2/+2
| | | | | | | | | (#1985) * fixed lack of styles on 1300px web viewport width by adjusting tablet breakpoints * fixed lack of styles on 800px web viewport width by adjusting mobile breakpoints * changed `maxWidth` values in viewports to `n - 1` format
* Add enter/exit animations to modals on web (#2042)Samuel Newman2023-11-301-11/+11
| | | | | | | * add reanimated layout animations to modals * reorder imports * pass context to scroll handler patches
* Close modals if switching to unauthed account (#2039)Eric Bailey2023-11-291-0/+1
|
* Show logged out view when adding accounts (#2020)Ansh2023-11-291-5/+18
| | | | | | | | | | | | | * show logged out view when adding accounts * Handle existing signed-in account * Show which account is currently logged in * Fix showing toasts --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Nav home after switch accounts (#2002)Eric Bailey2023-11-271-2/+14
|
* Hindi Internationalization (#1914)Ansh2023-11-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | * get basic hindi support to work * get web app language switcher in * Refactor i18n implementation and remove unused code * add missing strings * add dropdowns and modals missing strings * complete all hindi translations * fix merge conflicts * fix legeacy persisted state * fix data in RecommendedFeeds * fix lint
* Fix jumpy modal regression (#1945)dan2023-11-161-0/+23
|
* Add a mutation queue to fix race conditions in toggles (#1933)dan2023-11-161-0/+98
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Prototype a queue * Track both current and pending actions * Skip unnecessary actions * Commit last confirmed state to shadow * Thread state through actions over time * Fix the logic to skip redundant mutations * Track status * Extract an abstraction * Fix standalone mutations * Add types * Move to another file * Return stable function * Clean up * Use queue for muting * Use queue for blocking * Convert other follow buttons * Don't export non-queue mutations * Properly handle canceled tasks * Fix copy paste
* Close active elems (react-query refactor) (#1926)Paul Frazee2023-11-161-18/+4
| | | | | | | | | * Refactor closeAny and closeAllActiveElements * Add close lightbox * Switch to hooks * Fixes
* Port Profile Followers/Follows to RQ (#1893)dan2023-11-141-55/+0
| | | | | | | | | | | | | | | | | * Port user followers to RQ * Port user follows to RQ * Start porting FollowButton to RQ * Fix RQ key * Check pending * Fix shadow and pending states * Rm unused * Remove last usage of useFollowProfile
* Factor our feed source model (#1887)Eric Bailey2023-11-131-18/+0
| | | | | | | | | | | | | | | | | | | | | * 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-132-80/+0
| | | | | | | | | | | * Update useHomeTabs * Use queryClient to fetch * Replace useHomeTabs and useDesktopRightNavItems * Fix type error * Some cleanup
* Refactor notifications to use react-query (#1878)Paul Frazee2023-11-121-8/+4
| | | | | | | | | | | | | | | | | | | | | | | * Move broadcast channel to lib * Refactor view/com/post/Post and remove temporary 2 components * Add useModerationOpts hook * Refactor notifications to use react-query * Fix: only trigger updates in useModerationOpts when the values have changed * Implement unread notification tracking * Add moderation filtering to notifications * Handle native/push notifications * Remove dead code --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Push useAnimatedScrollHandler down everywhere to work around bugs (#1866)dan2023-11-102-9/+49
| | | | | | | * Move useOnMainScroll handlers to leaves * Force Feed to always take handlers * Pass handlers from the pager
* Merge pull request #1860 from bluesky-social/eric/startupEric Bailey2023-11-101-30/+27
|\ | | | | Web login/signup and shell
| * Web login/signup and shellEric Bailey2023-11-091-30/+27
| |
* | Work around web stale closure bug in Reanimated (#1865)dan2023-11-103-6/+47
|/
* Sync top/bottom bar disappearance to the scroll (#1855)dan2023-11-092-81/+94
| | | | | | | | | | | | | | | | | * Disable existing code that toggles shell * Make shell mode a float * Translate based on the gesture * Track header and footer heights * Add web support * Fix types and cleanup * Add back isScrolled logic * Add comments
* Hide/show header and footer without re-renders, take two (#1849)dan2023-11-092-31/+35
| | | | | | | | | * Remove callsites using the state value * Remove unused code * Change shell mode without re-renders * Adjust "write your reply" for mode
* Add modal state provider, replace usage except methods (#1833)Eric Bailey2023-11-082-5/+8
| | | | | | | | | | | | | * Add modal state provider, replace usage except methods * Replace easy spots * Fix sticky spots * Replace final usages * Memorize context objects * Add more warnings
* Extract shell state into separate context (#1824)Eric Bailey2023-11-073-20/+27
| | | | | | | | | | | | | | | | | * WIP * Add shell state * Integrate new shell state for drawer and minimal shell mode * Replace isDrawerSwipeDisabled * Split shell state into separate contexts to avoid needless re-renders * Fix typo --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>