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

[Regression test steps needed][$1000] BUG: Add attachment send button is too large #13193

Closed
neil-marcellini opened this issue Nov 30, 2022 · 50 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review

Comments

@neil-marcellini
Copy link
Contributor

neil-marcellini commented Nov 30, 2022

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. Log in with any account
  2. Open a chat and click the plus button to add an attachment, select a file to upload

Expected Result:

The send button is centered and has a normal width

Actual Result:

The send button stretches across the whole modal

Workaround:

Ignore the visual oddity

Platform:

All? Needs testing.

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

Version Number: v1.2.34-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos:
image

Expensify/Expensify Issue URL:
Issue reported by: @neil-marcellini
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1669828932546429

View all open jobs on GitHub

Upwork Automation - Do Not Edit

@neil-marcellini neil-marcellini added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Nov 30, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 30, 2022

Triggered auto assignment to @kevinksullivan (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@melvin-bot melvin-bot bot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Nov 30, 2022
@grgia grgia self-assigned this Nov 30, 2022
@allroundexperts
Copy link
Contributor

What is the required width @neil-marcellini?

@neil-marcellini
Copy link
Contributor Author

cc @Expensify/design

@Pujan92
Copy link
Contributor

Pujan92 commented Nov 30, 2022

Proposal

To make it normal at center postion we can update the style for the button.

App/src/styles/styles.js

Lines 472 to 474 in 2881f18

buttonConfirm: {
margin: 20,
},

alignItems: 'center',

Screenshot 2022-12-01 at 12 12 01 AM

@shawnborton
Copy link
Contributor

As for the button, we want it to be full width on mobile but for desktop, maybe we just give it a larger min-width (like 300?) and center it like it's shown above?

Looks like we need to update the background color behind the PDF as well.

@Puneet-here
Copy link
Contributor

Puneet-here commented Nov 30, 2022

Proposal

Add attachmentButtonBigScreen to styles.js

attachmentButtonBigScreen:{
        minWidth: 300,
        alignSelf: 'center'
    }

Pass {[styles.buttonConfirm, this.props.isSmallScreenWidth ? {} : styles.attachmentButtonBigScreen]} at style

style={[styles.buttonConfirm]}

small screen
Screenshot 2022-12-01 at 12 45 57 AM

big screen
Screenshot 2022-12-01 at 12 41 24 AM

We need to passkey={this.props.isSmallScreenWidth}. If we want the button size to change when decreasing screen size. Because of it the button will re render when screen size changes and the needed styles will be applied

@akshayasalvi
Copy link
Contributor

Proposal

In the styles.js update the buttonConfirm with the following styles:

  buttonConfirm: {
    alignSelf: `center`,
    minWidth: 300
  }



Web Version
image

iOS version
image

@shawnborton
Copy link
Contributor

For mobile/small devices, we should have the button extend to full width. Only desktop/wide devices should get the min-width.

@Puneet-here
Copy link
Contributor

@shawnborton, can you please check my proposal

@shawnborton
Copy link
Contributor

Yup that works for me, but let's have our contributor team file and review first.

@Pujan92
Copy link
Contributor

Pujan92 commented Nov 30, 2022

With the below solution, we can handle the small and large devices with a single class.

buttonConfirm: {
        padding: 20,
        width: '100%',
        maxWidth: 360,
        alignSelf: 'center',
    },
b8fa075e-11e9-4b2b-897d-6c645ff678d0.webm

@grgia
Copy link
Contributor

grgia commented Nov 30, 2022

Adding the external label now

@grgia grgia added the External Added to denote the issue can be worked on by a contributor label Nov 30, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 30, 2022

Current assignee @kevinksullivan is eligible for the External assigner, not assigning anyone new.

@melvin-bot melvin-bot bot changed the title BUG: Add attachment send button is too large [$1000] BUG: Add attachment send button is too large Nov 30, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 30, 2022

Job added to Upwork: https://www.upwork.com/jobs/~016b240866a2f9a693

@melvin-bot
Copy link

melvin-bot bot commented Nov 30, 2022

Triggered auto assignment to Contributor-plus team member for initial proposal review - @thesahindia (External)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Nov 30, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 30, 2022

Current assignee @grgia is eligible for the External assigner, not assigning anyone new.

@grgia grgia added the Bug Something is broken. Auto assigns a BugZero manager. label Nov 30, 2022
@melvin-bot
Copy link

melvin-bot bot commented Nov 30, 2022

Current assignee @kevinksullivan is eligible for the Bug assigner, not assigning anyone new.

@thesahindia
Copy link
Member

@Puneet-here's proposal looks good to me. It handles small screen devices too.

🎀👀🎀 C+ reviewed

cc: @grgia

@Pujan92
Copy link
Contributor

Pujan92 commented Nov 30, 2022

@thesahindia do you think this is more suitable for this change where a same class is handling both devices?

@allroundexperts
Copy link
Contributor

allroundexperts commented Nov 30, 2022

Proposal

@thesahindia @shawnborton I agree with @Puneet-here proposal. He however missed the incorrect background colour in the pdf preview screen. This can be fixed by:

diff --git a/src/components/AttachmentModal.js b/src/components/AttachmentModal.js
index 7895b119b..f1831bc09 100755
--- a/src/components/AttachmentModal.js
+++ b/src/components/AttachmentModal.js
@@ -275,10 +275,10 @@ class AttachmentModal extends PureComponent {
 
                     {/* If we have an onConfirm method show a confirmation button */}
                     {this.props.onConfirm && (
-                        <Animated.View style={StyleUtils.fade(this.state.confirmButtonFadeAnimation)}>
+                        <Animated.View style={[StyleUtils.fade(this.state.confirmButtonFadeAnimation), styles.buttonConfirmContainer]}>
                             <Button
                                 success
-                                style={[styles.buttonConfirm]}
+                                style={[styles.buttonConfirm, this.props.isSmallScreenWidth ? undefined : styles.attachmentButtonBigScreen]}
                                 textStyles={[styles.buttonConfirmText]}
                                 text={this.props.translate('common.send')}
                                 onPress={this.submitAndClose}
diff --git a/src/styles/styles.js b/src/styles/styles.js
index adedd13af..87282326e 100644
--- a/src/styles/styles.js
+++ b/src/styles/styles.js
@@ -469,6 +469,11 @@ const styles = {
         marginRight: 22,
     },
 
+    attachmentButtonBigScreen: {
+        alignSelf: 'center',
+        minWidth: 300,
+    },
+
     buttonConfirm: {
         margin: 20,
     },
@@ -1822,7 +1827,7 @@ const styles = {
 
     imageModalPDF: {
         flex: 1,
-        backgroundColor: themeColors.modalBackground,
+        backgroundColor: themeColors.componentBG,
     },
 
     PDFView: {
@@ -1830,7 +1835,7 @@ const styles = {
         // It's being used on Web/Desktop only to vertically center short PDFs,
         // while preventing the overflow of the top of long PDF files.
         display: 'grid',
-        backgroundColor: themeColors.modalBackground,
+        backgroundColor: themeColors.componentBG,
         width: '100%',
         height: '100%',
         justifyContent: 'center',

Result

Screenshot 2022-12-01 at 12 36 37 AM

@melvin-bot melvin-bot bot added the Overdue label Dec 5, 2022
@grgia grgia added the Reviewing Has a PR in review label Dec 5, 2022
@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Overdue Daily KSv2 labels Dec 5, 2022
@melvin-bot melvin-bot bot changed the title [$1000] BUG: Add attachment send button is too large [HOLD for payment 2022-12-15] [$1000] BUG: Add attachment send button is too large Dec 8, 2022
@melvin-bot
Copy link

melvin-bot bot commented Dec 8, 2022

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.36-4 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 2022-12-15. 🎊

After the hold period, please check if any of the following need payment for this issue, and if so check them off after paying:

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Dec 8, 2022

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:

  • [@thesahindia / @grgia] The PR that introduced the bug has been identified. Link to the PR:
  • [@thesahindia / @grgia] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment:
  • [@thesahindia / @grgia] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion:
  • [@kevinksullivan] A regression test has been added or updated so that the same bug will not reach production again. Link to the GH issue for creating the test here: https://github.com/Expensify/Expensify/issues/254500

@melvin-bot
Copy link

melvin-bot bot commented Dec 21, 2022

@kevinksullivan, @grgia, @thesahindia, @Puneet-here Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@kevinksullivan
Copy link
Contributor

Sorry for the delay here. @Puneet-here @thesahindia I just hired both of you for the job. Can you let me know once you've accepted to I can pay this out?

@kevinksullivan
Copy link
Contributor

And can someone fill out the checklist items as well before we close this one out?

@thesahindia
Copy link
Member

Accepted, thanks!

@thesahindia
Copy link
Member

And can someone fill out the checklist items as well before we close this one out?

It wasn't a regression ( just an improvement) so we are good here.

@mallenexpensify mallenexpensify self-assigned this Dec 24, 2022
@mallenexpensify
Copy link
Contributor

Paid @thesahindia and @Puneet-here $1500, inc. the 50% bonus for expediency.
Thanks!
I think we still need to add regression steps to TestRail, assigned myself to hopefully help with those next week.

@melvin-bot
Copy link

melvin-bot bot commented Jan 2, 2023

@kevinksullivan, @mallenexpensify, @grgia, @thesahindia, @Puneet-here Huh... This is 4 days overdue. Who can take care of this?

@thesahindia
Copy link
Member

No actions are needed from me, so unassigning.

@thesahindia thesahindia removed their assignment Jan 2, 2023
@mallenexpensify mallenexpensify changed the title [HOLD for payment 2022-12-15] [$1000] BUG: Add attachment send button is too large [Regression test steps needed][$1000] BUG: Add attachment send button is too large Jan 3, 2023
@mallenexpensify
Copy link
Contributor

Confirming regression test steps here

@mallenexpensify
Copy link
Contributor

Didn't get feedback in Slack, thinking of adding the below, will do tomorrow after leaving here for a day
Recommendation: Update to add a regression step to
Compose box - Attachments (images) as new step #4 `Verify the width of the send button doesn't extend to the far edges of the screen on desktop, web and wide devices.

Compose box - Attachments (PDF) as new step #4 `Verify the width of the send button doesn't extend to the far edges of the screen on desktop, web and wide devices.

@melvin-bot
Copy link

melvin-bot bot commented Jan 11, 2023

@kevinksullivan, @mallenexpensify, @grgia, @Puneet-here Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@mallenexpensify
Copy link
Contributor

Regression test steps added https://github.com/Expensify/Expensify/issues/254500
@thesahindia @grgia , can you check off the other three boxes here then close this?
#13193 (comment)

@thesahindia
Copy link
Member

It was an improvement and not a bug so I think we can skip them.

@mallenexpensify
Copy link
Contributor

K, closing then. @grgia plz reopen if you disagree

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 Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 External Added to denote the issue can be worked on by a contributor Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests