YPE-1204: Add loading state when network requests are in flight#174
YPE-1204: Add loading state when network requests are in flight#174jaredhightower-youversion wants to merge 2 commits intomainfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
🦋 Changeset detectedLatest commit: 4afce33 The changes in this PR will be included in the next version bump. This PR includes changesets to release 4 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Greptile SummaryImplemented a comprehensive loading state solution for Key improvements:
Code quality:
Confidence Score: 5/5
Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[BibleCard Component] --> B{Is Loading?}
B -->|Yes| C[Render BibleCardSkeleton]
B -->|No| D[Render Full BibleCard]
C --> E[Skeleton Component]
E --> F[Accessible Loading State<br/>role=status aria-busy=true]
D --> G[BibleTextView]
D --> H[Pass passage and error props]
H --> I[BibleTextView receives external state]
I --> J{Has External State?}
J -->|Yes| K[Use passed props<br/>Disable internal fetch]
J -->|No| L[Use internal usePassage hook]
K --> M[Render verse content]
L --> M
style C fill:#e1f5ff
style F fill:#d4edda
style K fill:#fff3cd
Last reviewed commit: f7930e6 |
…ion coverage for loading states
f7930e6 to
8e194ac
Compare
|
Hey @jaredhightower-youversion, thanks for the work on this PR. I unfortunately can't merge this as-is. As I mentioned in #165 (comment), the goal here is to solve layout shifting. The skeleton component looks nice, but it doesn't actually solve the layout shift problem because the BibleCard height and width still shift. I have a ticket to solve this properly: https://lifechurch.atlassian.net/browse/YPE-1143 I appreciate you and your effort |
Summary
What Changed
Skeletonprimitive: packages/ui/src/components/ui/skeleton.tsxBibleCardSkeletoncomponent for the card loading state: packages/ui/src/components/bible-card-skeleton.tsxplayintegration tests for loading stories (Loading,LoadingWithVersionPicker,LoadingDarkMode): packages/ui/src/components/bible-card.stories.tsxScreen.Recording.2026-02-25.at.2.43.12.PM.mov