Skip to content
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 2021-11-04] Edit Workspace - Save button does not have correct padding - @parasharrajat #5767

Closed
isagoico opened this issue Oct 12, 2021 · 12 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@isagoico
Copy link

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. Navigate to a workspace
  2. Click on the workspace avatar

Expected Result:

Save button should have correct padding. For example
image

Actual Result:

Button does not have the correct padding.
image

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platform:

Where is this issue occurring?

  • Web
  • iOS
  • Android
  • Desktop App
  • Mobile Web

Version Number: 1.1.7-3

Reproducible in staging?: Yes
Reproducible in production?: No

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation
Please see the screenshots attached in the Expected and Actual results.

Expensify/Expensify Issue URL:

Issue reported by: @parasharrajat
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1633959748110300

View all open jobs on GitHub

@MelvinBot
Copy link

Triggered auto assignment to @joelbettner (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@isagoico isagoico changed the title Edit Workspace - Save button does not have correct padding Edit Workspace - Save button does not have correct padding - @parasharrajat Oct 12, 2021
@akshayasalvi
Copy link
Contributor

Proposed Solution

In WorkspaceSettingsPage.js, we have a class pageWrapper which has padding: 20 and FixedFooter also has a horizontal padding of 20. Hence, we update the FixedFooter style with

<FixedFooter style={[styles.w100, styles.ph0]}>

Screenshot with the fix:

Screenshot 2021-10-12 at 9 35 58 AM

@parasharrajat
Copy link
Member

parasharrajat commented Oct 12, 2021

I know this can be fixed by padding: 0 but that won't be effective for long.

Proposal

The workspace Edit page is not following the best practice as others. I have worked on various pages for creating and fixing issues with layouts.
Check this video, here button is not always fixed. It scrolls with the content.

output_file.mp4

I gave the footer FixedFooter name for a purpose so that it should be fixed at the bottom.But here its failing to do so.

Why it is not fixed?

Because we are adding this inside ScrollView. it is supposed to be placed adjacent to ScrollView. You can check other pages. eg: ProfilePage.

What should we do?

  1. I see that we are utilizing a common Layout WorkspacePageWithSections component to create the workspace pages. Thus we will use slots technique where we set different placeholder for JSX in layout component and then pass the parts as props just like children prop.

so Footer will be passed as

<WorkspacePageWithSections
                headerText={this.props.translate('workspace.common.edit')}
                route={this.props.route}
                footer={(
                    <FixedFooter style={[styles.w100]}>
                        <Button
                            success
                            isLoading={policy.isPolicyUpdating}
                            text={this.props.translate('workspace.editor.save')}
                            onPress={this.submit}
                            pressOnEnter
                        />
                    </FixedFooter>
                )}

then in WorkspacePageWithSections on line 76

            {this.props.children(hasVBA, policyID, isUsingECard)}

                    </View>
                </ScrollView>
            //==>    {this.props.footer}
            </ScreenWrapper>

This fix the padding issue at root and Also page layout issue.

If we want to reduce the padding thing then

  1. We should just add styles.ph0 to FixedFooter. I know this is proposed already but I am proposing as I reported the issue

.

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Oct 12, 2021
@MelvinBot
Copy link

Triggered auto assignment to @arielgreen (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@trjExpensify
Copy link
Contributor

This is polish for N6, so I'm removing the n6-hold.

@Julesssss
Copy link
Contributor

Taking over to speed up the N6 polish issue.

@parasharrajat thanks for the detailed proposal, I agree that this is the correct solution. Please go ahead.

@MelvinBot MelvinBot added Weekly KSv2 Help Wanted Apply this label when an issue is open to proposals by contributors and removed Daily KSv2 labels Oct 13, 2021
@MelvinBot
Copy link

Triggered auto assignment to @Beamanator (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@MelvinBot MelvinBot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 13, 2021
@trjExpensify
Copy link
Contributor

Posted the job and sent you the offer, @parasharrajat.

@Beamanator
Copy link
Contributor

Merged 3 days ago, not in production yet.

@MelvinBot MelvinBot removed the Overdue label Oct 21, 2021
@mountiny mountiny changed the title Edit Workspace - Save button does not have correct padding - @parasharrajat [HOLD for payment 2021-11-04] Edit Workspace - Save button does not have correct padding - @parasharrajat Oct 30, 2021
@mountiny mountiny added the Awaiting Payment Auto-added when associated PR is deployed to production label Oct 30, 2021
@Beamanator
Copy link
Contributor

As title says, waiting 2 days for payment (not overdue)

@MelvinBot MelvinBot removed the Overdue label Nov 2, 2021
@parasharrajat
Copy link
Member

Ping for
image

@trjExpensify
Copy link
Contributor

Paid 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Engineering External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
None yet
Development

No branches or pull requests

10 participants