-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Deprecate card.isVirtual references #39829
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
Deprecate card.isVirtual references #39829
Conversation
3e18e3a
to
a6c8b09
Compare
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.
Some type checks are failing. Should we migrate card.isVirtual
references in ActivatePhysicalCardPage.tsx, PaymentMethodList.tsx and ReportVirtualCardFraudPage.tsx to use not deprecated nameValuePairs.isVirtual
?
@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] |
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.
Off the bat, changes and migration looks pretty good! Going to use a test build to test with card data
🧪🧪 Use the links below to test this adhoc build on Android, iOS, Desktop, and Web. Happy testing! 🧪🧪
|
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-04-15.at.1.19.46.PM.movAndroid: mWeb ChromeScreen.Recording.2024-04-15.at.1.17.24.PM.moviOS: NativeError running RN debugger on iOS iOS: mWeb SafariScreen.Recording.2024-04-15.at.11.59.22.AM.movMacOS: Chrome / SafariScreen.Recording.2024-04-15.at.12.03.20.PM.movMacOS: DesktopScreen.Recording.2024-04-15.at.12.09.14.PM.mov |
nameValuePairs: { | ||
isVirtual: card.isVirtual, | ||
}, | ||
isVirtual: null, |
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.
Setting this to null
wouldn't cause this migration to run on each start? This is because at line 22
, you are making use of the following condition:
const cardsWithIsVirtualProp = Object.values(cardList).filter((card) => card.isVirtual !== undefined);
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.
good point, fixed code 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.
Looks good!
✋ 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/grgia in version: 1.4.63-0 🚀
|
🚀 Deployed to production by https://github.com/mountiny in version: 1.4.63-21 🚀
|
Details
Change name of property isVirtual to nameValuePairs.isVirtual. To keep the deprecation safe I'm also creating onyx migration for that old isVirtual key.
Fixed Issues
$ #39692
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests
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.mov
Android: mWeb Chrome
androidweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
iosweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov