Deprecate card.isVirtual references#39829
Conversation
3e18e3a to
a6c8b09
Compare
Skalakid
left a comment
There was a problem hiding this comment.
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] |
grgia
left a comment
There was a problem hiding this comment.
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.
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.
good point, fixed code accordingly!
|
✋ 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 Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso 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.mov
Android: mWeb Chrome
androidweb.mov
iOS: Native
ios.mov
iOS: mWeb Safari
iosweb.mov
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov