about summary refs log tree commit diff
path: root/src/view/com/util/List.web.tsx
Commit message (Collapse)AuthorAgeFilesLines
* Upgrade `@types/react` to 19 and run codemod (attempt 2) (#8918)Samuel Newman2025-09-091-6/+13
| | | | | | | | | | | | | * update dependencies * rm `import type React from 'react'` * run codemods * patch discord types * update types/react-dom * Update yarn.lock
* Upgrade prettier to 3.6 (#8558)Samuel Newman2025-06-231-3/+8
| | | | | | | * upgrade prettier * run prettier * more files
* [Layout] Base (#6907)Eric Bailey2024-12-051-66/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add common gutter styles as hook * Add computed scrollbar gutter CSS vars * Add new layout components * Replace layout components in settings screens * Remove old back button * Invert web border logic for easier migration * Clean up Slot API * Port over FF handling of scrollbar offset * Trade boilerplate for ease of use * Limit to one line * Allow two lines, fix wrapping * Fix alignment * sticky headers * set max with on header and center * [Layout] Notifications Header (#6910) * Replace notifications screen header * fix cropped indicator --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com> * Replace Hashtag header (#6928) * [Layout] ChatList header (#6929) * Replace ChatList header * update chat settings as well --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com> * Add web borders to Chat settings * Remove unused var * Move ChatList header outside center * Replace empty chat layout * fix breakpoints * [Layout] Scrollbar gutters (#6908) * Fix sidebar alignment * Make sure scrollbars don't hide * Gift left nav more space * Use stable one-edge, update logic in RightNav * Ope * Increase width * Reset * Add transform to sidebars * Remove bg in sidebars * Handle shifts in layout components * Replace scroll-removal handling * Make react-remove-scroll an explicit dep * Remove unused script * use correct scroll insets (#6950) * [Layout] Feeds headers (#6913) * Replace ViewHeader internals, duplicate old ViewHeader * Replace Feeds header * Replace SavedFeeds header * Visual alignment * Uglier but clear * Use old ViewHeader for SavedFeeds * use Layout.Center instead of Layout.Content * use left-aligned header for feed edit * delete unused old view header --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com> * [Layout] Every other screen (#6953) * attempt to fix double borders on every other screen * delete ListHeaderDesktop * delete `SimpleViewHeader` and fix screens (#6956) * Make Layout.Center not full height * Refactor List to use Layout.Center, remove built-in borders * Fix Home screen * Refactor PagerWithHeader to use Layout components * Replace components in ProfileFeed and ProfileList * Borders on Profile * Search screen replacements * use new header for profile subpage header (#6958) * Search AutocompleteResults * use new header for starter pack wizard (#6957) * Fix post thread * Enable borders by default * Moderation muted and blocked accounts * Fix scrollbar offset on Labeler * Remove ScrollView from Moderation * Remove ScrollView from Deactivated * Remove ScrollView from onboarding * Remove ScrollView from SignupQueued * Mark deprecations * fix lint * Fix double borders on profile load * Remove unneeded CenteredView from noty Feed * Remove double Center layout on Notifications screen * Remove double Center layout on ChatList screen * Handle scrollbar offset in chat * Use new atom for other scrollbar offsets * Remove borders from old views * Better doc * Remove temp migration prop * Fix new atom usage on native * Clean up Hashtag screen * Layout docs * Clarify usage in Pager * Handle nested offset contexts * Clean up Layout * fix feeds page * asymmetric header on native (#6969) * Reusable header const * Fix up home header * Add back button to convo * Add hitslop to header buttons * Comment * Better handling on native for new atom * Format * Fix nested flatlist on mod screens * Use react-remove-scroll-bar directly * Fix notification count overflow on web * Clarify doc --------- Co-authored-by: Samuel Newman <mozzius@protonmail.com>
* Fix broken pagination for lists tab on profile page (#6221)Khuddite2024-11-231-2/+2
| | | | | | | | | | | | | | | | | * set onEndReachedThreshold to 2 for ProfileLists * Add a footer for ProfileLists component for consistency * Remove logs * Revert onEndReachedThreshold change on Feed component * Fix threshold defaults to match native * Align lists and feedgens --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* Update Node.js to 20.x in Dockerfile (#6099)Trivikram Kamat2024-11-111-1/+1
| | | | | | | | | | | * Update Node.js to 20.x in Dockerfile * Update Node.js types and engines entry to 20.x * Update Node.js version in .nvmrc * Use node version from .nvmrc in linting job * Use Type Assertion for clearTimeout
* [Settings] Ungate, and remove old settings (#6144)Samuel Newman2024-11-081-1/+3
| | | | | | | | | | | | | | | | | | | * move export car dialog * move disableemail2fadialog * delete old settings screens * fix type error * Update Navigation.tsx * Delete AccountDropdownBtn.tsx * remove old change handle modal * delete add app paswords * forgot to actually delete the change handle modal
* Lower feedfeedback seen threshold to 0.5s (#6127)dan2024-11-051-1/+1
|
* Update Reanimated (#6126)dan2024-11-051-1/+1
| | | | | | | | | * Update Reanimated * Fix types * Fix Reanimated value access warnings * Fix types
* [Videos] Video player - PR #2 - better web support (#4732)Samuel Newman2024-08-071-18/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * attempt some sort of "usurping" system * polling-based active video approach * split into inner component again * click to steal active video * disable findAndActivateVideo on native * new intersectionobserver approach - wip * fix types * disable perf optimisation to allow overflow * make active player indicator subtler, clean up video utils * partially fix double-playing * start working on controls * fullscreen API * get buttons working somewhat * rm source from where it shouldn't be * use video elem as source of truth * fix keyboard nav + mute state * new icons, add fullscreen + time + fix play * unmount when far offscreen + round 2dp * listen globally to clicks rather than blur event * move controls to new file * reduce quality when not active * add hover state to buttons * stop propagation of videoplayer click * move around autoplay effects * increase background contrast * add subtitles button * add stopPropagation to root of video player * clean up VideoWebControls * fix chrome * change quality based on focused state * use autoLevelCapping instead of nextLevel * get subtitle track from stream * always use hlsjs * rework hls into a ref * render player earlier, allowing preload * add error boundary * clean up component structure and organisation * rework fullscreen API * disable fullscreen on iPhone * don't play when ready on pause * debounce buffering * simplify giant list of event listeners * update pref * reduce prop drilling * minimise rerenders in `ActiveViewContext` * restore prop drilling --------- Co-authored-by: Samuel Newman <10959775+mozzius@users.noreply.github.com> Co-authored-by: Hailey <me@haileyok.com>
* [Web] Retrigger onEndReached if needed when content height changes (#4859)dan2024-07-311-3/+32
| | | | | * Extract EdgeVisibility * Key Visibility by container height instead of item count
* change `contentVisibility` to `contain` (#4752)Hailey2024-07-081-22/+25
|
* Fix `onEndReached` not firing sometimes on web (#4728)Hailey2024-07-041-0/+1
| | | | | | | | | | | | | | | * handle off screen visibility observer. * Revert "handle off screen visibility observer." This reverts commit e499ea0ed66b31964f79261b41f58a288b0cdb6f. * key ftw * Remove special case --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* add support for `ListEmptyComponent`, allow `undefined` data (#4403)Hailey2024-06-191-24/+39
| | | | | | | * add support for `ListEmptyComponent`, allow `undefined` data * change `header` and `footer` to be in line with `emptyComponent` * don't render `onEndReached` or `onStartReached` `Visibility` if empty
* add types for `desktopFixedHeight` to `List` (#4356)Hailey2024-06-051-1/+1
| | | | | | | * add types for `desktopFixedHeight` * nit * accept both `number` and `boolean`
* add prop to ListImpl for disabling `content-visibility` style (#4236)Hailey2024-05-301-4/+16
| | | | | | | | | | | | | | | | | * add prop to `ListImpl` for `content-visibility` style * change to `disableContentVisibility` * lint * tweaks * Keep the fix more general * Clarify ambiguity --------- Co-authored-by: Dan Abramov <dan.abramov@gmail.com>
* implement a safari hack for ime (#4186)Hailey2024-05-231-2/+1
| | | | | | | | | remove debug logs use a better hack implement a safari hack extract `isSafari` and `isFirefox` to a global variable
* don't use `contentVisibility` on Firefox (#4164)Hailey2024-05-221-1/+2
|
* FeedFeedback fixes (#3968)dan2024-05-121-1/+1
| | | | | | | | | | | * Lower seen threshold to 1.5s * Send feedContext for replies * Use a simpler and more reliable feedContext fallback --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
* add sideborders prop (#3920)Samuel Newman2024-05-081-1/+3
|
* Implement FeedFeedback API (#3498)Paul Frazee2024-05-071-10/+67
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Implement onViewableItemsChanged on List.web.tsx * Introduce onItemSeen to List API * Add FeedFeedback tracker * Add clickthrough interaction tracking * Add engagement interaction tracking * Reduce duplicate sends, introduce a flushAndReset to be triggered on refreshes, and modify the api design a bit * Wire up SDK types and feedContext * Avoid needless function allocations * Fix schema usage * Add show more / show less buttons * Fix minor rendering issue on mobile menu * Wire up sendInteractions() * Fix logic error * Fix: it's item not uri * Update 'seen' to mean 3 seconds on-screen with some significant portion visible * Fix non-reactive debounce * Move methods out * Use a WeakSet for deduping * Reset timeout * 3 -> 2 seconds * Oopsie * Throttle instead * Fix divider * Remove explicit flush calls * Rm unused --------- Co-authored-by: dan <dan.abramov@gmail.com>
* A few `containWeb` List nits (#3877)Hailey2024-05-061-22/+52
| | | | | | | | | * use getters for returned values * pass ref * add log to `onScroll` in tester * improve expect error
* [🐴] Finalize web message screen (#3868)Hailey2024-05-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * add `onStartReached` to web list * fix `rootMargin` * Add `contain`, handle scroll events * improve types, fix typo * simplify * adjust `scrollToTop` and `scrollToOffset` to support `contain`, add `scrollToEnd` * rename `handleWindowScroll` to `handleScroll` * support basic `maintainVisibleContentPosition` * rename `contain` to `containWeb` * remove unnecessary `flex: 1` * add missing props * add root prop to `Visibility` * add root prop to `Visibility` * revert adding `maintainVisibleContentPosition` * remove unnecessary wrapper * add style * oops * maintain position for web * always apply `flex: 1` to styles when contained * add a contained list to storybook * make `onScroll` a worklet in storybook * revert test code * remove unnecessary `flex: 1`
* Further align web `List` with `FlatList`, add `contain` mode to web list ↵Hailey2024-05-061-21/+111
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implementation (#3867) * add `onStartReached` to web list * fix `rootMargin` * Add `contain`, handle scroll events * improve types, fix typo * simplify * adjust `scrollToTop` and `scrollToOffset` to support `contain`, add `scrollToEnd` * rename `handleWindowScroll` to `handleScroll` * support basic `maintainVisibleContentPosition` * rename `contain` to `containWeb` * remove unnecessary `flex: 1` * add missing props * add root prop to `Visibility` * add root prop to `Visibility` * revert adding `maintainVisibleContentPosition` * oops * always apply `flex: 1` to styles when contained * add a contained list to storybook * make `onScroll` a worklet in storybook * revert test code * add scrolling to storybook * simplify getting scrollable node * nit: extra whitespace * nit: random comment * foolproof the logic * typecheck
* Fix `IntersectionObserver` `rootMargin` in web `List` implementation, add ↵Hailey2024-05-051-8/+30
| | | | | | | `onStartReached` (#3866) * add `onStartReached` to web list * fix `rootMargin`
* Remove side borders on mobile web list (#2994)dan2024-02-271-2/+2
|
* Workaround Safari content-visibility bug (#2699)dan2024-01-301-1/+4
|
* New Web Layout (#2126)dan2024-01-221-0/+341
* 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