Repository navigation
Conversation
When the gallery had no items, only the empty placeholder was rendered in a plain View and FlashList (which owns the refresh control) was not mounted, so pull to refresh could not be triggered. Wrap the placeholder in a ScrollView with a RefreshControl for vertical galleries with a pull down action. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Checklist
[XX-000]: description)? ❌ — ticket number to be addedThis PR contains
What is the purpose of this PR?
When the Gallery widget has no items and only shows the empty placeholder, pull to refresh does not work.
Relevant changes
FlashListholds the refresh control (onRefresh/refreshing), but it is only rendered when there are items. With an empty list, the placeholder was rendered in a plainViewthat can't scroll, so there was nothing to pull.When the gallery scrolls vertically and has a pull down action, the empty placeholder is now wrapped in a
ScrollViewwith aRefreshControl. That control uses the samepullDown/pullDownIsExecutingprops as the list.contentContainerStyle={{ flexGrow: 1 }}makes the whole placeholder area pullable. Horizontal galleries, and galleries without a pull down action, render the placeholder as before.Also added:
What should be covered while testing?
Extra comments (optional)
Two snapshot tests for the load more button (
alpha: nullin the Android ripple) already fail onmain. They are unrelated to this change and were left as is.🤖 Generated with Claude Code