-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
Feat: Implement loading skeleton small screen width #43652
Feat: Implement loading skeleton small screen width #43652
Conversation
Pinging @Expensify/design for review here. |
Looks pretty good! I'm going to spin up a test build for easier testing. |
Another thing I noticed is that our desktop loading skeleton isn't quite accurate - it should also have the colored background behind it to simulate the table row cards that would show up. Something like this: @luacmartins perhaps we could increase the bounty and address that here as well? |
import ItemListSkeletonView from './ItemListSkeletonView'; | ||
|
||
type TableListItemSkeletonProps = { | ||
shouldAnimate?: boolean; | ||
fixedNumItems?: number; | ||
}; | ||
|
||
const circleRadius = 8; | ||
const padding = 12; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the padding on mobile for these cards is 12 vertical, and 16 horizontal.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@shawnborton Can you share the design about the "padding" you mentioned above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
renderSkeletonItem={() => ( | ||
<> | ||
<Circle | ||
cx={padding + circleRadius} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of doing any fancy math here, can we just say that this should be 16x16?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The fancy math will help me when debugging. I will remove these once we do not have a design change any more. Also, in this case, padding + circleRadius = 16
<Rect | ||
x={padding + circleRadius * 2 + 4} | ||
y={padding + circleRadius - 2} | ||
width={windowWidth * 0.2} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we just give this a fixed width of 40?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't match the Figma design though. Can you double check? The receipt icon is 36x40.
This comment has been minimized.
This comment has been minimized.
But this in a quick Figma file for easier inspection too. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good. I agree with @shawnborton's comments. We need to adjust some of the values and also I think we should remove a lot of the math and just set fixed values for these.
|
I will add the fixed values once there is no design that needs to be updated. The math helps me a lot of when debugging. |
Can you please review the Figma file here to make sure you are using the exact measurements? Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@truph01 is this ready for review again?
Hmm any idea why iOS failed to build? |
Anyways let's start reviewing this and getting some screenshots. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM. I kicked off another test build. Let's get this one wrapped up!
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
@truph01 Please add test steps to the OP. Thanks. |
@akinwale I added the test steps |
Sorry for the late comment, but I realized that this component should actually be 108px tall. We need an extra 8px of gap between the top header row and the bottom content: This way it will match up perfectly with our changes here: #43733 |
@truph01 seems like we have to make some small adjustments |
@shawnborton I updated it. Here is result: |
Looks good to me. Let's get this thing into final review! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Reviewer Checklist
Screenshots/VideosAndroid: Native43652-android-native.mp4Android: mWeb Chrome43652-android-chrome.mp4iOS: Native43652-ios-native.mp4iOS: mWeb Safari43652-ios-safari.mp4MacOS: Chrome / Safari43652-web.mp4MacOS: Desktop43652-desktop.mp4 |
Screenshots look good! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
🚀 Deployed to staging by https://github.com/luacmartins in version: 9.0.2-0 🚀
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.0.3-7 🚀
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.5-13 🚀
|
Details
Fixed Issues
$ #43395
PROPOSAL: #43395 (comment)
Tests
Mobile device
Desktop device
Offline tests
QA Steps
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodSTYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label and/or tagged@Expensify/design
so the design team can review the changes.ScrollView
component to make it scrollable when more elements are added to the page.main
branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTest
steps.Screenshots/Videos
Android: Native
Screen.Recording.2024-06-13.at.19.01.45.mov
Android: mWeb Chrome
Screen.Recording.2024-06-13.at.19.00.56.mov
iOS: Native
Screen.Recording.2024-06-13.at.19.17.31.mov
iOS: mWeb Safari
Screen.Recording.2024-06-13.at.18.59.19.mov
MacOS: Chrome / Safari
Screen.Recording.2024-06-13.at.18.55.17.mov
MacOS: Desktop
Screen.Recording.2024-06-13.at.19.02.34.mov