about summary refs log tree commit diff
path: root/src/lib/hooks
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
| |
| * Move onboarding to the withAuthRequired HOCPaul Frazee2023-08-291-23/+0
| |
| * fix onboarding on webAnsh Nanda2023-08-291-0/+23
| |
* | handle stuck state with granular android permissionsEric Bailey2023-08-291-3/+8
|/
* [APP-735] Post language improvements (#982)Paul Frazee2023-07-061-0/+35
| | | | | | | | | | | | | | | | | * Fix composer character-counter bouncing around UI elements * Fix composer toolbar padding when keyboard is dismissed on iOS * Use the full name of the language in the composer footer * Add headings to the DropdownButton * Update the composer language control to use a simpler dropdown * Fix lint * Add translate link to Post component used in notifications * Fix lint
* Fix: re-add the scroll boundary to avoid minimal shell at top of screen (#956)Paul Frazee2023-07-031-2/+10
|
* don't throw, but log OTA listener errors (#958)Ansh2023-07-031-1/+4
|
* fix: stabilize minimalShellMode toggling by introducing modified thresholds ↵Paul Frazee2023-07-021-6/+4
| | | | | | | | | | | | | (supersedes #938) (#942) * add separate scroll up/down thresholds to prevent rapid state changes * set `DY_LIMIT_DOWN` to 150 * Use a different scroll dy limit on web/mobile --------- Co-authored-by: Sehyun Chung <sehyun.chung@icloud.com>
* Use Linking.openSettings() so it works on Android (#865)Logan Rosen2023-06-081-5/+1
|
* [APP-107] OTA updates (#587)Ansh2023-06-021-0/+74
| | | | | | | | | | | | | | | | | | | | | | | | | * add 1000ms fallbackToCacheTimeout * add listener via useOTAUpdate hook and show modal if update is available * finish expo-updates setup * setup useOTAUpdate hook * add 1000ms fallbackToCacheTimeout * add listener via useOTAUpdate hook and show modal if update is available * finish expo-updates setup * setup useOTAUpdate hook * add OTA updates * Update build.md * temporarily disable ota updates * refactor useOTAUpdate code
* Fix a bunch of type errors and add a type-check to the github workflows (#837)Paul Frazee2023-06-021-1/+1
| | | | | | | | | | | | | | | * Add yarn type-check * Rename to yarn typecheck * Fix a collection of type errors * Add typecheck to automated tests * add `dist` to exluded folders tsconfig --------- Co-authored-by: Ansh Nanda <anshnanda10@gmail.com>
* More custom-feed behavior fixes [APP-678] (#831)Paul Frazee2023-06-021-0/+32
| | | | | | | | | | | | | | | | | | | | | * Remove extraneous custom-feed health check * Fixes to custom feed preference sync * Fix lint * Remove dead code (client-side suggested posts constructor) * Enforce the feed-fetch limit in the client if the generator fails to observe the parameter * Bump the number of items fetched in the multifeed per feed from 5 to 10 * Reset the currently active feed when the pinned feeds change * Some fixes to icons * Add a prompt to load latest to the multifeed * Remove debug
* Add feeds tabPaul Frazee2023-05-251-1/+3
|
* Fix the 'dancing header' problem on webPaul Frazee2023-05-251-2/+8
|
* Merge branch 'custom-algos' of github.com:bluesky-social/social-app into ↵Paul Frazee2023-05-241-0/+84
|\ | | | | | | custom-algos
| * make tab bar scroll view draggable on webAnsh Nanda2023-05-241-0/+84
| |
* | Refactor the scroll-to-top UXPaul Frazee2023-05-241-18/+40
|/
* show scroll to top button when scrolling stopsAnsh Nanda2023-05-231-0/+3
|
* Rework the UI for the custom feed viewPaul Frazee2023-05-171-2/+2
|
* Reorganize custom feeds in the view layerPaul Frazee2023-05-171-0/+27
|
* style: remove `useUnreadCountLabel` hack from `50c1841` (#655) (#686)LW2023-05-172-21/+6
| | | | I just realized how `mobx` works (never used before lol) and now I feel dumb.
* feat: Update HTML `title` on web #626 #599 (#655)LW2023-05-162-0/+35
| | | | | | | | | | | | | | | | | | | | | | | For any `Screen` that shows on desktop, `title` is "(1) ... - Bluesky" where "(1)" is the unread notification count. The titles are unlocalized and the string "Bluesky" is hardcoded, following the pattern of the rest of the app. Display names and post content are loaded into the title as effects. Tested: * all screens * screen changes / component mounts/unmounts * long posts with links and images * display name set/unset * spamming myself with notifications, clearing notifications * /profile/did:... links * lint (only my changed files), jest, e2e. New utilities: `useUnreadCountLabel`, `bskyTitle`, `combinedDisplayName`, `useSetTitle`. resolves: #626 #599
* create Alert.tsx and Alert.web.tsx and replace uses (#513)Ansh2023-04-251-1/+1
|