-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
[No QA] [Workspace Feeds] Integrate Deactivate_Card API #47986
[No QA] [Workspace Feeds] Integrate Deactivate_Card API #47986
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] |
@mountiny What is the expected behavior when offline? Currently, when users deactivate a card, it gets hidden. Normally, in our app, when an action is performed offline, we grey it out until the API confirms success. Screen.Recording.2024-08-26.at.20.32.56.mov |
@DylanDylann Actually this makes an external API call so I wonder if we should even allow taking this action offline. I will discuss |
Asked here |
src/pages/workspace/expensifyCard/WorkspaceExpensifyCardDetailsPage.tsx
Outdated
Show resolved
Hide resolved
# Conflicts: # src/pages/workspace/members/WorkspaceMemberDetailsPage.tsx
@VickyStash Still get conflict |
# Conflicts: # src/libs/actions/Card.ts
@DylanDylann I've added an offline modal and resolved conflicts, please take a look |
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.
Tested the PR locally and I was able to deactivate the card successfully 🎉
if (!authToken) { | ||
return; | ||
} |
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 can remove these, I am not sure sure why we started to add it, this should not happen
if (!authToken) { | |
return; | |
} |
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 I think it's to narrow down the type of authToken
, cause the type of authToken
also includes 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.
Urgh thats annoying
Reviewer Checklist
Screenshots/VideosAndroid: NativeScreen.Recording.2024-08-28.at.17.23.43.movAndroid: mWeb ChromeScreen.Recording.2024-08-28.at.17.18.49.moviOS: NativeScreen.Recording.2024-08-28.at.17.22.16.moviOS: mWeb SafariScreen.Recording.2024-08-28.at.17.16.24.movMacOS: Chrome / SafariScreen.Recording.2024-08-28.at.16.59.51.movMacOS: DesktopScreen.Recording.2024-08-28.at.17.12.17.mov |
src/libs/actions/Card.ts
Outdated
@@ -487,6 +489,44 @@ function updateExpensifyCardLimitType(workspaceAccountID: number, cardID: number | |||
API.write(WRITE_COMMANDS.UPDATE_EXPENSIFY_CARD_LIMIT_TYPE, parameters, {optimisticData, successData, failureData}); | |||
} | |||
|
|||
function deactivateCard(workspaceAccountID: number, cardID: number, card?: Card) { |
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.
Should we remove cardID param and use card.cardID
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
if (!authToken) { | ||
return; | ||
} |
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.
Urgh thats annoying
I am going to merge this as we are getting closer to deploy |
✋ 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.26-1 🚀
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.0.26-6 🚀
|
Details
Integrate Deactivate_Card API
Fixed Issues
$ #44320
PROPOSAL: N/A
Tests
Pre-steps:
workspaceFeed
beta enabledDeactivate_Card
call is executed and the card isn't displayed anymore.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
)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
MacOS: Chrome / Safari
web1.mp4