Open IuliiaHerets opened 3 weeks ago
Triggered auto assignment to @kevinksullivan (Bug
), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.
We think that this bug might be related to #wave-control
@kevinksullivan FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors
Workspace upgrade - View your subscription links in upgrade success RHP opens Workspaces page
When the page is being removed the useEffect below is called and the app is navigate to a different route according to the logic below. https://github.com/Expensify/App/blob/0e4f02e116b03dcab3cb7a69e1c3a6e95b1d8443/src/pages/workspace/upgrade/WorkspaceUpgradePage.tsx#L42-L64
I believe we should only call confirmUpgrade
when user confirms it, so we should remove the useEffect
and pass the confirmUpgrade
to UpgradeConfirmation
using the onConfirmUpgrade
prop.
onConfirmUpgrade={() => {
Navigation.dismissModal();
confirmUpgrade();
}}
Instead of Navigation.navigate
, we can use Navigation.closeAndNavigate(ROUTES.SETTINGS_SUBSCRIPTION)
.
Access your subscription links after successful upgrade by opening the Workspaces page in RHP.
When blur, the confirm process executed with navigate.
Add shouldNavigate
param to confirmUpgrade
function, and only navigate when clicked the button.
otherwise default to false
const confirmUpgrade = useCallback((shouldNavigate : boolean = false) => {
console.log('[wildebug] confirmUpgrade called with shouldNavigate:', shouldNavigate);
if (!feature) {
console.log('[wildebug] feature is not defined');
return;
}
switch (feature.id) {
case CONST.UPGRADE_FEATURE_INTRO_MAPPING.reportFields.id:
Policy.enablePolicyReportFields(policyID, true, true);
if (shouldNavigate) {
console.log('[wildebug] Navigating to:', ROUTES.WORKSPACE_MORE_FEATURES.getRoute(policyID));
return Navigation.navigate(ROUTES.WORKSPACE_MORE_FEATURES.getRoute(policyID));
}
break;
default:
if (shouldNavigate) {
if (route.params.backTo) {
console.log('[wildebug] Navigating to backTo route:', route.params.backTo);
return Navigation.navigate(route.params.backTo);
} else {
console.log('[wildebug] Navigating back');
return Navigation.goBack();
}
}
break;
}
}, [feature, policyID, route.params.backTo]);
...
{isUpgraded && (
<UpgradeConfirmation
onConfirmUpgrade={() => {
confirmUpgrade(true);
Navigation.dismissModal()}}
policyName={policy.name}
/>
)}
N/A
App opens subcription page, then quickly opens Workspaces.
When users click view your subscription, the current page will be dismiss then we have the logic to navigate to WS
We should not trigger navigation in confirmUpgrade
const confirmUpgrade = useCallback(() => {
if (!feature) {
return;
}
if(feature.id === CONST.UPGRADE_FEATURE_INTRO_MAPPING.reportFields.id){
Policy.enablePolicyReportFields(policyID, true, true);
}
}, [feature, policyID]);
For backTo, we should handle it in onBackButtonPress
and onConfirmUpgrade
like we did in other places.
NA
@kevinksullivan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Job added to Upwork: https://www.upwork.com/jobs/~01dbc6c489313735ea
Triggered auto assignment to Contributor-plus team member for initial proposal review - @rayane-djouah (External
)
@rayane-djouah What do you think about my proposal
Will review the proposals today
@kevinksullivan, @rayane-djouah Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
Sorry for the delay! Reviewing 👀
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸
Thank you, everyone, for your proposals.
I agree that the root cause is that when the "upgrade" page is closed, we navigate to the ROUTES.WORKSPACE_MORE_FEATURES
route in the confirmUpgrade
function, even if the user has clicked on the "view subscription" link.
Regarding the proposed solutions:
@Krishna2323,
I believe we should only call
confirmUpgrade
when user confirms it, so we should remove theuseEffect
and pass theconfirmUpgrade
toUpgradeConfirmation
using theonConfirmUpgrade
prop.
We need to call the confirmUpgrade
function if the user does not click on the "Got it, thanks!" button and simply closes the RHP by clicking elsewhere on the screen.
Instead of
Navigation.navigate
, we can useNavigation.closeAndNavigate(ROUTES.SETTINGS_SUBSCRIPTION)
.
This will navigate to subscription page without calling confirmUpgrade
function (report fields will not be enabled)
@wildan-m,
Add shouldNavigate param to confirmUpgrade function, and only navigate when clicked the button. otherwise default to false
This approach will navigate to the subscription page without calling the confirmUpgrade
function (and the report fields will not be enabled).
I agree with @dominictb that we should not trigger navigation within the confirmUpgrade
function. Instead, we should only handle the backTo
logic in the onBackButtonPress
and onConfirmUpgrade
functions.
@dominictb's proposal looks good to me. :ribbon::eyes::ribbon: C+ reviewed
Triggered auto assignment to @bondydaa, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
📣 @rayane-djouah 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!
📣 @dominictb 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!
Offer link Upwork job Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑💻 Keep in mind: Code of Conduct | Contributing 📖
@bondydaa @kevinksullivan @rayane-djouah @dominictb this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!
@bondydaa, @kevinksullivan, @rayane-djouah, @dominictb Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
i'll be OOO next week so if/when the pr is up and i'm not back we can always re-assign
@kevinksullivan Bondy was OOO and the PR needs reassignment to proceed.
@rayane-djouah can you add 🎀 👀 🎀 C+ reviewed to assign another engineer, then ping them in a comment to ask for 👀 on the PR? Thx. (also.. we need to reassign Bondy too after the new engineer's been added)
🎀 👀 🎀
Triggered auto assignment to @thienlnam, see https://stackoverflow.com/c/expensify/questions/7972 for more details.
⚠️ Looks like this issue was linked to a Deploy Blocker here
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 9.0.22-5 Reproducible in staging?: Y Reproducible in production?: Y Email or phone of affected tester (no customers): applausetester+kh05081@applause.expensifail.com Issue reported by: Applause Internal Team
Action Performed:
Expected Result:
App will open subscription page.
Actual Result:
App opens subcription page, then quickly opens Workspaces.
Workaround:
Unknown
Platforms:
Screenshots/Videos
https://github.com/user-attachments/assets/85aaf8ff-875c-4ab6-bd33-5e44f2bf8590
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @dominictb