-
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
Improve feed removal flow offline #54425
Improve feed removal flow offline #54425
Conversation
@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] |
return Object.fromEntries(Object.entries(companyCards).filter(([key]) => key !== CONST.EXPENSIFY_CARD.BANK)); | ||
function getCompanyFeeds(cardFeeds: OnyxEntry<CardFeeds>, shouldFilterOutRemovedFeeds = false): CompanyFeeds { | ||
return Object.fromEntries( | ||
Object.entries(cardFeeds?.settings?.companyCards ?? {}).filter(([key, value]) => { |
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.
@VickyStash Why do we remove cardFeeds?.settings?.oAuthAccountDetails here? As I understand, direct feeds will be saved in oAuthAccountDetails
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.
Right now, both custom and direct feed settings are stored under the companyCards
field. oAuthAccountDetails
stores only data for direct feed card assignment.
See the data:
[
{
"key": "sharedNVP_private_domain_member_18461622",
"onyxMethod": "set",
"value": {
"settings": {
"companyCardNicknames": {
"oauth.americanexpressfdx.com 1001": "American Express cards1",
"vcf": "Visa cards1"
},
"companyCards": {
"cdf": {
"pending": true
},
"oauth.americanexpressfdx.com 1001": {
"asrEnabled": false,
"forceReimbursable": "force_no",
"liabilityType": "personal",
"preferredPolicy": "D6A2FBEF5E601C15",
"reportTitleFormat": "",
"shouldApplyCashbackToBill": true,
"statementPeriodEndDay": 1,
"uploadLayoutSettings": []
}
},
"oAuthAccountDetails": {
"oauth.americanexpressfdx.com 1001": {
"accountList": [
"Business Green Rewards Card - 1001"
],
"credentials": "Fv6DIZqi836JYuSLyfsvzwiIQyQSIcfwBu7Mb50pxJsDjEdP2vKee64s6fjokcVu3JYgsQEL2K7qb3ItXY+kOgzyy/syGrQoMHikkvBAqhNUnzfHX1CdFoRXxXtaISS8PliI/tMXy6rnXe8CDYrbHh74lDqLHq9Xy9x4xyZ0tdUfKxC/T8yj1oVzJDQkFzVsQ5oM8cuZWdTPni9EoSKlF7q8xgwydXJIVbb3ISdHFQ27wlq3b0kT9huLe0WW17HGv8soxgTT3iJ8Bb7q5PTzLwxy7ZsLKZtPvctimAZ0Kf1tgLEwMiXeF1rzaeghzhbk5tYGSP8hmkpfNmosFtWTNvLZzFreS8ze1pUUUO6pG7ZfBDiSLkHN3nfR6LVpV3egWHofK60a7OkId9e0Ijk8wuU9p7PEpBXQI8DXeZ9WiutPuJA=",
"expiration": 1734970968
}
}
}
}
},
]
Please, see related discussion in slack.
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.
Thanks
I'm going to be OOO Dec 25 - Dec 29 🎄 |
I will try to complete my review today |
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-12-24.at.23.11.50.movAndroid: mWeb ChromeScreen.Recording.2024-12-24.at.23.13.13.moviOS: NativeScreen.Recording.2024-12-24.at.23.09.54.moviOS: mWeb SafariScreen.Recording.2024-12-24.at.23.14.24.movMacOS: Chrome / SafariScreen.Recording.2024-12-24.at.23.08.38.movMacOS: DesktopScreen.Recording.2024-12-24.at.23.10.43.mov |
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.
Thanks! Only one NAB you can address later
optimisticData.push({ | ||
onyxMethod: Onyx.METHOD.MERGE, | ||
key: `${ONYXKEYS.COLLECTION.LAST_SELECTED_FEED}${policyID}`, | ||
value: feedToOpen ?? 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.
NAB: no need to push this right? we can just add it to the array above
✋ 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.80-1 🚀
|
Explanation of Change
Improve feed removal flow offline
Fixed Issues
$ #54379
PROPOSAL: N/A
Tests
Offline tests
Same, as in the Tests section.
QA Steps
Same, as in the Tests section.
PR Author Checklist
### Fixed Issues
section aboveTests
sectionOffline steps
sectionQA steps
sectiontoggleReport
and notonIconClick
)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
iOS: Native
ios1.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
web1.mp4
MacOS: Desktop
desktop1.mp4