docs: document deriving loading state from the request queue#96396
Draft
BartekObudzinski wants to merge 1 commit into
Draft
docs: document deriving loading state from the request queue#96396BartekObudzinski wants to merge 1 commit into
BartekObudzinski wants to merge 1 commit into
Conversation
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.
Explanation of Change
Documentation only. Adds a developer guide for deriving loading state from the request queue, so new screens follow the pattern instead of re-introducing stuck-skeleton bugs from stored loading flags.
contributingGuides/LOADING_STATE.md: the problem (stored flags anddata === undefinedchecks are shadows of the queue that drift on reload/crash/dropped response), the pattern (useInFlightRequestsper-group hooks + the per-screenuseIsXPending() && !isOfflinegate), how to add a new group, the invariant that only WRITE commands land in the queue (so a READ/side-effect command would make a hook returnfalseforever), the READ-command exception (Search derives pending from its own snapshot lifecycle state instead), how to choose between the two approaches, and migration discipline.contributingGuides/SEQUENTIAL_QUEUE.mdpointing at the new page.No runtime code changes.
Fixed Issues
$
PROPOSAL:
Tests
contributingGuides/LOADING_STATE.mdon GitHub and verify it renders (headings, tables, code blocks).contributingGuides/SEQUENTIAL_QUEUE.mdresolves to the new page.Offline tests
Not applicable (documentation only).
QA Steps
Not applicable (documentation only).
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari