[NoQA] Feat/44307 card system messages#46281
Conversation
|
@ahmedGaber93 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] |
|
@ahmedGaber93 , sorry for the ping, you can ignore it, this PR is a part of project. |
|
@koko57 can you try and fix typescript failure?, let's try to get it approved today 🚀 |
|
I guess merging main will solve the type failure, lets try that |
|
@allgandalf I've found a fix for that, will push it in a minute, if running typecheck locally passes |
|
@koko57 , can you request a review from me please? Not able to keep track of this PR as this is not in my K2 (idk if you have that access) |
|
@allgandalf no, unfortunately I cannot do that - I don't have access |
|
@allgandalf fixed |
|
@koko57 can you remove the QA testing steps and mark this No QA, there will be several cases like new account/ no workspace / free trail expired which will exist as we are testing this hardcoded, don't want the QA to fill up with deploy blocker related to these cases |
| `Si cambias el tipo de límite de esta tarjeta a Límite inteligente, las nuevas transacciones serán rechazadas porque ya se ha alcanzado el límite de ${limit} no aprobado.`, | ||
| changeCardMonthlyLimitTypeWarning: (limit: string) => | ||
| `Si cambias el tipo de límite de esta tarjeta a Mensual, las nuevas transacciones serán rechazadas porque ya se ha alcanzado el límite de ${limit} mensual.`, | ||
| addMailingAddress: 'Añadir dirección postal', |
| changeCardMonthlyLimitTypeWarning: (limit: string) => | ||
| `If you change this card's limit type to Monthly, new transactions will be declined because the ${limit} monthly limit has already been reached.`, | ||
| addMailingAddress: 'Add mailing address', | ||
| issuedCard: (assignee: string) => `issued ${assignee} an Expensify Card! The card will arrive in 2-3 business days.`, |
There was a problem hiding this comment.
we don't have the Admin's name in the message in Figma https://www.figma.com/design/9J4v6CzMVLQbzXMnXC5Izq/%23wave-collect%3A-Workspace-Card-Feeds?node-id=2565-32040&t=p5sUZgAYMIDW3Lsb-0
There was a problem hiding this comment.
Odd :) If we are matching with the figma mocks, I'm okay with the current state, thanks for mentioning
| addMailingAddress: 'Add mailing address', | ||
| issuedCard: (assignee: string) => `issued ${assignee} an Expensify Card! The card will arrive in 2-3 business days.`, | ||
| issuedCardNoMailingAddress: (assignee: string) => `issued ${assignee} an Expensify Card! The card will be shipped once a mailing address is added.`, | ||
| issuedCardVirtual: ({assignee, link}: IssueVirtualCardParams) => `issued ${assignee} a virtual ${link}! The card can be used right away.`, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Okay i ready the convo #44307 (comment), I'll mark this as resolved
| issuedCard: (assignee: string) => `issued ${assignee} an Expensify Card! The card will arrive in 2-3 business days.`, | ||
| issuedCardNoMailingAddress: (assignee: string) => `issued ${assignee} an Expensify Card! The card will be shipped once a mailing address is added.`, | ||
| issuedCardVirtual: ({assignee, link}: IssueVirtualCardParams) => `issued ${assignee} a virtual ${link}! The card can be used right away.`, | ||
| addedAddress: (assignee: string) => `${assignee} added the address. Expensify Card will arrive in 2-3 business days.`, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Okay i ready the convo #44307 (comment), I'll mark this as resolved
| `If you change this card's limit type to Monthly, new transactions will be declined because the ${limit} monthly limit has already been reached.`, | ||
| addMailingAddress: 'Add mailing address', | ||
| issuedCard: (assignee: string) => `issued ${assignee} an Expensify Card! The card will arrive in 2-3 business days.`, | ||
| issuedCardNoMailingAddress: (assignee: string) => `issued ${assignee} an Expensify Card! The card will be shipped once a mailing address is added.`, |
This comment was marked as resolved.
This comment was marked as resolved.
Sorry, something went wrong.
There was a problem hiding this comment.
Okay i ready the convo #44307 (comment), I'll mark this as resolved
allgandalf
left a comment
There was a problem hiding this comment.
The changes suggested above are majorly about the text and not related to functionality, so I will start with the testing, but will approve after the comments are addressed
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-07-29.at.4.59.06.PM.mov |
|
At the moment, we can type the hardcoded words Screen.Recording.2024-07-29.at.3.35.50.PM.mov |
@allgandalf no, for now you can type in any chat - I don't wanted to add unnecessary extra logic that will be removed later |
Works for me thanks 👍 |
| case CONST.REPORT.ACTIONS.TYPE.CARD_MISSING_ADDRESS: | ||
| return translate(`workspace.expensifyCard.${noMailingAddress ? 'issuedCardNoMailingAddress' : 'addedAddress'}`, assignee); |
There was a problem hiding this comment.
Bug
Wrong system message for CARD_MISSING_ADDRESS it says the card will be delivered in few days instead of missing address message c.c @koko57
Screen.Recording.2024-07-29.at.4.25.24.PM.mov
There was a problem hiding this comment.
That's because you have your address added - if you wouldn't have it a proper message with button to add an address would be displayed. After you add the address it is displayed like this - that's why I added two additional cases to test regardless you have it added or not
There was a problem hiding this comment.
You can try to log into a new account that doesn't have address added to test it
There was a problem hiding this comment.
This occurs with new accounts as well:
Screen.Recording.2024-07-29.at.4.32.02.PM.mov
IMO noMailingAddress is always returning false here. can you please take a look
There was a problem hiding this comment.
@allgandalf fixed! I forgot that I changed action?.originalMessage.html for action?.actionName (the proper condition). I added an extra check that will be removed later
|
@allgandalf without it it opens in a new tab. We also have it implemented this way in |
allgandalf
left a comment
There was a problem hiding this comment.
This looks good to go into staging, we have only implemented the skeleton in here, still waiting for BE implementation for integration. thanks for addressing the issues @koko57 !
Good start to the week!
|
✋ 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/mountiny in version: 9.0.15-0 🚀
|
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.0.15-9 🚀
|
| changeCardMonthlyLimitTypeWarning: (limit: string) => | ||
| `Si cambias el tipo de límite de esta tarjeta a Mensual, las nuevas transacciones serán rechazadas porque ya se ha alcanzado el límite de ${limit} mensual.`, | ||
| addMailingAddress: 'Añadir dirección de postal', | ||
| issuedCard: (assignee: string) => `¡emitió a ${assignee} una Tarjeta Expensify! La tarjeta llegará en 2-3 días laborables.`, |








Details
To test UI I've implemented a bit hacky ;) way to test - you need to type a certain message to see the report action you want. CARDISSUED, CARDISSUEDVIRTUAL, CARDMISSINGADDRESS are the actual action names that will be handled, I also added two more for testing convenience NOMAILINGADDRESS and ADDRESSADDED - they will work regardless you have your mailing address added or not.
Fixed Issues
$ #44307
PROPOSAL: -
Tests
note: for now the mention will be green as your profile is mentioned
Offline tests
QA Steps
n/a
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)/** comment above it */thisare necessary to be bound (i.e. avoidthis.submit = this.submit.bind(this);ifthis.submitis never passed to a component event handler likeonClick)StyleUtils.getBackgroundAndBorderStyle(themeColors.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel so 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: mWeb Chrome
iOS: Native
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-07-26.at.14.09.06.mp4
iOS: mWeb Safari
Simulator.Screen.Recording.-.iPhone.15.Pro.-.2024-07-26.at.14.10.31.mp4
MacOS: Chrome / Safari
Screen.Recording.2024-07-26.at.13.46.44.mp4
MacOS: Desktop
Screen.Recording.2024-07-26.at.14.06.44.mp4