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 2023-08-03] [$1000] You can add newlines in task titles #23025

Closed
1 of 6 tasks
kbecciv opened this issue Jul 17, 2023 · 57 comments
Closed
1 of 6 tasks
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

Comments

@kbecciv
Copy link

kbecciv commented Jul 17, 2023

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. Click + icon and select assign a task
  2. Enter title and assign it to a user
  3. Click Confirm Task

Expected Result:

User should not be able to add newlines in task title

Actual Result:

User is able to add new lines

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: Dev 1.3.41-2
Reproducible in staging?: no
Reproducible in production?: no
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

Screen.Recording.2023-07-15.at.8.03.48.PM.mov

Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1689431653449869

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~019beadd628d4e1003
  • Upwork Job ID: 1681984801194803200
  • 2023-07-20
  • Automatic offers:
    • | | 0
    • dhairyasenjaliya | Contributor | 25728028
    • gadhiyamanan | Reporter | 25728030
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 17, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 17, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • 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
  • 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.
  • 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.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@thienlnam
Copy link
Contributor

We believe this is a regression of a recent PR since it's only a problem on dev but it's impacting all multi-line inputs for tasks at least

@dhairyasenjaliya
Copy link
Contributor

@thienlnam I think we should remove the multi-line for the title field on the task I believe previously it was not supported but after re-design, we have added is it intentional?

@thienlnam
Copy link
Contributor

thienlnam commented Jul 17, 2023

Yeah I agree, I don't think think task titles should be multi-line. Let's go back to disabling it in the front-end

@dhairyasenjaliya
Copy link
Contributor

Proposal

(if it goes to external)

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

  • DEV: Web - Multiline title works on the Assign task page but not on while edit from Confirm task page
  • and we have a couple more issues due to that

What is the root cause of that problem?

  • The root cause is we have added autoGrowHeight to Task related pages which are not needed 


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

  • As the title field is not multiline We just need to remove autoGrowHeight , textAlignVertical, and also containerStyles on all the task-related pages like NewTaskDetailsPage.js & TaskTitlePage.js

  • (Optionally) Also we need to remove focusAndUpdateMultilineInputRange and add normal inputRef.current.focus() on TaskTitlePage.js since this was added for multi-line only

  • (Optionally) We can reduce numberOfLines to display title as well currently its set to show 3 lines on Task view

  • Also we are not able to save multi-line tasks if we add a new line on the task so probably not supported on the backend as well

What alternative solutions did you explore? (Optional)

  • N/A

@chiragxarora
Copy link
Contributor

We believe this is a regression of a recent PR since it's only a problem on dev but it's impacting all multi-line inputs for tasks at least

yes this is a regression of recent task redesign by @jasperhuangg

@Nikhil-Vats
Copy link
Contributor

Proposal

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

Multiline title works on Assign task page but not when editing from Confirm task page.

What is the root cause of that problem?

In this PR we added the props to allow multiline input in some pages but left some other pages.

autoGrowHeight
textAlignVertical="top"
containerStyles={[styles.autoGrowHeightMultilineInput]}

autoGrowHeight
textAlignVertical="top"
containerStyles={[styles.autoGrowHeightMultilineInput]}

There is also an inconsistency here where if title and description are long then we show description in two lines but title in 1 -

<MenuItemWithTopDescription
description={props.translate('task.title')}
title={props.task.title || ''}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_TITLE)}
shouldShowRightIcon
/>
<MenuItemWithTopDescription
description={props.translate('task.description')}
title={props.task.description || ''}
onPress={() => Navigation.navigate(ROUTES.NEW_TASK_DESCRIPTION)}
shouldShowRightIcon
numberOfLinesTitle={2}
titleStyle={styles.flex1}
/>

See screenshot - image

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

  1. We need to remove the autoGrowHeight, textAlignVertical and containerStyles prop from NewTaskDetailsPage and TaskTitlePage.

  2. To fix the other inconsistency where title is shown in 1 line but description in 2, we need to add following props for MenuItemWithTopDescription in NewTaskPage that shows title after line 162 -

    numberOfLinesTitle={2}
    titleStyle={styles.flex1}
  3. We should change onEntryTransitionEnd={() => focusAndUpdateMultilineInputRange(inputRef.current)} to onEntryTransitionEnd={() => inputRef.current && inputRef.current.focus()} in TaskTitlePage as the input is not multiline anymore.

What alternative solutions did you explore? (Optional)

NA

@melvin-bot melvin-bot bot added the Overdue label Jul 19, 2023
@thienlnam thienlnam changed the title DEV: Web - Multiline title works on Assign task page but not on while edit from Confirm task page You can create multi-line task titles Jul 19, 2023
@thienlnam thienlnam changed the title You can create multi-line task titles You can add newlines in task titles Jul 19, 2023
@sonialiap sonialiap added the External Added to denote the issue can be worked on by a contributor label Jul 20, 2023
@melvin-bot melvin-bot bot changed the title You can add newlines in task titles [$1000] You can add newlines in task titles Jul 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 20, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

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

@sonialiap
Copy link
Contributor

Triaging to External

@melvin-bot
Copy link

melvin-bot bot commented Jul 20, 2023

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

@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented Jul 20, 2023

@thienlnam What's the expected OP now?

Single line for task title right or Can we have a character limit?

@Nikhil-Vats
Copy link
Contributor

@Santhosh-Sellavel, they answered here.

@Santhosh-Sellavel
Copy link
Collaborator

Thanks @Nikhil-Vats I've checked that, but will wait for @thienlnam here!

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 25, 2023
@dhairyasenjaliya
Copy link
Contributor

dhairyasenjaliya commented Jul 25, 2023

@Santhosh-Sellavel @thienlnam PR ready for review (but Reviewers is not assigned correct)

@Nikhil-Vats
Copy link
Contributor

Sure @dhairyasenjaliya . Since you have already created the PR I guess you can just discuss with the reviewers if we need to show title in 2 lines. I proposed to add it since I believe a lot of task title will be of 2 lines since width is a bit less for the MenuItem.

If you all agree then you can just add these two props in your PR.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Jul 27, 2023
@melvin-bot melvin-bot bot changed the title [$1000] You can add newlines in task titles [HOLD for payment 2023-08-03] [$1000] You can add newlines in task titles Jul 27, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jul 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.46-2 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 2023-08-03. 🎊

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.

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

For reference, here are some details about the assignees on this issue:

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 Jul 27, 2023

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:

  • [@Santhosh-Sellavel] The PR that introduced the bug has been identified. Link to the PR:
  • [@Santhosh-Sellavel] 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:
  • [@Santhosh-Sellavel] 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:
  • [@Santhosh-Sellavel] Determine if we should create a regression test for this bug.
  • [@Santhosh-Sellavel] 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.
  • [@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented Jul 27, 2023

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:

  • [@Santhosh-Sellavel] The PR that introduced the bug has been identified. Link to the PR:
  • [@Santhosh-Sellavel] 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:N/A
  • [@Santhosh-Sellavel] 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: N/A
  • [@Santhosh-Sellavel] Determine if we should create a regression test for this bug. N/A
  • [@Santhosh-Sellavel] 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.
  • [@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

This is the PR were this was caused, but it was intentional there, so skipping first there checking.

@thienlnam Do we need Regression tests here?

I guess not let me know your thoughts, thanks!

@thienlnam
Copy link
Contributor

I think we're fine to not have regression tests 👍

@Santhosh-Sellavel
Copy link
Collaborator

All set, thanks!

@Santhosh-Sellavel
Copy link
Collaborator

@sonialiap Can you summarize payments in a new comment, so I can request on ND, thanks!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 3, 2023
@Santhosh-Sellavel
Copy link
Collaborator

Santhosh-Sellavel commented Aug 3, 2023

@sonialiap Can you summarize payments in a new comment, so I can request on ND, thanks!

@sonialiap Bump on this ☝️

Also, this issue qualifies for a bonus too, thanks!

@melvin-bot melvin-bot bot added the Overdue label Aug 7, 2023
@Santhosh-Sellavel
Copy link
Collaborator

@sonialiap bump!

@melvin-bot melvin-bot bot removed the Overdue label Aug 7, 2023
@sonialiap
Copy link
Contributor

So sorry for such a long delay! 😬

@gadhiyamanan report $250 - paid ✔️
@dhairyasenjaliya fix + bonus $1500 - paid ✔️
@Santhosh-Sellavel review + bonus $1500 - please request in NewDot

@Santhosh-Sellavel
Copy link
Collaborator

Requested on ND

@JmillsExpensify
Copy link

Reviewed the details for @Santhosh-Sellavel. Approved for payment in NewDot based on BZ summary above.

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
Projects
None yet
Development

No branches or pull requests

10 participants