-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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
[HOLD for payment 2024-02-15] [HOLD for payment 2024-02-14] [$500] [Wave8] [Ideal Nav] Hide Subscriptions
menu item on iOS and Android native
#35932
Comments
Current assignee @trjExpensify is eligible for the Bug assigner, not assigning anyone new. |
P.S when we raise the PR for this can we request a CP to staging, to minimise the delay in getting this onto production. |
Subscriptions
menu item on iOS and Android native Subscriptions
menu item on iOS and Android native
Job added to Upwork: https://www.upwork.com/jobs/~01e6bee6862397d920 |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Hide Subscriptions menu item on iOS and Android native What is the root cause of that problem?Currently we show the Subscriptions element in all 3 platforms App/src/pages/home/sidebar/AllSettingsScreen.tsx Lines 52 to 61 in 1da7032
What changes do you think we should make in order to solve the problem?We need to check if the device is We need to get the platform and have just a single boolean check to check if the device is not native: !isNative && { // Conditionally include "Subscriptions" item
translationKey: 'allSettingsScreen.subscriptions',
icon: Expensicons.MoneyBag,
action: () => {
Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_POLICIES_URL);
},
shouldShowRightIcon: true,
iconRight: Expensicons.NewWindow,
link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL,
}, What alternative solutions did you explore? (Optional)Create a folder as in android.tsx and ios.tsx omit the part of subscriptions, remove the part where ;
|
ProposalPlease re-state the problem that we are trying to solve in this issue.Hide Subscriptions menu item on iOS and Android native What is the root cause of that problem?new feature What changes do you think we should make in order to solve the problem?we need to hide subsriptions for native ios or android to do so we need to getplatform to get the current platform const platform = getPlatform();
const isNative = platform === CONST.PLATFORM.IOS || platform === CONST.PLATFORM.ANDROID; then show the subscriptions only if its not native here App/src/pages/home/sidebar/AllSettingsScreen.tsx Lines 52 to 61 in 26ccc06
we can change the list assignemnt to: const baseMenuItems = [
{
translationKey: 'common.workspaces',
icon: Expensicons.Building,
action: () => {
waitForNavigate(() => {
Navigation.navigate(ROUTES.SETTINGS_WORKSPACES);
})();
},
focused: !isSmallScreenWidth,
brickRoadIndicator: hasGlobalWorkspaceSettingsRBR(policies, policyMembers) ? CONST.BRICK_ROAD_INDICATOR_STATUS.ERROR : undefined,
},
...(!isNative
? [
{
translationKey: 'allSettingsScreen.subscriptions',
icon: Expensicons.MoneyBag,
action: () => {
Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_POLICIES_URL);
},
shouldShowRightIcon: true,
iconRight: Expensicons.NewWindow,
link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL,
},
]
: []),
{
translationKey: 'allSettingsScreen.cardsAndDomains',
icon: Expensicons.CardsAndDomains,
action: () => {
Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_DOMAINS_URL);
},
shouldShowRightIcon: true,
iconRight: Expensicons.NewWindow,
link: CONST.OLDDOT_URLS.ADMIN_DOMAINS_URL,
},
]; alternativelywe can create a folder for the component where it should contain 3 files the |
We do not allow |
ProposalPlease re-state the problem that we are trying to solve in this issue.Hide Subscriptions menu item on native platforms. What is the root cause of that problem?The menu item was added intentionally. What changes do you think we should make in order to solve the problem?Create a module src/libs/getShouldShowSubscriptionsMenu/index.ts /**
* Indicates whether the subscription menu should show in the all settings screen
*/
const getShouldShowSubscriptionsMenu = (): boolean => true;
export default getShouldShowSubscriptionsMenu; src/libs/getShouldShowSubscriptionsMenu/index.native.ts /**
* Indicates whether the subscription menu should show in the all settings screen
*/
const getShouldShowSubscriptionsMenu = (): boolean => false;
export default getShouldShowSubscriptionsMenu; Import and use the module to conditionally insert the Subscriptions menu item in import getShouldShowSubscriptionsMenu from '@libs/getShouldShowSubscriptionsMenu';
...
},
...(getShouldShowSubscriptionsMenu() ? [{
translationKey: 'allSettingsScreen.subscriptions',
icon: Expensicons.MoneyBag,
action: () => {
Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_POLICIES_URL);
},
shouldShowRightIcon: true,
iconRight: Expensicons.NewWindow,
link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL,
}] : []),
{
... What alternative solutions did you explore? (Optional)N/A |
ProposalPlease re-state the problem that we are trying to solve in this issue.Hide Subscriptions menu item on iOS and Android native What is the root cause of that problem?Currently we show the Subscriptions element on all platforms App/src/pages/home/sidebar/AllSettingsScreen.tsx Lines 52 to 61 in 1da7032
What changes do you think we should make in order to solve the problem?Add a simple check to see if the platform is const platform = getPlatform();
const isNotNative = platform !== CONST.PLATFORM.IOS && platform !== CONST.PLATFORM.ANDROID;
.
.
.
.
isNotNative && { // Conditionally include "Subscriptions" item
translationKey: 'allSettingsScreen.subscriptions',
icon: Expensicons.MoneyBag,
action: () => {
Link.openOldDotLink(CONST.OLDDOT_URLS.ADMIN_POLICIES_URL);
},
shouldShowRightIcon: true,
iconRight: Expensicons.NewWindow,
link: CONST.OLDDOT_URLS.ADMIN_POLICIES_URL,
},
Important We should not have the check for What alternative solutions did you explore? (Optional)N/A |
This is straightforward issue and I'd like to recommend contributor who provided the most accurate solution. |
I am urgently available to work on this issue :) |
Why dont we make it the same way we implement other components like in the selectionlist above? also available now .. so should be ready in 30 mins |
I am also available to work on the issue right away :) |
We don't need to create separate files for entire AllSettingsScreen code for this minor change. |
I see but its just a wapper component so a minor code will be introduced with the shouldshowsubscription as true .. just like here https://github.com/Expensify/App/blob/a79485c2d1c14f81623058ce9ce4a84c9c82e501/src/components/SelectionList/index.ios.tsx |
@aimane-chnaif , what would be ETA to wait for @sofi-a 's response 🤔 |
10 min more. The next candidate is @codinggeek2023 since they proposed first |
Alright, will keep the Code ready on my end :) and pushed onto github |
Seems like @sofi-a is off for the day. |
Triggered auto assignment to @luacmartins, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
okay PR will be ready in less than 30 minutes |
PR up for review :) @aimane-chnaif |
📣 @aimane-chnaif 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @codinggeek2023 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
Subscriptions
menu item on iOS and Android native Subscriptions
menu item on iOS and Android native
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.37-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-02-14. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Subscriptions
menu item on iOS and Android native Subscriptions
menu item on iOS and Android native
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.38-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue: If no regressions arise, payment will be issued on 2024-02-15. 🎊 For reference, here are some details about the assignees on this issue:
|
BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:
|
Alright, going to pay this one out. No regression, something we missed in implementation design. |
Paid! Summary as follows:
|
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: v1.4.36-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: @AndrewGable
Slack conversation: https://expensify.slack.com/archives/C036QM0SLJK/p1707240281243759
Action Performed:
Subscriptions
menu item in the LHNExpected Result:
Due to restrictions with the App store, we should hide this menu item on iOS and Android native devices.
Actual Result:
We don't hide it, and that puts us at risk of being pulled from the app store.
Workaround:
Yes, they can go to mWeb or to web/desktop to see the subscription menu item.
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
View all open jobs on GitHub
CC: @mountiny @hayata-suenaga
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: