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

[HOLD for payment 2023-06-05] [$1000] An overlapped skeleton UI in the payment details section #19442

Closed
2 of 6 tasks
kavimuru opened this issue May 23, 2023 · 35 comments
Closed
2 of 6 tasks
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented May 23, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Click on FAB icon
  2. Click on 'Send money'
  3. Enter amount & click on 'Next' button
  4. Search user
  5. Select user
  6. Click on 'I will settle up elsewhere' button
  7. Click on settled up message
  8. Click on the sent money preview component

Expected Result:

The rows of the skeleton UI shouldn't be overlapped

Actual Result:

The rows of the skeleton UI are overlapped

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.17
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
Notes/Photos/Videos: Any additional supporting documentation
Annotation 2023-05-19 152438

2023-05-19.15.22.18.mp4
az_recorder_20230523_093326.1.mp4

Expensify/Expensify Issue URL:
Issue reported by: @Natnael-Guchima
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1684499328591959

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01faa2727c8013d2a4
  • Upwork Job ID: 1661352382463225856
  • Last Price Increase: 2023-05-24
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 23, 2023

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

@melvin-bot

This comment was marked as duplicate.

@hungvu193
Copy link
Contributor

hungvu193 commented May 23, 2023

Proposal

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

An overlapped skeleton UI in the payment details section

What is the root cause of that problem?

The problem came from here:

const possibleVisibleContentItems = Math.ceil(props.containerHeight / CONST.CHAT_SKELETON_VIEW.AVERAGE_ROW_HEIGHT);

When the header view of request money takes a lot of space, Math.celi return a greater number, which make the remaining space couldn't be enough for all the skeleton.

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

Instead of using Math.celi, we should use Math.floor to calculate the number of skeleton lines.

const possibleVisibleContentItems = Math.floor(props.containerHeight / CONST.CHAT_SKELETON_VIEW.AVERAGE_ROW_HEIGHT);

What alternative solutions did you explore? (Optional)

N/A.

@adelekennedy adelekennedy removed the Bug Something is broken. Auto assigns a BugZero manager. label May 24, 2023
@adelekennedy adelekennedy removed their assignment May 24, 2023
@adelekennedy adelekennedy added the Bug Something is broken. Auto assigns a BugZero manager. label May 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 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

@conorpendergrast
Copy link
Contributor

Reproduced on Mac OSX Chrome 👍

@conorpendergrast conorpendergrast added the External Added to denote the issue can be worked on by a contributor label May 24, 2023
@melvin-bot melvin-bot bot changed the title An overlapped skeleton UI in the payment details section [$1000] An overlapped skeleton UI in the payment details section May 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 24, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01faa2727c8013d2a4

@melvin-bot
Copy link

melvin-bot bot commented May 24, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented May 24, 2023

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

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

melvin-bot bot commented May 24, 2023

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

@bernhardoj
Copy link
Contributor

Proposal

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

The skeleton is overlapping in chat page. This is easily noticeable when the height of the chat is small.

What is the root cause of that problem?

I have encountered the same issue while creating a skeleton loader for LHN here. There is an explanation why that happen, but in short, the problem happens because the total height of all skeleton item is bigger than the height of it's container and we are using flex 1 in the container. (Removing the flex 1 will solve the overlap, but will push down the footer)

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

We can use the same solution here which is to wrap the skeleton with a plain View here.

return <>{skeletonViewLines}</>;

This will allow the skeleton to overflow.

@s77rt
Copy link
Contributor

s77rt commented May 24, 2023

@hungvu193 Thanks for the proposal. Your RCA makes sense but I think it's intended to use ceil and round up to the closest integer. Otherwise we will see empty space.

@s77rt
Copy link
Contributor

s77rt commented May 24, 2023

@bernhardoj Thanks for the proposal. Your RCA makes sense as well. Wrapping the skeletonview with a View looks good to me. However I have a question, I can reproduce the bug just for a brief period (or when offline) where the scrollbar is not visible. Then once getting back online the scrollbar is visible and no overlap is seen in this case. Any idea what is that about?

Even if we wrap the skeletonview within a View you will still notice that the scrollbar is missing.

Offline Online

@bernhardoj
Copy link
Contributor

That's weird. The skeleton shouldn't be scrollable because the overflow is hidden. I'm guessing the skeleton you see when back online is from the footer of ReportActionsList.

ListFooterComponent={() => {
if (props.report.isLoadingMoreReportActions) {
return <ReportActionsSkeletonView containerHeight={CONST.CHAT_SKELETON_VIEW.AVERAGE_ROW_HEIGHT * 3} />;
}
// Make sure the oldest report action loaded is not the first. This is so we do not show the
// skeleton view above the created action in a newly generated optimistic chat or one with not
// that many comments.
const lastReportAction = _.last(props.sortedReportActions) || {};
if (props.report.isLoadingReportActions && lastReportAction.actionName !== CONST.REPORT.ACTIONS.TYPE.CREATED) {
return (
<ReportActionsSkeletonView
containerHeight={skeletonViewHeight}
animate={!props.network.isOffline}
/>
);
}
return null;
}}

@hungvu193
Copy link
Contributor

@hungvu193 Thanks for the proposal. Your RCA makes sense but I think it's intended to use ceil and round up to the closest integer. Otherwise we will see empty space.

We can wrap the skeleton with View and use justify content center, we can reduce the space and it looks just ok.

Screen.Recording.2023-05-25.at.14.05.23.mov

@s77rt
Copy link
Contributor

s77rt commented May 25, 2023

@bernhardoj Thanks for the quick follow up. That seems unrelated to this issue. Let's go with your solution 🚀.

🎀 👀 🎀 C+ reviewed

cc @dangrous

@s77rt
Copy link
Contributor

s77rt commented May 25, 2023

@hungvu193 I don't think we want to reduce the number of rows. There will always be empty space which will make it not look good (especially for cases where the height is so close e.g. assume each row is 50px. A container that is 199px in height will render 3 rows instead of 4 leaving 49px of empty space).

@dangrous
Copy link
Contributor

Yep this looks good to me!

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label May 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

📣 @bernhardoj You have been assigned to this job by @dangrous!
Please apply to this job in Upwork 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 📖

@melvin-bot melvin-bot bot added the Reviewing Has a PR in review label May 25, 2023
@bernhardoj
Copy link
Contributor

PR is ready.

cc: @s77rt @dangrous

@conorpendergrast
Copy link
Contributor

Hired everyone via Upwork 👍

@melvin-bot
Copy link

melvin-bot bot commented May 25, 2023

🎯 ⚡️ Woah @s77rt / @bernhardoj, great job pushing this forwards! ⚡️

The pull request got merged within 2 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @bernhardoj got assigned: 2023-05-25 15:25:04 Z
  • when the PR got merged: 2023-05-25 19:17:38 UTC

On to the next one 🚀

@conorpendergrast
Copy link
Contributor

PR is reviewed, merged and on Staging

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels May 29, 2023
@melvin-bot melvin-bot bot changed the title [$1000] An overlapped skeleton UI in the payment details section [HOLD for payment 2023-06-05] [$1000] An overlapped skeleton UI in the payment details section May 29, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label May 29, 2023
@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

Reviewing label has been removed, please complete the "BugZero Checklist".

@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.19-7 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 2023-06-05. 🎊

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.

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented May 29, 2023

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:

  • [@s77rt] The PR that introduced the bug has been identified. Link to the PR:
  • [@s77rt] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@s77rt] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@s77rt] Determine if we should create a regression test for this bug.
  • [@s77rt] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@conorpendergrast] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@s77rt
Copy link
Contributor

s77rt commented May 30, 2023

@parasharrajat
Copy link
Member

Did we confirm the design with the design team?

The skeleton preset should start from the header end edge. This was the case when it was built. It is always good to request reviews from the design team for design related problems.

@dangrous
Copy link
Contributor

dangrous commented Jun 2, 2023

Hm @shawnborton what do you think? For payment details chats, should the skeleton UI be aligned to the bottom (like the chats actually show up) or to the top (like other chats)? Could sort of go either way.

@shawnborton
Copy link
Contributor

I don't feel strongly either, I would say let's just be consistent with what we do with other chats.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jun 5, 2023
@conorpendergrast
Copy link
Contributor

I'm gonna get this paid tomorrow, haven't forgotten about it

@conorpendergrast
Copy link
Contributor

Paid everyone 👍

@dangrous Can you open a new issue for that design change?

@dangrous
Copy link
Contributor

Oops, I never actually made the issue. To confirm the plan - @shawnborton - Should I create an issue to make the payment details skeleton UI aligned to the top to match how we see other chats?

@shawnborton
Copy link
Contributor

I guess at this point a payment details view is just a thread, and a thread is just another kind of chat. So yeah, whatever we do with other chats, we should be consistent with the payment details. Let me know if that's helpful!

@dangrous
Copy link
Contributor

See linked issue!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

9 participants