-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
added validation for image in reciept scan #27960
added validation for image in reciept scan #27960
Conversation
@allroundexperts 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] |
@allroundexperts looks like the utility for file validation is removed in this PR, so I stick with my orignal proposal |
@allroundexperts Can you review changes and give feedback please 🙇 |
@ishpaul777 Please resolve conflicts. |
@ishpaul777 Lint failing |
Reviewer Checklist
Screenshots/VideosWebMobile Web - ChromeMobile Web - SafariDesktopiOSAndroid |
const hideReciptModal = () => { | ||
setIsAttachmentInvalid(false); | ||
}; |
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 name of this function doesn't seem to match what its doing. Can you please rename it accordingly?
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.
Requires changes.
@allroundexperts Thanks for reviewing, added require changes. |
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.
Changes requested.
@allroundexperts can you clarify questions above, Would be great if we can resolve and get this done before the end of today |
@allroundexperts Added changes |
gentle Bump @allroundexperts |
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.
@ishpaul777 Much of the logic for validating the receipts is sort of duplicated from the web version of the file. Can we please DRY this up?
Since the state shape is same, maybe we can create a new hook?
The hook can be something like:
const {reset, validate, error: {title, description} } = useReceiptValidation()
HI @allroundexperts, can you please priortize the review for this. |
This comment was marked as duplicate.
This comment was marked as duplicate.
@allroundexperts Can I get a update here? |
Pushed requested change, waiting for your response on above unresolved review |
hiI @allroundexperts, I have pushed the fix for requested changes please priortize the review. |
@allroundexperts Any updates on when to expect a review? |
@deetergp Hey, bumping for your thoughts on unresloved comment. context - #27960 (comment) |
Hello @deetergp and @allroundexperts, Sorry for the ping again, but I haven't received any feedback on above ^. I've invested a significant amount of effort into this PR. Initially, the first solution was nearly completed, but I had to rewrite it entirely based on the feedback provided here: #27960 (review). Since then, I've been diligently keeping up with the main branch to resolve conflicts, and now I'm encountering numerous conflicts again, which require further refactoring. Given these circumstances, I kindly request that no penalties be applied to this situation. Thank you for your understanding and consideration |
@ishpaul777 I think src/hooks/useReceiptValidation.js comment is still pending from your side. Can you please reply there? |
can you comment on which comment you referring to. |
|
@ishpaul777 I've pinged you multiple times but I guess this was missed. Can you please address my below comment? ![]() |
@allroundexperts i responded but i think there somthing wrong with github thread ![]() |
These are pending comments. I don't see them. |
There is something wrong with github threads all replies are sent from my side. |
Can you see these comments? @allroundexperts |
Validations are added in this PR so there was no error modal before in ios app, but yes this can be noticed while sending images (size more than max limit) to a report. |
Details
Fixed Issues
$ #27389
PROPOSAL: #27389 (comment)
Tests
On Android and IOS device -
Offline tests
QA Steps
On Android and IOS device -
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)myBool && <MyComponent />
.src/languages/*
files and using the translation methodWaiting for Copy
label for a copy review on the original GH to get the correct copy.STYLE.md
) were followedAvatar
, I verified the components usingAvatar
are working as expected)/** comment above it */
this
properly so there are no scoping issues (i.e. foronClick={this.submit}
the methodthis.submit
should be bound tothis
in the constructor)this
are necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);
ifthis.submit
is never passed to a component event handler likeonClick
)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)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
Web
Screen.Recording.2023-09-30.at.3.43.50.AM.mov
Mobile Web - Chrome
Screen.Recording.2023-09-30.at.4.15.18.AM.mov
Mobile Web - Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-09-30.at.03.01.16.mp4
Desktop
Screen.Recording.2023-09-30.at.4.22.49.AM.mov
iOS
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2023-09-30.at.03.35.43.mp4
Android
Screen.Recording.2023-09-30.at.4.12.08.AM.mov