-
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: create upload picker component #51104
Conversation
Hey! I see that you made changes to our Form component. Make sure to update the docs in FORMS.md accordingly. Cheers! |
6854225
to
eb12fa5
Compare
8d6e49f
to
73b30c6
Compare
@hungvu193 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
@shawnborton, I've updated the styles to match the attachments for chats |
Reviewing shortly |
The changes look good to me.
Screen.Recording.2024-10-23.at.22.52.06.mov |
src/languages/es.ts
Outdated
sizeExceededWithValue: ({maxUploadSizeInMB}: SizeExceededParams) => `Files exceeds ${maxUploadSizeInMB}MB. Please try again.`, | ||
tooManyFiles: ({fileLimit}: FileLimitParams) => `You can only upload up to ${fileLimit} files at a time.`, |
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 we're still waiting for translation here right?
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.
yes, we don't have the translations yet
Let us know when you have updated screenshots to review. |
updated with new videos |
@hungvu193 code updated to cover points that you've mentioned |
fc154dc
to
d34c63a
Compare
@shawnborton Do we have limit lines for the attachment name? |
I'll let the other @Expensify/design'ers give thoughts, but I kinda think we should limit it to two lines. And I wonder if we can do the clever thing that MacOS does which is to make sure the file extension still shows even when we use ellipsis. And to avoid having weirdness with too many dots with the extension ( |
Reviewer Checklist
Screenshots/VideosAndroid: Native// running issue Android: mWeb ChromeScreen.Recording.2024-10-25.at.13.39.43.moviOS: NativeIOS.moviOS: mWeb SafarimSafari.movMacOS: Chrome / SafariChrome.movMacOS: DesktopDesktop.mov |
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.
Overall LGTM!
Totally agree with Jon here, two lines seems more than reasonable and I like the idea of truncation in the middle so you can always see the file extension/ending characters. Otherwise this looks good to me! |
This comment was marked as off-topic.
This comment was marked as off-topic.
Love that idea Jon! |
Updated with translations and basic text cropping I will focus on the middle crop now. It is a bit complicated, I will divide the implementation for web and native |
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
Since it was merged can we move this improvement with middle truncation to the separate task? It is quite easy to implement it for the ios, but for the rest platform, we need to calculate the container size and inner text without the truncation, which can be very heavy. |
Let's create a follow-up PR for that |
🚀 Deployed to staging by https://github.com/madmax330 in version: 9.0.56-0 🚀
|
Details
Fixed Issues
$ #50894
PROPOSAL:
Tests
Verify that the avatar with the image picker works correctly
Verify that the Attachment picker with the menu item works well
Verify that the Attachment picker works well
Verify the upload component
src/settings/pages/Profile/PersonalDetails/LegalNamePage.tsx
with next code: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
android-native-converted.webm
Android: mWeb Chrome
android-web-converted.webm
iOS: Native
ios-nwtive-converted.mp4
iOS: mWeb Safari
ios-web-converted.mp4
MacOS: Chrome / Safari
web-converted.mov
MacOS: Desktop
desktop-converted.mov