Skip to content
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

[$1000] Fix empty state shown on scroll up in multi-comment threads in all platforms #21493

Closed
6 tasks done
kbecciv opened this issue Jun 24, 2023 · 21 comments
Closed
6 tasks done
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors

Comments

@kbecciv
Copy link

kbecciv commented Jun 24, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Log in
  2. Click into a thread where there are a lot of comments
  3. Scroll up to the original post and there is a huge gap of space above the top comment of the thread

Expected Result:

For the original post to be held at the top position

Actual Result:

Blank space that looked like something wasn’t loading

Workaround:

Unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.32.5

Reproducible in staging?: yes

Reproducible in production?: yes

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

Notes/Photos/Videos: Any additional supporting documentation

RPReplay_Final1687618737.MP4

IMG_1495

Expensify/Expensify Issue URL:

Issue reported by: Niki Wallroth

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1686967294130149

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018db6d5bc85447038
  • Upwork Job ID: 1674045770894585856
  • Last Price Increase: 2023-06-28
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 24, 2023

Triggered auto assignment to @muttmuure (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@melvin-bot
Copy link

melvin-bot bot commented Jun 24, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@bernhardoj
Copy link
Contributor

bernhardoj commented Jun 25, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

There are some blank spaces above the thread parent message that could confuse users thinking that there are still some unloaded messages above.

What is the root cause of that problem?

In the thread parent report action, we are wrapping the action with Views that have styles from getReportWelcomeContainerStyle and getReportWelcomeTopMarginStyle.

function getReportWelcomeBackgroundImageStyle(isSmallScreenWidth) {
if (isSmallScreenWidth) {
return {
height: CONST.EMPTY_STATE_BACKGROUND.SMALL_SCREEN.IMAGE_HEIGHT,
width: '100%',
position: 'absolute',
};
}
return {
height: CONST.EMPTY_STATE_BACKGROUND.WIDE_SCREEN.IMAGE_HEIGHT,
width: '100%',
position: 'absolute',
};
}

function getReportWelcomeTopMarginStyle(isSmallScreenWidth) {
if (isSmallScreenWidth) {
return {
marginTop: CONST.EMPTY_STATE_BACKGROUND.SMALL_SCREEN.VIEW_HEIGHT,
};
}
return {
marginTop: CONST.EMPTY_STATE_BACKGROUND.WIDE_SCREEN.VIEW_HEIGHT,
};
}

The blank space is caused by both margin top and min height. These same styles are being used for the report welcome text here.

<View style={StyleUtils.getReportWelcomeContainerStyle(props.isSmallScreenWidth)}>
<Image
pointerEvents="none"
source={EmptyStateBackgroundImage}
style={StyleUtils.getReportWelcomeBackgroundImageStyle(props.isSmallScreenWidth)}
/>
<View
accessibilityLabel={props.translate('accessibilityHints.chatWelcomeMessage')}
style={[styles.p5, StyleUtils.getReportWelcomeTopMarginStyle(props.isSmallScreenWidth)]}
>

What changes do you think we should make in order to solve the problem?

Based on the discussions below, we want to also have the empty state background image without the welcome text and avatar.

So, in ReportActionItemParentAction, add the empty state background image just like we have in ReportActionItemCreated

<View style={StyleUtils.getReportWelcomeContainerStyle(props.isSmallScreenWidth)}>
<Image
pointerEvents="none"
source={EmptyStateBackgroundImage}
style={StyleUtils.getReportWelcomeBackgroundImageStyle(props.isSmallScreenWidth)}
/>

Result image image image

@shawnborton
Copy link
Contributor

We should rename this issue to address the empty state above all threads (including expenses/reports/tasks/etc), not just for public rooms. And this affects all platforms, not just iOS.

Ideally we would just reuse the same empty state but without the big avatar and text, like so:

image

@shawnborton
Copy link
Contributor

cc @grgia @jasperhuangg @thienlnam @JmillsExpensify @trjExpensify since I believe we've all chatted about this at some point

@trjExpensify
Copy link
Contributor

Yeah, I think it makes sense to do one update holistically here. 👍

@melvin-bot melvin-bot bot added the Overdue label Jun 26, 2023
@bernhardoj
Copy link
Contributor

Proposal updated to show the empty state background

@melvin-bot
Copy link

melvin-bot bot commented Jun 27, 2023

@muttmuure Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@muttmuure muttmuure changed the title IOS - Thread - Blank space appears for public room tread Fix empty state shown on scroll up in multi-comment threads in all platforms Jun 28, 2023
@muttmuure muttmuure added the External Added to denote the issue can be worked on by a contributor label Jun 28, 2023
@melvin-bot melvin-bot bot changed the title Fix empty state shown on scroll up in multi-comment threads in all platforms [$1000] Fix empty state shown on scroll up in multi-comment threads in all platforms Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

Job added to Upwork: https://www.upwork.com/jobs/~018db6d5bc85447038

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

Current assignee @muttmuure is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

Triggered auto assignment to Contributor-plus team member for initial proposal review - @abdulrahuman5196 (External)

@muttmuure
Copy link
Contributor

Updated to incorporate all platforms and all places where threads appear

@melvin-bot melvin-bot bot removed the Overdue label Jun 28, 2023
@muttmuure
Copy link
Contributor

@abdulrahuman5196 @bernhardoj appears to have a solution ready to go for this one here

@abdulrahuman5196
Copy link
Contributor

Thank you. Will check on this

@melvin-bot melvin-bot bot added the Overdue label Jun 30, 2023
@abdulrahuman5196
Copy link
Contributor

@bernhardoj 's proposal here #21493 (comment) looks good and works well as per the current expectation to show empty background image.

🎀👀🎀
C+ Reviewed

🎀 👀 🎀 C+ reviewed

cc: @muttmuure

@melvin-bot melvin-bot bot removed the Overdue label Jul 2, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 2, 2023

Triggered auto assignment to @Gonals, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@abdulrahuman5196
Copy link
Contributor

@Gonals C+ approved comment is here - #21493 (comment)

@grgia
Copy link
Contributor

grgia commented Jul 3, 2023

@Gonals @shawnborton I was working on animating the empty state with lottie animations and making this change. However, there's been some problems with resizing the lottie files that's slowed it down. Here's the related issue - #19954. We can take the proposal as it will fix it quickly, but it will be overwritten by the work in my linked issue that I'm already working on.

@shawnborton
Copy link
Contributor

I don't feel too strongly there, which path do you recommend?

@grgia
Copy link
Contributor

grgia commented Jul 3, 2023

I think we can close out this issue in favor of that one, and I'll try to prioritize wrapping that one up before this week/early next week

@melvin-bot melvin-bot bot added the Overdue label Jul 4, 2023
@muttmuure
Copy link
Contributor

muttmuure commented Jul 5, 2023

I'll follow your lead @grgia. We can always reopen if this is still reported after your fix is live.

@melvin-bot melvin-bot bot removed the Overdue label Jul 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors
Projects
None yet
Development

No branches or pull requests

8 participants