[PR #1] [MERGED] feat: update readme with some new info #4

Closed
opened 2025-10-15 11:54:55 +00:00 by ershisan99 · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/ershisan99/flashcards-example-project/pull/1
Author: @ershisan99
Created: 12/16/2023
Status: Merged
Merged: 12/16/2023
Merged by: @ershisan99

Base: masterHead: feature/update-readme


📝 Commits (1)

  • 440dc02 feat: update readme with some new info

📊 Changes

1 file changed (+1 additions, -27 deletions)

View changed files

📝 README.md (+1 -27)

📄 Description

Stacks on top of https://github.com/bluesky-social/social-app/pull/2197.

This is a pretty chunky refactor but it's meant to mostly keep the data flow as is (with less plumbing).

The main change is we no longer pass down two things:

isScrolledDown. This is now maintained by whoever renders .
onScroll et al (onBeginDrag / onEndDrag / scrollEventThrottle). These are now in context (pager or top level).
More detailed:

The new List abstraction has onScrolledDownChanged (similar in spirit to onEndReached). You can use this to track isScrolledDown yourself next to the list. This is nice because it is used very close to the list in most cases. So it's just local state where it's needed. (In the future, we could make this use intersection observer instead of scroll events.)
The new List abstraction does not take onScroll at all. (We could allow that, but so far it's not used.)
Instead, there is a new concept of a "scroll provider". It's a thing with onScroll, onBeginDrag, and onEndDrag properties. List now delegates to the handlers from the closest scroll provider—this is the key change.
useOnMainScroll is gone, replaced by MainScrollProvider. That's used on Home and Notifications.
Pager doesn't pass onScroll down anymore, that's replaced by a ScrollProvider.
In principle scroll providers could compose but we don't have examples of that yet.
The List is the one doing useAnimatedScrollHandler now. Which avoids spreading that across the product code. I've removed throttle customization because we just always run this on the main thread already.
Note we could still support one-off onScroll handlers if needed. But all current uses are contextual.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/ershisan99/flashcards-example-project/pull/1 **Author:** [@ershisan99](https://github.com/ershisan99) **Created:** 12/16/2023 **Status:** ✅ Merged **Merged:** 12/16/2023 **Merged by:** [@ershisan99](https://github.com/ershisan99) **Base:** `master` ← **Head:** `feature/update-readme` --- ### 📝 Commits (1) - [`440dc02`](https://github.com/ershisan99/flashcards-example-project/commit/440dc02f2794b3fb39ff4facef77d7664d0f818e) feat: update readme with some new info ### 📊 Changes **1 file changed** (+1 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `README.md` (+1 -27) </details> ### 📄 Description Stacks on top of https://github.com/bluesky-social/social-app/pull/2197. This is a pretty chunky refactor but it's meant to mostly keep the data flow as is (with less plumbing). The main change is we no longer pass down two things: isScrolledDown. This is now maintained by whoever renders <List onScrolledDownChanged={...}>. onScroll et al (onBeginDrag / onEndDrag / scrollEventThrottle). These are now in context (pager or top level). More detailed: The new List abstraction has onScrolledDownChanged (similar in spirit to onEndReached). You can use this to track isScrolledDown yourself next to the list. This is nice because it is used very close to the list in most cases. So it's just local state where it's needed. (In the future, we could make this use intersection observer instead of scroll events.) The new List abstraction does not take onScroll at all. (We could allow that, but so far it's not used.) Instead, there is a new concept of a "scroll provider". It's a thing with onScroll, onBeginDrag, and onEndDrag properties. List now delegates to the handlers from the closest scroll provider—this is the key change. useOnMainScroll is gone, replaced by MainScrollProvider. That's used on Home and Notifications. Pager doesn't pass onScroll down anymore, that's replaced by a ScrollProvider. In principle scroll providers could compose but we don't have examples of that yet. The List is the one doing useAnimatedScrollHandler now. Which avoids spreading that across the product code. I've removed throttle customization because we just always run this on the main thread already. Note we could still support one-off onScroll handlers if needed. But all current uses are contextual. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
ershisan99 added the
pull-request
label 2025-10-15 11:54:55 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ershisan99/flashcards-example-project#4
No description provided.