-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Search - Receipt thumbnail for invoice has plus icon when receipt cannot be added to invoice #48368
Search - Receipt thumbnail for invoice has plus icon when receipt cannot be added to invoice #48368
Conversation
@aimane-chnaif 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] |
@luacmartins Tagging you here because I have an important question regarding search.
But canDelete is not sufficient to determine canModifyReceipt (which caused the current issue linked with this PR) instead the correct way to determine is implemented in this pr shortly it is :
But I have doubts. Doubts that the necessary data (parenetReportActions or linked reports) might not be available in local/onyx, assuming that's why props like |
They won't be available when viewing the results on the search page itself, but they should be once you click on the transaction and it opens in the RHP. |
But the data I need |
Hmm that would require additional data to be sent to the frontend, yes. The issue is that the new key wouldn't be live updated since it'd be a static key computed at the time the search was made and not a key evaluated based on report state/status. This would lead to potential out of sync values. @Expensify/design tagging you to see if we can simplify the receipt icons (maybe standardize on one) |
You know honestly, since that isn't a button/doesn't actually do anything, I personally think it would be fine to just use our receipt icon in that placeholder for everything. I think originally I was imagining that placeholder to be actionable somehow, but I don't think we're going to do that, so it makes sense to me for this to just straight up be a placeholder. Then once you click into the item, it's clear whether you can add a receipt to it or it not and where to do that. Of course curious for @Expensify/design's thoughts! |
I agree. Eager to hear more thoughts! |
Yeah I agree with what @dannymcclain is saying here. Summed it up perfectly. |
Don't think so @shawnborton, both the slashed and plus icons might mislead users we better use some general receipt thumbnail may be. |
Yeah, fair. Just noting that we do have an existing pattern we use when there is no receipt present and you cannot add a receipt. |
No, please see my screenshot above that I just posted today. |
Yeah, but that's what I am assuming a bit confusing, misleading the user that they can't modify the receipt (b/c of the slashes). But whatever you guys think we should use let me know and let me proceed with the PR 👍 |
Oh, I wasn't aware of that. In the expenses I am showing above, they are all in a non-editable state and thus I can't actually add a receipt to them. Am I missing something here though? Is there a case where we show that slash receipt icon but we actually do allow you to upload a receipt? |
No. But what I am saying is now we show the slashed one for non-editable and the plus for the editable but in this pr we are going to stop showing different receipt icons based on receipt modifiability so for me it doesn't make sense to use either of the two since they already have separate meanings to the user. |
Hmm I am not following. But I feel like we should do the following:
Is there any reason why we can't do that? |
Aha you have missed this discussion. |
@shawnborton I totally see what you're saying, and that is indeed how we originally designed it. I'm just questioning how helpful that actually is since if you want to add a receipt you have to open the expense either way. And since you have to open the expense regardless, I feel like the actual expense view does a great job communicating whether or not you can add a receipt. If you can add a receipt, you see this: If you can't add a receipt, you see this: So basically my thought is we can simplify the search row receipt placeholder and let the expense view do the heavy lifting here. I think that's what I would prefer to do, but I am but one man, a tiny speck of life on a great rock hurtling through space and time. ✨ |
Hahaha I'm also made out of space dust. I guess my thinking is that if we use a generic receipt icon as a placeholder for everything, it kinda gives the vibe that it's a placeholder for an actual receipt? I don't feel too strongly though, but I think I do lean towards using case-specific icons if we can. |
Maybe we just need to call up the judge (yo @dubielzyk-expensify !!) and see what the verdict is. |
After this discussion I think I've turned around, but I don't really love the receipt with a slash through. It feels a bit harsh and error-y. I wonder if we could do this instead to arrive somewhere in the medium: I don't feel super strongly as I don't think it needs to be super obvious in any angle. If not the one above, then I vote for what @shawnborton is saying |
I'm down to go the direction Jon suggested (and I think I do like his proposed update to the icon), but again, I don't really see the value in trying to communicate whether you can or can't add a receipt with this icon. It's not a button, so the But I am totally happy to leave it alone—I've shared my two cents! I do kinda worry that we're not solving the problem raised in this issue though—you still can't add a receipt to an invoice and we'll still be showing the |
@dannymcclain Yes. In this pr we were aiming to fix the receipt icon for invoices but @luacmartins raised a syncing issue that might arise regarding the data returned from BE here So wanted to know your opinion on using a single receipt icon for both cases instead of two separate plus and slashed icons. Therefore, If you agree with this please you need to give me the receipt thumbnail icon to use for both cases (can and cannot add receipt cases) |
Given that we already have a pattern that exists for showing a certain thumbnail icon for an expense that cannot have a receipt added, I feel like we should just reuse the existing pattern that we have today and then revisit the pattern as a whole as a separate initiative. I think some good points were made in this PR but I don't think we've really landed in one place or the other with strong conviction, so I would opt to just keep the status quo and revisit later on. That means just using the receipt with slash for expense rows for Invoices. Could we just do that to start? |
Great point. Happy to go with this. |
Yes, that's right! Thanks for summarizing it :) |
@dannymcclain Is the receipt thumbnail icon you showed #48368 (comment) already available in the app or it is a new icon you are going to give me? |
It's already in the repo—it's our standard
|
Thanks. It looks like this, I want a confirmation @dannymcclain 2024-09-10.23-59-42.mp4 |
Looks right to me! |
@FitseTLT is this ready for review? |
Will upload snapshots shortly 👍 |
@aimane-chnaif You can proceed. |
Reviewer Checklist
Screenshots/VideosAndroid: mWeb ChromeiOS: mWeb SafariMacOS: Chrome / Safariweb.movMacOS: Desktop |
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
@luacmartins I have removed receipt plus icon on the latest commit but not receipt slash as we also use it in |
This reverts commit 77c5300.
From the thump-up response I think we all agree not to delete the icon so I have reverted the last commit. Let's get it merged @luacmartins or @danieldoglas |
@danieldoglas It's ready for your final 👁️ . Thx. |
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! Thanks!
✋ 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/danieldoglas in version: 9.0.36-0 🚀
|
🚀 Deployed to production by https://github.com/grgia in version: 9.0.36-2 🚀
|
Details
Fixed Issues
$ #47390
PROPOSAL: #47390 (comment)
Tests
Go to staging.new.expensify.com
Go to FAB > Send invoice.
Send an invoice to anyone.
Go to Search > Invoices
Verify that the list for the invoice you created in (2) doesn't have the plus icon but instead a receipt thumbnail icon
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 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)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG)
)Avatar
is modified, I verified thatAvatar
is working as expected in all cases)Design
label 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
MacOS: Desktop