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

[$500] Compose box does not shrinks when content is deleted if it was previously expanded #35368

Closed
1 of 6 tasks
kavimuru opened this issue Jan 30, 2024 · 16 comments
Closed
1 of 6 tasks
Assignees
Labels
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

@kavimuru
Copy link

kavimuru commented Jan 30, 2024

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 found when executing #31483
Version Number: 1.4.33-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
Expensify/Expensify Issue URL:
Issue reported by: applause internal team
Slack conversation:

Action Performed:

Pre-requisite: user must be logged in.

  1. Go to any chat.
  2. Enter a lot of lines in the compose box until a scroll bar is displayed on the right side.
  3. Click on "Expand" button.
  4. Delete all the content in compose box.

Expected Result:

The compose box should automatically shrink if it has no content.

Actual Result:

The compose box does not shrinks when content is deleted if it was previously expanded.

Workaround:

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

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6360359_1706582079661.bandicam_2024-01-29_19-17-54-979.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~017aedeabc77efe5c8
  • Upwork Job ID: 1752276185760284672
  • Last Price Increase: 2024-01-30
  • Automatic offers:
    • dukenv0307 | Contributor | 28141989
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jan 30, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

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

@kavimuru kavimuru added the External Added to denote the issue can be worked on by a contributor label Jan 30, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

Job added to Upwork: https://www.upwork.com/jobs/~017aedeabc77efe5c8

@melvin-bot melvin-bot bot changed the title Compose box does not shrinks when content is deleted if it was previously expanded [$500] Compose box does not shrinks when content is deleted if it was previously expanded Jan 30, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jan 30, 2024
Copy link

melvin-bot bot commented Jan 30, 2024

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

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Jan 30, 2024

Proposal

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

Compose box does not shrinks when content is deleted if it was previously expanded

What is the root cause of that problem?

The main problem with this issue is that we don't have the condition for this case

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

To fix this issue we can add new useEffect for ReportActionCompose using isCommentEmpty and when we will have true value we will reset FullComposerSize

    useEffect(() => {
        if (isComposerFullSize && isCommentEmpty ) { // isComposerFullSize is optional 
            resetFullComposerSize();
        }
    }, [isCommentEmpty]);

Plus similar condition we can add for edit messages

What alternative solutions did you explore? (Optional)

NA

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jan 30, 2024

Proposal

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

  • Compose box does not shrinks when content is deleted if it was previously expanded

What is the root cause of that problem?

  • We do not have the logic to handle this case

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

  • We can call resetFullComposerSize when the numberOfLines is equal to 1 (and the content.length is equal to 0. This can be discussed in the future). For example, we can add the below to this:
        if (generalNumberOfLines === 1) {
            if (ReportUtils.getCommentLength(value) === 0) {
                resetFullComposerSize();
            }
        }
  • Also, we need to modify the resetFullComposerSize to reduce the redundant call, so it will make sure the resetFullComposerSize only calls one time when the content is deleted

  • Using isCommentEmpty can lead to the bug once the composer just contains "space" characters

What alternative solutions did you explore? (Optional)

  • NA

@melvin-bot melvin-bot bot added the Overdue label Feb 1, 2024
@laurenreidexpensify
Copy link
Contributor

@thesahindia bump for review

@melvin-bot melvin-bot bot removed the Overdue label Feb 2, 2024
@thesahindia
Copy link
Member

@dukenv0307's proposal looks good to me!

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Feb 5, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 5, 2024
Copy link

melvin-bot bot commented Feb 5, 2024

📣 @dukenv0307 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer 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 📖

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Feb 6, 2024
@dukenv0307
Copy link
Contributor

@thesahindia PR #35865 is ready to review

@melvin-bot melvin-bot bot removed the Weekly KSv2 label Feb 29, 2024
Copy link

melvin-bot bot commented Feb 29, 2024

This issue has not been updated in over 15 days. @MariaHCD, @laurenreidexpensify, @thesahindia, @dukenv0307 eroding to Monthly issue.

P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!

@melvin-bot melvin-bot bot added the Monthly KSv2 label Feb 29, 2024
@dukenv0307
Copy link
Contributor

@laurenreidexpensify The PR for this issue was deployed to production 3 weeks ago, could we proceed with payment here?

Thank you!

@laurenreidexpensify laurenreidexpensify added Daily KSv2 and removed Monthly KSv2 labels Mar 21, 2024
@laurenreidexpensify
Copy link
Contributor

thanks for bump @dukenv0307 - looking into payment now

@laurenreidexpensify
Copy link
Contributor

Payment Summary:

Contributor: @dukenv0307 $500 payment issued in Upwork
C+: @thesahindia $500 please request payment in newdot

@thesahindia can you confirm any checklist steps here before we close thanks

@thesahindia
Copy link
Member

thesahindia commented Mar 25, 2024

It's not a regression, we just weren't handling this case.

We can add a test case if we want. Here are the steps -

  1. Go to any chat.
  2. Enter a lot of lines in the composer until a scroll bar is displayed on the right side.
  3. Click on "Expand" icon.
  4. Delete all the content from the composer.
  5. Verify that the composer shrinks.

@JmillsExpensify
Copy link

$500 approved for @thesahindia

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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

7 participants