about summary refs log tree commit diff
path: root/src/lib/hooks
Commit message (Collapse)AuthorAgeFilesLines
* 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
* Make shell hide/show animation smoother (#1683)dan2023-10-121-3/+4
| | | | | * Make shell hide/show animation smoother * Also animate "load latest"
* Improve typeahead search with inclusion of followed users (temporary ↵Paul Frazee2023-10-051-8/+16
| | | | | | | | | | | solution) (#1612) * Update follows cache to maintain some user info * Prioritize follows in composer autocomplete * Clean up logic and add new autocomplete to search * Update follow hook
* Improve Device Detection For Better Responsiveness (#1512)Bryan Lee2023-09-281-10/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor `useOnMainScroll` function to use responsive device detection - Replace static `isDesktopWeb` with `useWebMediaQueries` hook to enable dynamic device type detection. - Create `useDeviceLimits` hook to dynamically determine `DY_LIMIT_UP` and `DY_LIMIT_DOWN` based on device type. - Update dependency arrays for the `useCallback` hooks to include new dynamic variables. * Refactor styles to be responsive to device type - Create `useStyles` hook that generates styles object based on device type detected from `useWebMediaQueries`. - Replace static styles object with dynamic styles object generated from `useStyles` hook in components. - This allows `paddingLeft` values for 'ul' and 'ol' styles to adapt to device type dynamically. - This allows `maxWidth` values for 'metaItem'' styles to adapt to device type dynamically. * Remove `isDesktopWeb` in favor of `useWebMediaQueries().isDesktop` * Refactor `SplashScreen` component for responsive design * Revision based on review results * Fix isNative check --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Account quick switch modal (#1567)Paul Frazee2023-09-281-0/+41
| | | | | | | | | | | | | | | * quick switch menu * Some small tweaks and fixes to the account switch modal * Factor out the account switcher logic to a hook * Add haptic feedback on account switcher open * Fix bad merge --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* add suggested follow section to profile header (#1481)Eric Bailey2023-09-201-0/+46
| | | | | | | | | | | | | * add suggested follow section to profile header * fix button overflow * don't even render on preview * fix useFollowDid and FollowButton race condition * add section header, close button, active state * lighten icon
* :bug: Handle middle mouse click on feed list items (#1469)Foysal Ahamed2023-09-182-0/+45
| | | | | | | | | | | | | | | * :bug: Handle middle mouse click on feed list items * :recycle: Refactor the event listener and turn it into a dedicated hook for web * :broom: Cleanup unnecessary Link changes * Fix import * Create native version of useAuxClick --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* Updates to use dynamic/responsive styles on web (#1351)Paul Frazee2023-09-051-7/+13
| | | | | | | | | | | | | | | | | | | * Move most responsive queries to the hook * Fix invalid CSS value * Fixes to tablet render of post thread * Fix overflow issues on web * Fix search header on tablet * Fix QP margin in web composer * Fix: only apply double gutter once to flatlist (close #1368) * Fix styles on discover feeds header * Fix double discover links in multifeed
* Merge branch 'ansh/app-812-add-custom-feed-discovery-to-onboarding' into mainPaul Frazee2023-08-301-2/+8
|\
| * More fixes to mobile onboardPaul Frazee2023-08-301-2/+8
| |