App icon indicating copy to clipboard operation
App copied to clipboard

[HOLD for payment 2024-12-17] Workspace - Add workflow button has no bottom padding from navigation bar

Open vincdargento opened this issue 1 year ago • 13 comments

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Issue was found while executing QA for PR #53570

Version Number: 9.0.71-1 Reproducible in staging?: Yes Reproducible in production?: No If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both If this was caught during regression testing, add the test name, ID and link from TestRail: https://github.com/Expensify/App/pull/53570 Email or phone of affected tester (no customers): N/A Issue reported by: Applause Internal Team

Action Performed:

Precondition: workspace with enabled workflows. Add approvals is ON.

  1. Go to WS > Workflows
  2. Tap on 'Add approval workflow'
  3. Input user's email > Next (2 times)

Expected Result:

'Add workflow' button has bottom padding from device navigation bar.

Actual Result:

'Add workflow' button has no bottom padding from device navigation bar.

Workaround:

Unknown

Platforms:

  • [x] Android: Standalone
  • [x] Android: HybridApp
  • [ ] Android: mWeb Chrome
  • [x] iOS: Standalone
  • [x] iOS: HybridApp
  • [ ] iOS: mWeb Safari
  • [ ] MacOS: Chrome / Safari
  • [ ] MacOS: Desktop

Screenshots/Videos

https://github.com/user-attachments/assets/45d9d7fd-65cc-40b6-860c-68dff334a1ca

View all open jobs on GitHub

Issue OwnerCurrent Issue Owner: @CortneyOfstad

vincdargento avatar Dec 04 '24 21:12 vincdargento

Triggered auto assignment to @yuwenmemon (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

melvin-bot[bot] avatar Dec 04 '24 21:12 melvin-bot[bot]

Triggered auto assignment to @CortneyOfstad (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.

melvin-bot[bot] avatar Dec 04 '24 21:12 melvin-bot[bot]

💬 A slack conversation has been started in #expensify-open-source

melvin-bot[bot] avatar Dec 04 '24 21:12 melvin-bot[bot]

:wave: Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

  1. Identify the pull request that introduced this issue and revert it.
  2. Find someone who can quickly fix the issue.
  3. Fix the issue yourself.

github-actions[bot] avatar Dec 04 '24 21:12 github-actions[bot]

@CortneyOfstad 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.

vincdargento avatar Dec 04 '24 21:12 vincdargento

Proposal

Please re-state the problem that we are trying to solve in this issue.

'Add workflow' button has no bottom padding from device navigation bar.

What is the root cause of that problem?

  • We are using: https://github.com/Expensify/App/blob/35e4761ec1d043c22b02182016a812c7da62e46d/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsCreatePage.tsx#L58

What changes do you think we should make in order to solve the problem?

  • Should remove ={false}

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

truph01 avatar Dec 04 '24 21:12 truph01

Proposal

Please re-state the problem that we are trying to solve in this issue.

The "Add Workflow" button in Workspace > Workflows lacks bottom padding, overlapping the navigation bar, making it hard to interact with on some devices.

What is the root cause of that problem?

Missing safe area padding in the ScreenWrapper component causes insufficient spacing near the device's bottom navigation bar.

What changes do you think we should make in order to solve the problem?

  1. Set includeSafeAreaPaddingBottom to true in ScreenWrapper.
  2. Add paddingBottom to the button container for consistent spacing.
  3. Update theme styles to support reusable bottom padding (e.g., pb4 for 16px).

App/src/pages/workspace/workflows/approvals/WorkspaceWorkflowsApprovalsCreatePage.tsx

<ScreenWrapper
    includeSafeAreaPaddingBottom={true} // Enabled safe area padding
    testID={WorkspaceWorkflowsApprovalsCreatePage.displayName}
>
    <FullPageNotFoundView
        shouldShow={shouldShowNotFoundView}
        subtitleKey={isEmptyObject(policy) ? undefined : 'workspace.common.notAuthorized'}
        onBackButtonPress={PolicyUtils.goBackFromInvalidPolicy}
        onLinkPress={PolicyUtils.goBackFromInvalidPolicy}
    >
        <HeaderWithBackButton
            title={translate('workflowsCreateApprovalsPage.title')}
            onBackButtonPress={() => Navigation.goBack(ROUTES.WORKSPACE_WORKFLOWS_APPROVALS_APPROVER.getRoute(route.params.policyID, 0))}
        />
        {!!approvalWorkflow && (
            <>
                <ApprovalWorkflowEditor
                    approvalWorkflow={approvalWorkflow}
                    policy={policy}
                    policyID={route.params.policyID}
                    ref={formRef}
                />
                <FormAlertWithSubmitButton
                    isAlertVisible={!isEmptyObject(approvalWorkflow?.errors)}
                    onSubmit={createApprovalWorkflow}
                    onFixTheErrorsLinkPressed={() => {
                        formRef.current?.scrollTo({y: 0, animated: true});
                    }}
                    buttonText={translate('workflowsCreateApprovalsPage.submitButton')}
                    containerStyles={[styles.mb5, styles.mh5, styles.pb4]} // Added bottom padding
                    enabledWhenOffline
                />
            </>
        )}
        {!approvalWorkflow && <FullScreenLoadingIndicator />}
    </FullPageNotFoundView>
</ScreenWrapper>

What alternative solutions did you explore? (Optional)

  • Spacer Component: Adds redundancy and complexity.
  • Hardcoded Padding: Lacks adaptability to device layouts.

saifelance avatar Dec 05 '24 02:12 saifelance

Hey, I'm Kiryl from Margelo expert agency and I'd like to work on this issue

kirillzyusko avatar Dec 05 '24 14:12 kirillzyusko

Thanks @kirillzyusko!

CortneyOfstad avatar Dec 06 '24 18:12 CortneyOfstad

Deployed to staging 2 hours ago 🎉

CortneyOfstad avatar Dec 09 '24 19:12 CortneyOfstad

Reviewing label has been removed, please complete the "BugZero Checklist".

melvin-bot[bot] avatar Dec 10 '24 22:12 melvin-bot[bot]

The solution for this issue has been :rocket: deployed to production :rocket: in version 9.0.73-8 and is now subject to a 7-day regression period :calendar:. Here is the list of pull requests that resolve this issue:

  • https://github.com/Expensify/App/pull/53632

If no regressions arise, payment will be issued on 2024-12-17. :confetti_ball:

For reference, here are some details about the assignees on this issue:

  • @kirillzyusko does not require payment (Contractor)

melvin-bot[bot] avatar Dec 10 '24 22:12 melvin-bot[bot]

@yuwenmemon @CortneyOfstad @kirillzyusko The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

melvin-bot[bot] avatar Dec 10 '24 22:12 melvin-bot[bot]

@kirillzyusko can you confirm if this needs a regression test?

CortneyOfstad avatar Dec 11 '24 18:12 CortneyOfstad

Can someone assign me to this issue as I was reviewer on the PR

alitoshmatov avatar Dec 11 '24 18:12 alitoshmatov

can you confirm if this needs a regression test?

@CortneyOfstad no, I don't think so 🙂

kirillzyusko avatar Dec 12 '24 10:12 kirillzyusko

Skipping the payment summary for this issue since all the assignees are employees or vendors. If this is incorrect, please manually add the payment summary SO.

melvin-bot[bot] avatar Dec 17 '24 09:12 melvin-bot[bot]

Payment Summary

@alitoshmatov — to be paid $250 via NewDot (PR reviewer)

Regression Test

Determined it was not needed

CortneyOfstad avatar Dec 17 '24 20:12 CortneyOfstad