App icon indicating copy to clipboard operation
App copied to clipboard

[Pay day 2023-04-26] [$1000] Compose field's left border doesn't extend as the field expands

Open kavimuru opened this issue 1 year ago β€’ 28 comments

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


Action Performed:

  1. Open chat and start typing
  2. Goto second line by pressing Shift + Return (Enter)
  3. Keep Typing and goto Next line by Pressing Shift + Return (Enter)
  4. Check line between + Button & type area (the left border of the compose field)

Expected Result:

Line Should extend along with text box size

Actual Result:

Line is not extending along with text box size

image

Workaround:

N/A - minimal impact

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • [x] Android / native
  • [x] Android / Chrome
  • [x] iOS / native
  • [x] iOS / Safari
  • [x] MacOS / Chrome / Safari
  • [x] MacOS / Desktop

Version Number: 1.3.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 Notes/Photos/Videos: Any additional supporting documentation Untitled Screenshot 2023-04-13 at 2 41 58 PM

https://user-images.githubusercontent.com/43996225/231903889-b83833eb-198e-4ffc-9bac-79b10c813894.mov

Expensify/Expensify Issue URL: Issue reported by: @corange-lab Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1681377556974939

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019ff38561f983d47e
  • Upwork Job ID: 1646855304295243776
  • Last Price Increase: 2023-04-14

kavimuru avatar Apr 13 '23 23:04 kavimuru

Triggered auto assignment to @conorpendergrast (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

MelvinBot avatar Apr 13 '23 23:04 MelvinBot

Bug0 Triage Checklist (Main S/O)

  • [x] This "bug" occurs on a supported platform (ensure Platforms in OP are βœ…)
  • [x] This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • [x] This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • [x] This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • [x] I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

MelvinBot avatar Apr 13 '23 23:04 MelvinBot

@kavimuru this issue title seems... wrong πŸ˜†

conorpendergrast avatar Apr 14 '23 08:04 conorpendergrast

@kavimuru this issue title seems... wrong πŸ˜†

@conorpendergrast i wrote that title and i don't have word for it so ..

corange-lab avatar Apr 14 '23 09:04 corange-lab

Oh hah, I just spotted that it's in the Slack thread about this πŸ˜„

conorpendergrast avatar Apr 14 '23 09:04 conorpendergrast

I'm going to re-title this to make it a little clearer, but I did enjoy that previous title. Reproduced

image

conorpendergrast avatar Apr 14 '23 12:04 conorpendergrast

Job added to Upwork: https://www.upwork.com/jobs/~019ff38561f983d47e

MelvinBot avatar Apr 14 '23 12:04 MelvinBot

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

MelvinBot avatar Apr 14 '23 12:04 MelvinBot

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

MelvinBot avatar Apr 14 '23 12:04 MelvinBot

Proposal

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

When composer has multiline text at that time right border beside Plus icon does not expand vertically.

What is the root cause of that problem?

This is the parent view that consist all three button i.e. collapse, expand, and addAction https://github.com/Expensify/App/blob/ab9b7d9ef1fb1656f5ccfc28ca4a68820fa373b4/src/pages/home/report/ReportActionCompose/index.js#L764-L768

Plus button shows right border via View having styles.chatItemAttachBorder as shown below: https://github.com/Expensify/App/blob/ab9b7d9ef1fb1656f5ccfc28ca4a68820fa373b4/src/pages/home/report/ReportActionCompose/index.js#L807

chatItemAttachBorder consist below style: https://github.com/Expensify/App/blob/ab9b7d9ef1fb1656f5ccfc28ca4a68820fa373b4/src/styles/styles.js#L1587-L1590

So during multiline plus button view does not expand vertically so line does not show. This is the root cause of the problem.

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

We have to do below changes to solve this

  1. Remove View from line 807 as shown below
<View style={styles.chatItemAttachBorder}>    // *** Remove this
   .... // Keep this content
</View>.     // *** Remove this
  1. Apply styles.chatItemAttachBorder to its parent View that starts at line 764 as shown below:
 <View style={[ 
     styles.dFlex, styles.flexColumn, 
     (this.state.isFullComposerAvailable || this.props.isComposerFullSize) ? styles.justifyContentBetween : styles.justifyContentEnd, 
    styles.chatItemAttachBorder,   // *** Add this
 ]} 
 > 

Note: We can rename styles.chatItemAttachBorder if wish, otherwise it is ok. It consist style for right border.

So this will solve the issue. It is working as expected in all platform. Sample video added in Results section below.

What alternative solutions did you explore? (Optional)

None

Results

https://user-images.githubusercontent.com/7823358/232017357-d7f7142a-feac-4587-ba19-5f4fc8d0333c.mov

PrashantMangukiya avatar Apr 14 '23 12:04 PrashantMangukiya

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

MelvinBot avatar Apr 14 '23 12:04 MelvinBot

Proposal

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

Line in the composer doesn't extend as the user presses shift enter

What is the root cause of that problem?

This line is created by using a borderRight. this border is added with "styles.chatItemAttachBorder" but originally only added to the View element of the actionButton which does not wrap the entire element that will expand with the textArea

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

We can move the style to a higher level, that way the border is attached to the entire element and will expand properly

<AttachmentPicker>
    {({openPicker}) => (
        <>
            <View style={[
                styles.chatItemAttachBorder,
                styles.dFlex, styles.flexColumn,
                (this.state.isFullComposerAvailable || this.props.isComposerFullSize) ? styles.justifyContentBetween : styles.justifyContentEnd,
            ]}
            >

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.

AmjedNazzal avatar Apr 14 '23 12:04 AmjedNazzal

Proposal

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

Right border isn't applied to the composer entire inner area

What is the root cause of that problem?

Currently, right border is only given to the plus icon View so whenever multiple lines are rendered in the composer textarea, right border won't apply to the full available height. https://github.com/Expensify/App/blob/ab9b7d9ef1fb1656f5ccfc28ca4a68820fa373b4/src/pages/home/report/ReportActionCompose/index.js#L806-L807

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

Apply styles.chatItemAttachBorder to the parent View of these items instead of only applying it to the Plus icon view and remove not required View of Plus icon. https://github.com/Expensify/App/blob/ab9b7d9ef1fb1656f5ccfc28ca4a68820fa373b4/src/pages/home/report/ReportActionCompose/index.js#L764-L767

Pujan92 avatar Apr 14 '23 13:04 Pujan92

Thank you guys for the proposals!

While everyone has the same correct solution and @PrashantMangukiya proposal is the first to post it right after the Help Wanted label. @aldo-expensify, we can go with @PrashantMangukiya's proposal!

Result Screenshot 2023-04-15 at 01 13 24 Screenshot 2023-04-15 at 01 13 17

πŸŽ€ πŸ‘€ πŸŽ€ C+ reviewed!

mollfpr avatar Apr 14 '23 18:04 mollfpr

πŸ“£ @PrashantMangukiya You have been assigned to this job by @aldo-expensify! Please apply to this job in Upwork and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review πŸ§‘β€πŸ’» Keep in mind: Code of Conduct | Contributing πŸ“–

MelvinBot avatar Apr 14 '23 18:04 MelvinBot

@mollfpr @aldo-expensify Thank you. Accepted job on Upwork. I will prepare and submit PR within two hours asap.

PrashantMangukiya avatar Apr 14 '23 18:04 PrashantMangukiya

@mollfpr @aldo-expensify PR is ready for review. Thank you.

PrashantMangukiya avatar Apr 14 '23 20:04 PrashantMangukiya

@mollfpr @aldo-expensify can i also apply on upwork?

corange-lab avatar Apr 15 '23 02:04 corange-lab

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

MelvinBot avatar Apr 19 '23 17:04 MelvinBot

The solution for this issue has been :rocket: deployed to production :rocket: in version 1.3.1-3 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/17464

If no regressions arise, payment will be issued on 2023-04-26. :confetti_ball:

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • [x] External issue reporter: @corange-lab - $250
  • [x] Contributor that fixed the issue: @PrashantMangukiya - $1000 base + 50% bonus = $1500.
  • [x] Contributor+ that helped on the issue and/or PR: @mollfpr - $1000 base + 50% bonus = $1500.

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

MelvinBot avatar Apr 19 '23 17:04 MelvinBot

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:

  • [x] [@mollfpr] The PR that introduced the bug has been identified. Link to the PR:
  • [x] [@mollfpr] 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:
  • [x] [@mollfpr] 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:
  • [x] [@conorpendergrast] Determine if we should create a regression test for this bug.
  • [x] [@mollfpr] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [x] [@conorpendergrast] Link the GH issue for creating/updating the regression test once above steps have been agreed upon: https://github.com/Expensify/Expensify/issues/281076

MelvinBot avatar Apr 19 '23 17:04 MelvinBot

@conorpendergrast Ping for Upwork.

PrashantMangukiya avatar Apr 27 '23 10:04 PrashantMangukiya

@conorpendergrast i am waiting for response on upwork.

corange-lab avatar Apr 27 '23 11:04 corange-lab

Conor is out of office and he will be back early next week to process your payments

aldo-expensify avatar Apr 27 '23 11:04 aldo-expensify

@aldo-expensify Thanks for giving update.

corange-lab avatar Apr 27 '23 12:04 corange-lab

Thanks all, and appreciate you applying via Upwork - makes it a lot easier!

Assigned: April 14th 8:18pm PR merged: April 17th 8:15pm That's less than 3 business days, and so C and C+ are eligible for 50% bonus

conorpendergrast avatar Apr 27 '23 17:04 conorpendergrast

  1. Invited and paid @PrashantMangukiya.
  2. Invited @mollfpr to the job in Upwork.
  3. @corange-lab I'm really sorry, I wasn't able to find your application on Upwork, and I haven't been able to find your Upwork profile! Can you either apply here, or reply with your Upwork profile URL and I'll invite you? Thanks!

conorpendergrast avatar Apr 27 '23 17:04 conorpendergrast

@conorpendergrast Received Thank you.

PrashantMangukiya avatar Apr 27 '23 17:04 PrashantMangukiya

  • Invited and paid @PrashantMangukiya.
  • Invited @mollfpr to the job in Upwork.
  • @corange-lab I'm really sorry, I wasn't able to find your application on Upwork, and I haven't been able to find your Upwork profile! Can you either apply here, or reply with your Upwork profile URL and I'll invite you? Thanks!

@conorpendergrast https://www.upwork.com/freelancers/~0182d5b08109999ffb Thanks for response

corange-lab avatar Apr 27 '23 18:04 corange-lab

@conorpendergrast Accepted Thanks.

corange-lab avatar Apr 28 '23 05:04 corange-lab