about summary refs log tree commit diff
path: root/src/view/screens/Home.tsx
Commit message (Collapse)AuthorAgeFilesLines
* demo modeSamuel Newman2025-04-231-7/+58
|
* Better tablet layout (#7656)Samuel Newman2025-02-251-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * better tablet layout * adjust left nav spacing * add right nav to pwi * clearer logic * fix a couple screens that don't need the tablet layout * fix horiz scroll bar * fix double trending * fix ts-ignore * fix labeller screen * don't offset things within dialogs * fix load latest button (and add scale animation) * center loader on home screen * adjust break points * adjust left nav spacing * fix load latest btn (again) * add lang select to right nav if left nav is minimal * fix double scrollbar on tiny screens * fix scrollbar * fix type errors
* Fix crash when nothing is pinned (#7510)dan2025-01-201-16/+21
|
* Fix PWIDan Abramov2025-01-201-0/+1
|
* yolo (#7499)Hailey2025-01-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * tweaks to constants (#7478) * add did * use correct did * typo * tweak * Prevent Drawer gesture conflicting with Suggestions scroll (#7468) * Extract BlockDrawerGeesture * Block drawer when scrolling interstitials (cherry picked from commit 9e3f2f43745eed9c71cb985e48135b7363d91aa9) * yolo interstitial * yolo mode * right swipe * fix nav gesture * vibe controls * collapsible post text * rm blurview, cover for tall videos * smarter video source handling * use thumbnails, improve perf significantly * better android loading * improve aspect ratio * optimize source changes * rm spinner on ios * whoops, remove debug `false` * FIX WRONG VIDEOS SHOWING UP * don't spring on way down * release video players when leaving screen * remove jank animation * Add grid * improve contract, fix double tap * Filter out posts without videos * Only do grid on native * Pipe through feedSourceUri and link to feed * Handle passed through params * Partial revert, just filter posts to start at index * Clean up cards, remove entry interstitial * Tweak handle * Change constant name * Rename some things * Make types legit * Clean up more naming * Add placeholder for grid view * Handle web, set up new organization * Begin work on Header * Replace types * Squashed commit of the following: commit 3d1be4c0f19789dd3c5a3572ec1acd744a2edb80 Author: Samuel Newman <mozzius@protonmail.com> Date: Fri Jan 17 01:08:05 2025 +0000 extend animation commit c9f199413b018efcbd9d8d2a58dd05eb41e7acb7 Author: Samuel Newman <mozzius@protonmail.com> Date: Fri Jan 17 01:01:24 2025 +0000 fix gap commit 22e520795f50efda176f21a5e967cb27d0cdd907 Author: Samuel Newman <mozzius@protonmail.com> Date: Fri Jan 17 00:50:16 2025 +0000 thinner bar, format time commit c32427f21405294ed3567545629a2964c4af59fe Author: Samuel Newman <mozzius@protonmail.com> Date: Fri Jan 17 00:47:57 2025 +0000 fix 2 in 3 screens commit cbf84c08d64ca0a08ba9070ef5db918f89aa4296 Author: Samuel Newman <mozzius@protonmail.com> Date: Fri Jan 17 00:45:46 2025 +0000 rm unneeded var commit 7e0e100177bb1cd0e64c0841bb7685c7f1eb857f Author: Samuel Newman <mozzius@protonmail.com> Date: Fri Jan 17 00:41:18 2025 +0000 scrubberrrrr * use white with opacity rather than gray * Simultaneous gesture * cleanup attempt * fix jank * link to profile on press * fix jitter fr this time * mostly fix android flicker * Maybe fix row generation * Add content hider to video card * emoji in post text * reduce update rate * fix type error * Fix grid layout trailing single item * Add Discover interstitial, settings, includes pin for now * Explore interstitial, handle dimissal, pinning, compact card * Only use grid placeholder on native * Update events * Add feature gate * android nav bar fixes + lower update speed * fix interval + decel rate on interstitials * attempt to fix broken scrub on android (not working) * follow button * Part out the interstitials for perf, add view more * Remove prod web route * Wrap interstitials with BlockDrawerGesture * Bring video cropping in line with images (#7462) * Mimic image cropping for videos on web * Same on native * Rename variables for clarity * Fix Android scrubbing * Add FeedFeedbackProvider * Remove swipe gesture * fix light status bar behaviour * bump * feedback * Copy pasta to new location * Copy pasta part deux * Filter only videos * Make whole text clickable to expand (cherry picked from commit 4cf31120779f4e06eb4c296b3d4b53814d432b07) * move scrubber to own file * end card * add icon to end card * add min view time to viewability config * play haptic on like * tweak feedback * tweak feedback again * Moderation (cherry picked from commit 6b6b471cfb363031284b3e7a1f6e0ade3ac4ae47) * remove bad check * fix feedback for new video grid * change prop name to items as well * Simplify logic * Fix mod footer * Give scrubber more space on android * Add subtle track behind scrubber, adjust opacity * wire in feed context again... * Add better a11y desc to card * Fix key issue * Update a11y copy * Fix scrubber height * improve scrubber animation * Make follow button more obvious * Make header back button more clear * Disable interactions with actual video el * keep content away from the bottom safe area * fix blur * fix moderation issue * improve contrast on mod screen * Make moderation static per item * Memoize rows * Optimizations * Take video moderation into account * Only blur titles for list blur * Change copy * Bump blur radius * animate text in both directions * Rm unused field * Filter by root early * Refactor for clarity * add compose prompt to scrubber * rm log * tweak gradient * Bump SDK, use contentMode to power video feed * Ensure ProfileFeed view also supports video feed * improve scrubber on android * rm border from footer * Update prod video feed did * Separate caches * Add lil hover to View More * Fix undefined logic, remove header for interstitial * Ungate * Fix stuckness * remove extra useless map * Fix effect cleanup * Send seen without cleanup * Simplify react stuff * Earlier early return to avoid loading flash * remove scrubber placeholder * Remove opacity hack * Render useEvent conditionally * Fix Android flash --------- Co-authored-by: dan <dan.abramov@gmail.com> Co-authored-by: Samuel Newman <mozzius@protonmail.com> Co-authored-by: Eric Bailey <git@esb.lol>
* Fix drawer swipe (#7007)dan2024-12-101-9/+3
| | | | | | | | | | | | | | | | | | | * Fix drawer swipe * Remove existing setDrawerSwipeDisabled management This is already pretty error-prone. And with tracking whether we're idle it's going to get more complicated. Let's pause and think. * Move setDrawerSwipeDisabled logic into Pager * Remove win/2 threshold It feels super arbitrary and breaks muscle memory. If the gesture is reliable, we shouldn't need it. * Maybe work around iOS freeze * Tweak gestures, add comments * Tune gestures
* [Nicer Tabs] New native pager (#6868)dan2024-12-031-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove tab bar autoscroll This will be replaced by a different mechanism. * Track pager drag gesture in a worklet * Track pager state change in a worklet * Track offset relative to current page * Sync scroll to swipe * Extract TabBarItem * Sync scroll to swipe properly * Implement all interactions * Clarify more hacks * Simplify the implementation I was trying to be too smart and this was causing the current page event to lag behind if you continuously drag. Better to let the library do its job. * Interpolate the indicator * Fix an infinite swipe loop * Add TODO * Animate header color * Respect initial page * Keep layouts in a shared value * Fix profile and types * Fast path for initial styles * Scroll to initial * Factor out a helper * Fix positioning * Scroll into view on tap if needed * Divide free space proportionally * Scroll into view more aggressively * Fix corner case * Ignore spurious event on iOS * Simplify the condition Due to RN onLayout event ordering, we know that by now we'll have container and content sizes already. * Change boolean state to enum * Better syncing heuristic * Rm extra return
* [Nicer Tabs] Fork TabBar, simplify Pager (#6762)dan2024-12-031-12/+3
| | | | | | | | | | | | | | | | | | | | | * Fork TabBar.web.tsx * Trim dead code from both forks * Remove onPageSelecting event It's difficult to tell what exactly it's supposed to represent, and in practice it's not really used aside from logging. Let's rip it out for now to keep other changes simpler. * Remove early onPageSelected call It was added to try to do some work eagerly when we're sure which way the scroll is snapping. This is not necessarily a good idea though. It schedules a potentially expensive re-render right during the deceleration animation, which is not great. Whatever we're optimizing there, we should optimize smarter (e.g. prewarm just the network call). The other thing it used to help with is triggering the pager header autoscroll earlier. But we're going to rewrite that part differently anyway so that's not relevant either. * Prune more dead code from the native version We'll have to revisit this when adding tablet support but for now I'd prefer to remove a codepath that is not being tested or ever run. * Use regular ScrollView on native The Draggable thing was needed for web-only behavior so we can drop it in the native fork.
* Prefetch adjacent Home pages (#6904)dan2024-12-031-1/+4
|
* [Statsig] Remove client downsampling (#6153)Hailey2024-11-151-6/+3
|
* Remove top padding from shell, move down into individual screens (#5548)Samuel Newman2024-10-141-9/+12
|
* Ensure app clip works even with `starter-pack` (#5664)Hailey2024-10-091-9/+30
|
* Set fixed_bottom_bar to true (#5203)dan2024-09-071-32/+2
|
* Remove logging of following prefs (#5021)dan2024-08-291-28/+2
|
* Remove new_user_guided_tour and tour code (#5023)dan2024-08-291-9/+1
|
* Fix fixed footer experiment (#4969)dan2024-08-221-3/+3
| | | | | | | | | | | | | | | | | * Split minimal shell mode into headerMode and footerMode For now, we'll always write them in sync. When we read them, we'll use headerMode as source of truth. This will let us keep footerMode independent in a future commit. * Remove fixed_bottom_bar special cases during calculation This isn't the right time to determine special behavior. Instead we'll adjust footerMode itself conditionally on the gate. * Copy-paste setMode into MainScrollProvider This lets us fork the implementation later just for this case. * Gate footer adjustment in MainScrollProvider This is the final piece. Normal calls to setMode() keep setting both header and footer, but MainScrollProvider adjusts the footer conditionally.
* [Experiment] Always show bottom bar (#4946)dan2024-08-161-1/+7
|
* Add logging of selected feed preference when displaying the following feed ↵Hailey2024-08-071-2/+28
| | | | (#4789)
* Guided tour for new users (#4690)Paul Frazee2024-07-021-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add home guided tour (WIP) * Add web handling of the tour * Switch to our fork of rn-tourguide * Bump guided-tour * Fix alignment on android * Implement home page tour trigger after account creation * Add new_user_guided_tour gate * Add a title line to the tour tooltips * A11y improvements: proper labels, focus capture, scroll capture * Silence type error * Native a11y * Use FocusScope * Switch to useWebBodyScrollLock() --------- Co-authored-by: Eric Bailey <git@esb.lol>
* ensure we get navigated away to starter pack when signed in (#4640)Hailey2024-06-251-0/+17
| | | | | * ensure we get navigated away to starter pack when signed in * clean
* Starter Packs (#4332)Hailey2024-06-211-1/+1
| | | | | | | Co-authored-by: Dan Abramov <dan.abramov@gmail.com> Co-authored-by: Paul Frazee <pfrazee@gmail.com> Co-authored-by: Eric Bailey <git@esb.lol> Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Check `canAskAgain` for notification permissions (#4460)Hailey2024-06-101-0/+6
|
* [Statsig] Sample noisy events (#4288)dan2024-05-301-3/+6
| | | | | | | * Sample state:background and state:foreground * Sample feed events * Add DEV protection against forgetting to add events to the list
* adjust notifications experiment by removing `canAskAgain` (#4271)Hailey2024-05-301-7/+0
| | | | | * adjust notifications experiment by removing `canAskAgain` * move to `StepFinished` for after onboarding
* Cleanup gates (#4170)dan2024-05-221-8/+5
| | | | | | | | | * Unlaunch disable_poll_on_discover_v2 * Rm unused gates * Unlaunch autoexpand_suggestions_on_profile_follow_v2 * Launch disable_min_shell_on_foregrounding_v3
* Move request for notifications permissions to `HomeReadyScreen` (#3977)Hailey2024-05-131-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cleanup the current logic * add statsig logs * implement requests for permissions where needed * oops * let `addPushTokenListener` handle the token registration * place new log event type with the other `notifications` type * place registration next to handler * more organization * only call `gate()` if permission is not yet granted * be more specific to prevent gate pollution * nit * make `token` non-optional in `registerToken` * remove `prevDid`, move `registerPushToken` into `useEffect` * keep it outside actually * nit
* Movable following feed (#3593)Eric Bailey2024-05-111-47/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* Only run "disable min shell on foregrounding" behaviour if on the home ↵Samuel Newman2024-05-021-14/+16
| | | | | | | screen (#3825) * change useEffect to useFocusEffect * v2 -> v3
* [Statsig] Update experiments (#3617)dan2024-04-191-4/+14
|
* [Statsig] Make gate checks lazily (#3594)dan2024-04-181-10/+9
|
* Enable updates for `production` behind `receive_updates` gate (#3496)Hailey2024-04-121-0/+3
| | | | | | | | | | | * add gate type * gate the updates * enable updates in `production` * web placeholder for `useOTAUpdates()` * update comment
* PWI improvements (#3489)Paul Frazee2024-04-121-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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>
* [Statsig] Instrument feed display (#3455)dan2024-04-091-2/+28
| | | | | * [Statsig] Instrument feed display * Back out leftover change
* [Experiment] Disable min shell on foregrounding (#3430)dan2024-04-081-13/+31
|
* Sticky desktop header (#3077)dan2024-03-011-2/+1
|
* Use selected feed for window title on Home (#3016)dan2024-02-281-0/+3
|
* Fix wrong feed being shown (#3015)dan2024-02-281-2/+3
|
* Refactor feed header components (#2964)dan2024-02-221-2/+2
| | | | | | | | | | | * Move home-related files to view/com/home * Add HomeHeader in front of FeedTabBar * Move isDekstop check outside FeedsTabBar * Remove PWI logic from tabbar * Separate platform-specific layout from shared logic
* Keep pager feeds in sync with the right pane (#2775)dan2024-02-081-13/+18
| | | | | | | | | | | * Hoist selected feed state * Seed state from params * Refine and fix logic * Fix scroll restoration * Soft reset on second click
* Refactor Home feed pager rendering logic (#2768)dan2024-02-061-81/+48
| | | | | * Use new persistence API for selected feed * Refactor Home feeds pager data source
* Remove dead code for pager (#2651)dan2024-02-051-4/+2
|
* Add a new home feed-api wrapper and give a header indicating the fallback ↵Paul Frazee2024-01-151-2/+1
| | | | | | | | | behavior (#2534) * Add a new home feed-api wrapper and give a header indicating the fallback behavior * Sneak in a quick fix: use the correct text color in the delete modal * Use imported constant
* New user home feed fixes (#2421)Paul Frazee2024-01-041-1/+4
| | | | | | | * Readd discover to default feeds for new users * Fallback just to discover in home when mergefeed is disabled * Always provide a cursor with mergefeed (no 'end of feed' condition)
* Fix blank home screen (close #2281) (#2291)Paul Frazee2023-12-241-3/+10
|
* Use same source for pinned feeds on Home and tab/sidebars (#2235)Eric Bailey2023-12-181-4/+9
|
* PWI behavior updates (#2207)Paul Frazee2023-12-141-6/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Enable PWI * Disable access to feeds on PWI * Remove feeds nav item from drawer when signed out * Replace discover feed on home with a CTA * Wire up the sign in and create account buttons to go straight to their respective screens * Give a custom ScreenHider interface for no-pwi * Add side borders on desktop to the screen hider * Filter accounts in the autocomplete according to mod settings * Trim replies in the post thread that are pwi opt-out * Show 'learn more' on the content hider when no-override is enabled * Apply the moderation filter on profile cards * Disable post search on logged-out view * Update locale files * Bump api pkg * Ensure feeds with no posts don't show as NSFPublic * Fix types --------- Co-authored-by: Eric Bailey <git@esb.lol>
* Grab-bag of post-feed improvements (#2140)Paul Frazee2023-12-071-1/+1
| | | | | | | * Sanity check against cases where empty pages may occur * Use the mergefeed as an emergency fallback to an empty feed * Check for new posts on focus
* Fix: correctly identify if the screen is focused when handling soft resets ↵Paul Frazee2023-12-051-5/+4
| | | | on post feeds (#2100)
* Merge branch '2047-last-active-tab' of ↵Paul Frazee2023-12-041-9/+51
|\ | | | | | | https://github.com/CooperEdmunds/social-app into CooperEdmunds-2047-last-active-tab
| * Track active page using string instead of indexCooper Edmunds2023-12-041-27/+35
| |