Fix skeleton loader flash on Inbox Unread/To-dos tabs when receiving a message#93533
Draft
MelvinBot wants to merge 1 commit into
Draft
Fix skeleton loader flash on Inbox Unread/To-dos tabs when receiving a message#93533MelvinBot wants to merge 1 commit into
MelvinBot wants to merge 1 commit into
Conversation
…ects Co-authored-by: Youssef Lourayad <youssef-lr@users.noreply.github.com>
Open
7 tasks
Contributor
|
🚧 @youssef-lr has triggered a test Expensify/App build. You can view the workflow run here. |
Contributor
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
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
On the Inbox Unread / To-dos tabs, a brief skeleton loader + empty-state flash appeared whenever a new message arrived (DeployBlockerCash from #92146).
There are two independent skeletons in the Inbox sidebar:
BaseSidebarScreen— the cold-load skeleton, correctly guarded by a module-levelhasEverFinishedLoadingflag so it is shown only once on first load and never again, even whenisLoadingAppbriefly flips back totrueduring a reconnect.SidebarLinks— a second, unguarded skeleton that rendered wheneverisLoadingReportData && optionListItems.length === 0.PR #92146 changed
optionListItemsfrom the full report list to the filtered tab list (SidebarLinksDatanow passesfilteredReports). On the Unread/To-dos tabs that list is legitimately empty when there's nothing to show, so the second condition was constantly satisfied. When a new message arrived, a partialReconnectAppflippedisLoadingReportDatatotruewhile the filtered list was momentarily still empty — so the unguardedSidebarLinksskeleton painted on top of the empty state until the new report synced.Because
BaseSidebarScreenonly mountsSidebarLinksDataafter the first load completes (and already owns the cold-load skeleton with the proper guard), the innerSidebarLinksskeleton could effectively only ever fire in this reconnect-flash scenario. This PR removes that now-redundant skeleton (and its now-unused imports/variables). The "You're all caught up" empty state still renders correctly underneath while the incoming chat streams in — with no skeleton flash.Fixed Issues
$ #93531
PROPOSAL: #93531 (comment)
Tests
// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
Suggested manual test:
Offline tests
N/A — change only removes a transient loading overlay.
QA Steps
// TODO: The human co-author must fill out the QA tests you ran before marking this PR as "ready for review".
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionmainbranch 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
🤖 Generated by MelvinBot from the approved proposal on #93531. AI checks run locally:
lint-changed✅,prettier✅, react-compilercheck(no regression vsmain— file was already in the non-compiling set) ✅,SidebarTest✅,UnreadIndicatorsTest✅.typechecksurfaced only pre-existing, unrelated errors insrc/libs/API/types.ts(untouched by this PR).