Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.68k stars 2.93k forks source link

Workspace - Add workflow button has no bottom padding from navigation bar #53606

Open vincdargento opened 5 hours ago

vincdargento commented 5 hours ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com 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:

Screenshots/Videos

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

View all open jobs on GitHub

melvin-bot[bot] commented 5 hours ago

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

melvin-bot[bot] commented 5 hours ago

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] commented 5 hours ago

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

github-actions[bot] commented 5 hours ago

: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.
vincdargento commented 5 hours ago

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

truph01 commented 5 hours ago

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?

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.

saifelance commented 1 hour ago

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)