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 2024-07-10] [$250] Skeleton loader doesn't show as table rows for table views #43605

Closed
1 of 6 tasks
m-natarajan opened this issue Jun 12, 2024 · 28 comments
Closed
1 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

@m-natarajan
Copy link

m-natarajan commented Jun 12, 2024

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:
Reproducible in staging?:
Reproducible in production?:
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: @shawnborton
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1718172985486579

Action Performed:

  1. Open app
  2. Go to workspace
  3. Go to members
  4. Observe the skeleton view

Expected Result:

Skeleton ros should use a BG colar to show table rows

Actual Result:

Does not look like table rows

Workaround:

unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

CleanShot 2024-06-12 at 08 13 13@2x

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01902d6c4eb8e8b5f6
  • Upwork Job ID: 1801701588025607226
  • Last Price Increase: 2024-06-14
  • Automatic offers:
    • jjcoffee | Reviewer | 102766776
    • truph01 | Contributor | 102766780
Issue OwnerCurrent Issue Owner: @sakluger
@m-natarajan m-natarajan added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Jun 12, 2024
Copy link

melvin-bot bot commented Jun 12, 2024

Triggered auto assignment to @sakluger (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@MelvinBot
Copy link

This has been labelled "Needs Reproduction". Follow the steps here: https://stackoverflowteams.com/c/expensify/questions/16989

@sakluger
Copy link
Contributor

No reproduction is needed here, but I've asked @shawnborton and @dannymcclain for a screenshot or mockup of how we'd actually like it to look. I'll leave the Needs Reproduction label on until we have that clarifying screenshot.

@shawnborton
Copy link
Contributor

The rows should look like this:
image

We're currently using chat rows for the empty state here, and we should be using something that looks a bit more like the final product when the page actually loads.

@sakluger sakluger added External Added to denote the issue can be worked on by a contributor and removed Needs Reproduction Reproducible steps needed labels Jun 14, 2024
@melvin-bot melvin-bot bot changed the title Skeleton loader doesn't show as table rows for table views [$250] Skeleton loader doesn't show as table rows for table views Jun 14, 2024
Copy link

melvin-bot bot commented Jun 14, 2024

Job added to Upwork: https://www.upwork.com/jobs/~01902d6c4eb8e8b5f6

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

melvin-bot bot commented Jun 14, 2024

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

@sakluger
Copy link
Contributor

Thanks! I've removed the 'Needs Reproduction' label and added 'external'.

@truph01
Copy link
Contributor

truph01 commented Jun 15, 2024

Proposal

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

Does not look like table rows

What is the root cause of that problem?

In BaseSelectionList, there's only one Skeleton UI for all cases

<OptionsListSkeletonView shouldAnimate />

So in case the ListItem is TableListItem as in WorkspaceMembersPage

ListItem={TableListItem}

It uses the default OptionsList skeleton which is inconsistent.

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

When looking at the shared design screenshot, a few changes will be needed in ItemListSkeletonView to enable the item-container behavior (the container with round border):

<View style={itemContainerStyle}>
    <SkeletonViewContentLoader...
</View>

Next:

  • Create a customized Skeleton loader for the workspace members list/user list such as UserListSkeletonView, like done in there or there
  • Add a prop to SelectionList to let users of the list customize the skeleton view, like SkeletonView=, same pattern as customizing the ListItem. Default SkeletonView will be OptionsListSkeletonView
  • Use SkeletonView={UserListSkeletonView} in
    ListItem={TableListItem}

It's looking like this after the fix:
https://github.com/Expensify/App/assets/170341821/361c2ac3-272a-44c4-b76b-d9f0a4575276

Here's the reference implementation for UserListSkeletonView, minor style changes can be addressed in PR

import React from 'react';
import {Circle, Rect} from 'react-native-svg';
import ItemListSkeletonView from './Skeletons/ItemListSkeletonView';
import useTheme from '@hooks/useTheme';

type UserListSkeletonViewProps = {
    shouldAnimate?: boolean;
};

function UserListSkeletonView({shouldAnimate = true}: UserListSkeletonViewProps) {
    const theme = useTheme();

    return (
        <ItemListSkeletonView
            shouldAnimate={shouldAnimate}
            itemContainerStyle={{backgroundColor: theme.highlightBG, marginBottom: 12, marginHorizontal: 20, borderRadius: 8}}
            renderSkeletonItem={() => {
                return (
                    <>
                        <Circle
                            cx="40"
                            cy="32"
                            r="20"
                        />
                        <Rect
                            x="72"
                            y="18"
                            width="20%"
                            height="8"
                        />
                        <Rect
                            x="72"
                            y="38"
                            width={"10%"}
                            height="8"
                        />
                        <Rect
                            x="87%"
                            y="28"
                            width={"3%"}
                            height="8"
                        />
                        <Rect
                            x="92%"
                            y="28"
                            width={"8%"}
                            height="8"
                        />
                    </>
                );
            }}
        />
    );
}

UserListSkeletonView.displayName = 'UserListSkeletonView';

export default UserListSkeletonView;

What alternative solutions did you explore? (Optional)

Create a mapper between ListItem and SkeletonView. For example

const SkeletonViewComponent = {
    TableListItem: UserListSkeletonView
}

And use inside BaseSelectionList to map between the ListItem's displayName and the suitable skeleton view. This way we don't need to add a prop (that's potentially dependent on ListItem value) to BaseSelectionList

@truph01
Copy link
Contributor

truph01 commented Jun 15, 2024

Proposal updated to add reference implementation

@truph01
Copy link
Contributor

truph01 commented Jun 15, 2024

It's looking like this after the fix:
https://github.com/Expensify/App/assets/170341821/361c2ac3-272a-44c4-b76b-d9f0a4575276

@shawnborton Can you help take a look at the result video to see if the skeleton matches your expectation?

I think in your shared screenshot, the avatar is looking a bit big compared to the texts. The row after loaded looks like this with smaller avatar:
Screenshot 2024-06-15 at 12 50 24 PM

@shawnborton
Copy link
Contributor

The avatar in the product is 40x40, and that's the same size we're using in this component:
image

I think it just looked off because the screenshot was not as wide.

For the video you attached, can you show it as it morphs into the actual list view? That's the best way to tell how accurate the shapes/sizing/spacing of the skeleton view is. But you seem to be on the right track.

@shawnborton
Copy link
Contributor

Also cc @Expensify/design - I'm wondering if we really need the two floating shapes over to the right side of each skeleton row for this? It might look cleaner like this:
image

@jjcoffee
Copy link
Contributor

@truph01's proposal sounds good to me! I think we can continue design discussions on the PR so I'll just approve now to keep things rolling.

🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jun 17, 2024

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

@dannymcclain
Copy link
Contributor

Also cc @Expensify/design - I'm wondering if we really need the two floating shapes over to the right side of each skeleton row for this? It might look cleaner like this:

@shawnborton Seeing your mock, I don't think we need them. I don't think having them is bad, but I agree it's slightly cleaner without them.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jun 17, 2024
Copy link

melvin-bot bot commented Jun 17, 2024

📣 @jjcoffee 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

Copy link

melvin-bot bot commented Jun 17, 2024

📣 @truph01 🎉 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 📖

@sakluger
Copy link
Contributor

I also think it looks just as good without the two right-side floating shapes.

@truph01
Copy link
Contributor

truph01 commented Jun 18, 2024

@shawnborton Can you give me a figma design for this issue?

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jun 18, 2024
@truph01
Copy link
Contributor

truph01 commented Jun 18, 2024

@jjcoffee PR #43893 is ready to review.

Copy link

melvin-bot bot commented Jun 28, 2024

⚠️ Looks like this issue was linked to a Deploy Blocker here

If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

If a regression has occurred and you are the assigned CM follow the instructions here.

If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 3, 2024
@melvin-bot melvin-bot bot changed the title [$250] Skeleton loader doesn't show as table rows for table views [HOLD for payment 2024-07-10] [$250] Skeleton loader doesn't show as table rows for table views Jul 3, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 3, 2024
Copy link

melvin-bot bot commented Jul 3, 2024

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

Copy link

melvin-bot bot commented Jul 3, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.3-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 2024-07-10. 🎊

For reference, here are some details about the assignees on this issue:

Copy link

melvin-bot bot commented Jul 3, 2024

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:

  • [@blimpich] The PR that introduced the bug has been identified. Link to the PR:
  • [@blimpich] 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:
  • [@blimpich] 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:
  • [@jjcoffee / @truph01] Determine if we should create a regression test for this bug.
  • [@jjcoffee / @truph01] 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.
  • [@sakluger] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@sakluger
Copy link
Contributor

sakluger commented Jul 9, 2024

@jjcoffee can you confirm whether #44604 was actually a regression caused by this issue's PR? It seems like it was a false alarm after reading through that issue's comments.

Also, could you please complete the BZ checklist in the next day or two? Thanks!

@jjcoffee
Copy link
Contributor

jjcoffee commented Jul 9, 2024

@sakluger Yes that's right - just a false alarm! Will get on the checklist soon.

@jjcoffee
Copy link
Contributor

  • The PR that introduced the bug has been identified. Link to the PR: N/A - just a missed feature
  • 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: N/A - just a missed feature
  • 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: N/A
  • Determine if we should create a regression test for this bug. Yes
  • 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.

Regression Test Proposal

If possible throttle the network connection, in order to show the skeleton for longer. Otherwise it may help to sign out and sign back in.

  1. Go to Settings -> Workspaces and select any workspace that has members
  2. Open the Members page
  3. When the data is loading, verify that there is a skeleton displayed with table rows (indicated by a background colour on each row).

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 10, 2024
@sakluger
Copy link
Contributor

Thanks for confirming @jjcoffee! Regarding the proposed regression test - it looks good, but I'm not sure if QA has a way to throttle the connection, so I've left a note deferring to their expertise on the best way to test this.

Summarizing payment on this issue:

Contributor: @truph01 $250, paid via Upwork
Contributor+: @jjcoffee $250, paid via Upwork

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
No open projects
Archived in project
Development

No branches or pull requests

8 participants