Repository navigation
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 |
| 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.
I think we're still waiting for translation here right?
There was a problem hiding this comment.
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 |
|
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 🚀
|
|
🚀 Deployed to production by https://github.com/Julesssss in version: 9.0.56-9 🚀
|
|
@pasyukevich FYI, QA was not run on this PR due to the QA test section being empty. I'm not sure if that was intended or not. In the future, please add specific QA tests to your PRs or be more clear about why there are no QA tests. If you desire to have QA run the same tests as the "Tests" section, then please indicate so by adding "Same as tests" in the QA section. Thank you! |
|
@tgolen It was intended since the component wasn't used before at the other places - QA steps will be in the next PR with the component usage |
|
OK, got it. Thanks! When that happens, please just add that context to the QA testing section. |
| attachmentImageResized: 'This image has been resized for previewing. Download for full resolution.', | ||
| attachmentImageTooLarge: 'This image is too large to preview before uploading.', | ||
| tooManyFiles: ({fileLimit}: FileLimitParams) => `You can only upload up to ${fileLimit} files at a time.`, | ||
| sizeExceededWithValue: ({maxUploadSizeInMB}: SizeExceededParams) => `Files exceeds ${maxUploadSizeInMB}MB. Please try again.`, |
There was a problem hiding this comment.
There should be a space between number and unit. Ref: #54226




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.tsxwith next code:Offline tests
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.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