-
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
fix: policy id shows as domain card description #48779
Conversation
@dominictb can we get this in review today, please? Thanks! |
@trjExpensify All the code changes have been implemented. I am adding the missing videos. |
I encountered an error when running the Android app, will update PR once it is fixed. |
@DylanDylann 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] |
src/libs/CardUtils.ts
Outdated
const match = domainName.match(CONST.REGEX.EXPENSIFY_POLICY_DOMAIN_NAME); | ||
if (match) { |
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.
@mountiny Should we use bank
field to check? If possible, I think it will be simpler
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.
We already implemented isExpensifyCard
function to check this
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 need to change this, it does not have to be only Expensify cards here, I think we need to check if this feed is a workspace feed or not.
If yes, use workspace name
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 need to change this, it does not have to be only Expensify cards here, I think we need to check if this feed is a workspace feed or not.
If yes, use workspace name
@mountiny Please elaborate this point. Thanks!
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.
src/libs/CardUtils.ts
Outdated
@@ -194,6 +195,16 @@ function getCardFeedIcon(cardFeed: string): IconAsset { | |||
return Illustrations.AmexCompanyCards; | |||
} | |||
|
|||
function getDescriptionForPolicyDomainCard(domainName: string) { | |||
const match = domainName.match(CONST.REGEX.EXPENSIFY_POLICY_DOMAIN_NAME); |
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.
So this would be more like isWorkspaceFeed
if the domain name matches the expensify-policy<policyID>.exfy
format
src/libs/CardUtils.ts
Outdated
const match = domainName.match(CONST.REGEX.EXPENSIFY_POLICY_DOMAIN_NAME); | ||
if (match) { |
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 need to change this, it does not have to be only Expensify cards here, I think we need to check if this feed is a workspace feed or not.
If yes, use workspace name
Are we ready for a re-review? |
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.
@dominictb can you please update these small changes, otherwise looks good
@dominictb Please create a physical card instead of mock data BUG: Your change works with the mock data but fails with the real data because the the letter in policyID is lowercase Screen.Recording.2024-09-11.at.17.32.26.mov |
@DylanDylann Could you retry? I turned the |
Reviewer Checklist
Screenshots/Videos |
The requested changes were addressed
✋ 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/MariaHCD in version: 9.0.34-0 🚀
|
🚀 Deployed to production by https://github.com/luacmartins in version: 9.0.34-3 🚀
|
Details
Fixed Issues
$ #48749
PROPOSAL: #48749 (comment)
Tests
Test case 1 (Use the mock data)
Fill the
${policyID}
by any existed policyID value.Test case 2
Verify that under Assigned cards section, the card description shows the workspace name
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: mWeb Chrome
Screen.Recording.2024-09-09.at.23.10.15.mov
iOS: Native
Screen.Recording.2024-09-09.at.23.05.52.mov
iOS: mWeb Safari
Screen.Recording.2024-09-09.at.22.53.22.mov
MacOS: Chrome / Safari
Screen.Recording.2024-09-09.at.22.37.36.mov
MacOS: Desktop
Screen.Recording.2024-09-09.at.22.43.53.mov