about summary refs log tree commit diff
path: root/src/lib/hooks
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* Replace all logs with new loggerEric Bailey2023-11-042-8/+10
|
* Merge pull request #1813 from ↵Eric Bailey2023-11-042-8/+8
|\ | | | | | | | | bluesky-social/eric/app-903-extract-logger-into-singleton Add new logger
| * Fix other error logs while I'm at itEric Bailey2023-11-041-2/+2
| |
| * Fix immediate TS errorsEric Bailey2023-11-041-6/+6
| |
* | ListAddUser modal UX improvements (#1809)Paul Frazee2023-11-031-1/+1
|/ | | | | | | * typo * Add loading state to ListAddUser * Improve UI/UX of ListAddUser
* Lists updates: curate lists and blocklists (#1689)Paul Frazee2023-11-013-15/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add lists screen * Update Lists screen and List create/edit modal to support curate lists * Rework the ProfileList screen and add curatelist support * More ProfileList progress * Update list modals * Rename mutelists to modlists * Layout updates/fixes * More layout fixes * Modal fixes * List list screen updates * Update feed page to give more info * Layout fixes to ListAddUser modal * Layout fixes to FlatList and Feed on desktop * Layout fix to LoadLatestBtn on Web * Handle did resolution before showing the ProfileList screen * Rename the CustomFeed routes to ProfileFeed for consistency * Fix layout issues with the pager and feeds * Factor out some common code * Fix UIs for mobile * Fix user list rendering * Fix: dont bubble custom feed errors in the merge feed * Refactor feed models to reduce usage of the SavedFeeds model * Replace CustomFeedModel with FeedSourceModel which abstracts feed-generators and lists * Add the ability to pin lists * Add pinned lists to mobile * Remove dead code * Rework the ProfileScreenHeader to create more real-estate for action buttons * Improve layout behavior on web mobile breakpoints * Refactor feed & list pages to use new Tabs layout component * Refactor to ProfileSubpageHeader * Implement modlist block and mute * Switch to new api and just modify state on modlist actions * Fix some UI overflows * Fix: dont show edit buttons on lists you dont own * Fix alignment issue on long titles * Improve loading and error states for feeds & lists * Update list dropdown icons for ios * Fetch feed display names in the mergefeed * Improve rendering off offline feeds in the feed-listing page * Update Feeds listing UI to react to changes in saved/pinned state * Refresh list and feed on posts tab press * Fix pinned feed ordering UI * Fixes to list pinning * Remove view=simple qp * Add list to feed tuners * Render richtext * Add list href * Add 'view avatar' * Remove unused import * Fix missing import * Correctly reflect block by list state * Replace the <Tabs> component with the more effective <PagerWithHeader> component * Improve the responsiveness of the PagerWithHeader * Fix visual jank in the feed loading state * Improve performance of the PagerWithHeader * Fix a case that would cause the header to animate too aggressively * Add the ability to scroll to top by tapping the selected tab * Fix unit test runner * Update modlists test * Add curatelist tests * Fix: remove link behavior in ListAddUser modal * Fix some layout jank in the PagerWithHeader on iOS * Simplify ListItems header rendering * Wait for the appview to recognize the list before proceeding with list creation * Fix glitch in the onPageSelecting index of the Pager * Fix until() * Copy fix Co-authored-by: Eric Bailey <git@esb.lol> --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Performance optimization (#1676)Ansh2023-10-131-21/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * upgrade sentry to support profiling monitoring * remove console logs in production builds * feeds tab bar and bottom bar animation centralized * refactor FeedPage out of Home * add script to start in production mode * move FAB inner to reanimated * move FABInner back to `Animated` RN animation * add perf commands * add testing with Maestro and perf with Flashlight * fix merge conflicts * fix resourceClass name in eas.json * fix onEndReachedThreshold in Feed * memoize styles * go back to old styling for LoadLatestBtn * remove reanimated code from useMinimalShellMode * move shell animations to hook/reanimated for perf * fix empty state issue * make shell animation feel smoother * make shell animation more smooth * run animation with autorun * specify keys for tab bar properly * remove comments * remove already imported dep * fix lint * add testing instructions * mock sentry-expo for jest * fix jest mocks * Fix the load-latest button on desktop and tablet * Fix: don't move the FAB in tablet mode * Fix type error * Fix tabs bar positioning on tablet * Fix types --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Don't re-render bars when showing/hiding them (#1691)dan2023-10-131-16/+19
| | | | | | | * Don't re-render bars when showing/hiding them * Fix more cases * Use autorun instead of reaction to fix first render