Closed kbecciv closed 9 months ago
Triggered auto assignment to @mallenexpensify (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details.
Job added to Upwork: https://www.upwork.com/jobs/~01073572ec47fdb07b
Platforms
in OP are ✅)Triggered auto assignment to Contributor-plus team member for initial proposal review - @s77rt (External
)
The top report skeleton is not visible when offline.
This happens because we display the top skeleton based on this condition: https://github.com/Expensify/App/blob/772715011ce1431884bb499164faa36dcc8006e6/src/pages/home/report/ReportActionsView.js#L262
This value should get updated by calling the Report.getOlderActions
here. But we have an early return when offline. This was made to avoid endless loop of the Report.getOlderActions
call.
In ReportActionsView
:
First, Move (and slightly modify) this code outside of loadOlderChats
to the component level:
const oldestReportAction = _.last(props.reportActions);
const isLoadedTillBeginning = lodashGet(oldestReportAction, 'actionName', '') === CONST.REPORT.ACTIONS.TYPE.CREATED;
Second, modify the logic for displaying the top skeleton: show it also when offline & the history is not loaded until the beginning.
isLoadingOlderReportActions={props.isLoadingOlderReportActions || (props.network.isOffline && !isLoadedTillBeginning)}
@paultsimura Thanks for the proposal. Your RCA makes sense but the solution does not look good to me. props.network.isOffline && !isLoadedTillBeginning
will make isLoadingOlderReportActions
evaluates to true
even if we are not loading any report action.
I see this is a regression from https://github.com/Expensify/App/pull/30658 and it's still within the regression period. In this case this should be fixed by the Contributor/Contributor+ @paultsimura / @getusha
I agree this looks like a regression from https://github.com/Expensify/App/pull/30658 @paultsimura could you address @s77rt's comment and raising a PR if possible?
Yes, I'm on it. However, @s77rt could you please elaborate a little on why is this bad?
props.network.isOffline && !isLoadedTillBeginning will make isLoadingOlderReportActions evaluates to true even if we are not loading any report action
If we are offline and not at the beginning of the conversation yet – this means we will eventually load the newer actions when online, doesn't it? We're not loading the older actions when offline anyway, so in my understanding, the skeleton here is used only to show the user that there are some more actions to load.
@paultsimura The logic makes sense but just the way we are modifying the isLoadingOlderReportActions
prop is counterintuitive. If isLoadingOlderReportActions
is true then we must be indeed loading older report actions otherwise this prop won't be a reliable source of truth.
A slight adjustment is to move the logic to ListBoundaryLoader
. This would keep the prop untouched and achieve same results.
Thanks @s77rt, this makes sense.
I would like to clarify the expected UI in the offline case: should we show the long skeleton, similar to when loading the older events, or the shorter one – like when loading the initial report actions?
Also, I suppose it should be not animated when offline, similar to the LoadingInitialActions
skeleton:
@shawnborton could you please share your upinion here?
Hmm shorter seems to make more sense to me, but cc @Expensify/design for thoughts in case they disagree.
Also, it looks like we are missing the animation on the skeleton lines above the preview cards. Any idea why those skeleton lines are not using the pulse/fade/gradient animation?
@shawnborton looks like it was made on purpose: we're disabling the animation when offline:
I believe this was made so that the user won't expect something new to be loaded while offline (the animation implies that something's happening).
If that's not the expected behaviour, I can remove this condition and the result will look like this:
https://github.com/Expensify/App/assets/12595293/a0e0bcfc-6dbc-448b-b3eb-c58ae1e3fde8
Oh that's interesting about the animation—it makes total sense after you explain it, but I'm not sure anyone will connect those dots on their own. I don't have strong feelings about it though so I'll leave it to @shawnborton.
I'm also a fan of the short skeleton in this situation—it does it's job communicating the state so I don't think we need any more than that.
Hmm yeah, I see the point too. I think I'd rather just always have the subtle animation though, otherwise we get into a weird situation where we try to determine if the loading state should be animated or not based on connectivity, which might not be truly offline but could be flakey and cause some weird start/stop of the animation? So I lean towards just always having it.
Thanks y'all. The PR is ready: https://github.com/Expensify/App/pull/31492
Reviewing
label has been removed, please complete the "BugZero Checklist".
The solution for this issue has been :rocket: deployed to production :rocket: in version 1.4.7-4 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2023-12-12. :confetti_ball:
After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.
For reference, here are some details about the assignees on this issue:
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
Regression Test Proposal
@mallenexpensify Please assign @getusha and @paultsimura here since this is a part of https://github.com/Expensify/App/issues/30503
❌ There was an error making the offer to @getusha for the Reviewer role. The BZ member will need to manually hire the contributor.
📣 @getusha 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
📣 @paultsimura 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
@mallenexpensify we can close this as it was handled as a regression.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.3.99.0 Reproducible in staging?: y Reproducible in production?: y If this was caught during regression testing, add the test name, ID and link from TestRail: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: Applause - Internal Team Slack conversation:
Action Performed:
Expected Result:
In Step 5, skeleton placeholder will appear.
Actual Result:
In Step 5, skeleton placeholder does not appear. It only appears when the chat is revisited in Step 7.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
https://github.com/Expensify/App/assets/93399543/05c4f8c8-1320-49d7-bbe6-3b31cf508638
View all open jobs on GitHub
Upwork Automation - Do Not Edit