-
Notifications
You must be signed in to change notification settings - Fork 3.2k
[Due for payment 2025-05-22] [$250] iOS - Track Expenses - Your space picture and text are flickering after back from workspace #60355
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Triggered auto assignment to @kadiealexander ( |
Job added to Upwork: https://www.upwork.com/jobs/~021912729791580558775 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @DylanDylann ( |
🚨 Edited by proposal-police: This proposal was edited at 2025-04-17 08:51:55 UTC. ProposalPlease re-state the problem that we are trying to solve in this issue.iOS - Track Expenses - Your space picture and text are flickering after back from workspace What is the root cause of that problem?The flickering is occuring because when navigating back to the workspace, it re-renders the component. The styles and text are conditionally rendered based on The problem is likely related to how the component manages state transitions when navigating between different spaces in the app(iOS). The Perhaps this is the root cause. App/src/components/ReportWelcomeText.tsx Lines 95 to 106 in 29fe495
What changes do you think we should make in order to solve the problem?We should use
App/src/components/ReportWelcomeText.tsx Line 54 in 29fe495
with, const memoizedReport = useMemo(() => report, [report]);
const isSelfDM = useMemo(() => isSelfDMReportUtils(memoizedReport), [memoizedReport]);
Add this state to the component const [isTransitioning, setIsTransitioning] = useState(false); Use a navigation listener to detect when returning to this screen useEffect(() => {
const unsubscribe = Navigation.addListener('focus', () => {
setIsTransitioning(true);
setTimeout(() => setIsTransitioning(false), 300); // Short delay
});
return unsubscribe;
}, []); Then in render logic: const welcomeHeroText = useMemo(() => {
// If transitioning, return the last stable value
if (isTransitioning && previousHeroText.current) {
return previousHeroText.current;
}
Existing logic...
}, [isTransitioning, isChatRoom, isInvoiceRoom, isPolicyExpenseChat, isSelfDM...]); What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?NA What alternative solutions did you explore? (Optional)NA ResultReminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
The root cause is the same as #60284 |
ProposalPlease re-state the problem that we are trying to solve in this issue.iOS - Track Expenses - Your space picture and text are flickering after back from workspace What is the root cause of that problem?In the
Looking into InvertedFlatList , it uses maintainVisibleContentPosition with minIndexForVisible set to 1 . And when scrolling that will undefined . According to the React Native docs, the scroll view will adjust the scroll position so that the first child that is currently visible and at or beyond minIndexForVisible will not change position... .App/src/components/InvertedFlatList/BaseInvertedFlatList/index.tsx Lines 90 to 91 in 512af49
When the first message or attachment is removed, this adjustment can cause the chat page to appear blank due to the content being shifted incorrectly as step from the OP. What changes do you think we should make in order to solve the problem?We can add an empty App/src/pages/home/report/ReportActionsList.tsx Lines 705 to 711 in 4af9c88
const listFooterComponent = useMemo(() => {
if (!shouldShowSkeleton) {
return <View/> // New
}
return <ReportActionsSkeletonView shouldAnimate={false} />;
}, [shouldShowSkeleton]); What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?This is an UI issue(Native app). No automated test. What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
I'm copied the proposal here to help move this forward faster. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Your space picture and text are flickering after back from the workspace chat What is the root cause of that problem?The App/src/components/InvertedFlatList/BaseInvertedFlatList/index.tsx Lines 88 to 95 in 98127bc
The problem is that when these actions are removed, the What changes do you think we should make in order to solve the problem?When the
App/src/components/InvertedFlatList/BaseInvertedFlatList/index.tsx Lines 88 to 95 in 98127bc
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?UI bug What alternative solutions did you explore? (Optional)Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job. |
|
@nkdengineer @linhvovan29546 Could you reproduce this bug anymore on latest main? |
Yes, I can still reproduce it on the latest main. |
Can reproduce. |
@linhvovan29546 @nkdengineer Which platform can you reproduce? I justed tried on both Hybrid App and IOS native but can't reproduce. |
@DylanDylann Can reproduce on Iphone SE platform. Screen.Recording.2025-04-21.at.18.15.22.mov |
IOS is failed on latest main, I will try again tomorrow |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@linhvovan29546 @nkdengineer Thanks for proposals. I appreciate your effort to investigate this native bug. But I am not clear on RCA from both guys. I noticed that It only happens when we swipe left (It works fine when clicking the back button on App). It will be great If we can clarify this weird behavior |
On my side, that also happens when clicking the back button in the app |
IMK, according to the React Native docs, this is calculated native. They mention that it can cause jumpiness and jank when setting it. I think it gets
|
@DylanDylann Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@DylanDylann Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
I will update today |
@linhvovan29546's proposal looks good to me @nkdengineer I think we still should keep minIndexForVisible as 1 when there is only one message to avoid causing impact regarding scrolling 🎀 👀 🎀 C+ Reviewed |
Triggered auto assignment to @dangrous, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
Hm, I'm leaning a little more towards @nkdengineer's solution, having an empty View just for counting purposes seems a little hacky. @DylanDylann can you expand on the impacts on scrolling there might be if we change |
@dangrous @kadiealexander @DylanDylann this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks! |
@dangrous TBH, both solutions will solve this problem well. I just checked again and noticed that
I also don't see any significant impacts on this. Because all reports always have created report action, It means that with nkdengineer's proposal, we only set minIndexForVisible to 0 if this report is empty (only has created report action) and in that case, the view cannot scroll because the report is empty. Anyways, I am fine to go with @nkdengineer's proposal |
Cool! Assigning @nkdengineer |
📣 @nkdengineer 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.45-21 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2025-05-22. 🎊 For reference, here are some details about the assignees on this issue:
|
@DylanDylann @kadiealexander @DylanDylann The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button] |
If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!
Version Number: 9.1.28-13
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5929047
Issue reported by: Applause - Internal Team
Action Performed:
Precondition:
Create a new workspace if your account doesn't have any workspace
Expected Result:
User should be back to Your space (Self DM) chat without any issue
Actual Result:
Your space picture and text are flickering after back from the workspace chat
Workaround:
Unknown
Platforms:
Select the officially supported platforms where the issue was reproduced:
Platforms Tested:
On which of our officially supported platforms was this issue tested:Screenshots/Videos
Add any screenshot/video evidence
Bug6803989_1744824227062.iOS_-_Track_Expenses_-_Your_space_picture_and_text_are_flickering_after_back_from_workspace.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @kadiealexanderThe text was updated successfully, but these errors were encountered: