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

[Awaiting checklist] [$125] Task-Inconsistency in error display on creating task with long task title #50398

Closed
3 of 6 tasks
IuliiaHerets opened this issue Oct 8, 2024 · 56 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

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Oct 8, 2024

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


Version Number: v9.0.46-2
Reproducible in staging?: Y
Reproducible in production?: Y
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Open a chat
  3. Enter [] long task name and send the message
  4. Note there was an error creating this task, please try later message is displayed.
  5. Tap plus icon -- assign task
  6. Enter in title the same ling task name used in step 3
  7. Tap next
  8. Note character limit exceeded error is displayed

Expected Result:

There must not be inconsistency in error display for long task title while creating task using assign task & via []

Actual Result:

Inconsistency in error display for long task title while creating task using assign task & via [] .

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6628212_1728383597986.screenrecorder-2024-10-08-12-39-22-160_compress_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021844741867905614976
  • Upwork Job ID: 1844741867905614976
  • Last Price Increase: 2024-11-20
  • Automatic offers:
    • wildan-m | Contributor | 105012251
Issue OwnerCurrent Issue Owner: @hoangzinh
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Oct 8, 2024
Copy link

melvin-bot bot commented Oct 8, 2024

Triggered auto assignment to @twisterdotcom (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@IuliiaHerets
Copy link
Author

@twisterdotcom FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@bernhardoj

This comment was marked as off-topic.

@ChavdaSachin
Copy link
Contributor

Proposal

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

Task-Inconsistency in error display on creating task with long task title

What is the root cause of that problem?

When we create task from create task page, we have validation for title length so we haven't considered a display error message in case task title is too long. But we could not implement the same validation for markdown.

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

Make changes to errors for failure data here

 errors: title.length>CONST.TITLE_CHARACTER_LIMIT ?ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('task.titleTooLong') : ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('task.genericCreateTaskFailureMessage'),

errors: ErrorUtils.getMicroSecondOnyxErrorWithTranslationKey('task.genericCreateTaskFailureMessage'),

include new error in en.ts and es.ts files

        titleTooLong: 'Task title is too long',

genericCreateTaskFailureMessage: 'There was an error creating this task. Please try again later.',

        taskTitleTooLong: 'El título de la tarea es demasiado largo',

genericCreateTaskFailureMessage: 'Error inesperado al crear la tarea. Por favor, inténtalo más tarde.',

This task error message is what I think is most appropriate, but any error message that team agrees on could be implemented here.(BTW this is the same error message BE responds with)

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.

@melvin-bot melvin-bot bot added the Overdue label Oct 10, 2024
@twisterdotcom
Copy link
Contributor

Very edge case, so downgrading but it is a bug.

@melvin-bot melvin-bot bot removed the Overdue label Oct 11, 2024
@twisterdotcom twisterdotcom added the External Added to denote the issue can be worked on by a contributor label Oct 11, 2024
@melvin-bot melvin-bot bot changed the title Task-Inconsistency in error display on creating task with long task title [$250] Task-Inconsistency in error display on creating task with long task title Oct 11, 2024
Copy link

melvin-bot bot commented Oct 11, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 11, 2024
Copy link

melvin-bot bot commented Oct 11, 2024

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

@twisterdotcom twisterdotcom changed the title [$250] Task-Inconsistency in error display on creating task with long task title [$125] Task-Inconsistency in error display on creating task with long task title Oct 11, 2024
@twisterdotcom twisterdotcom added Weekly KSv2 and removed Daily KSv2 labels Oct 11, 2024
Copy link

melvin-bot bot commented Oct 11, 2024

Upwork job price has been updated to $125

@shubham1206agra
Copy link
Contributor

The problem is that we are creating this task inline and do not validate it in the composer. But we should have done it.

@ChavdaSachin
Copy link
Contributor

@shubham1206agra you are right, we do not validate it in composer.
But there is a reason why we can't.....
These are the two outcomes we could think of...

  1. We don't have MD preview for task like we have for other MD, else we could stop showing preview and user can understand that title is too long.
  2. We could stop making createTask call and let it be a regular comment. which does not look consistent IMO.

Do you have any suggestions how can we inform user about the length if we validate in composer? I can't think of any...

Copy link

melvin-bot bot commented Oct 18, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@shubham1206agra
Copy link
Contributor

@twisterdotcom I don't think we are showing error at correct place. We should show error before submitting the message. Just like maximum limit exceeded for comment. Do you agree with this comment?

Copy link

melvin-bot bot commented Oct 22, 2024

@twisterdotcom @shubham1206agra this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

Copy link

melvin-bot bot commented Oct 25, 2024

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@shubham1206agra
Copy link
Contributor

@twisterdotcom Bump here #50398 (comment)

@melvin-bot melvin-bot bot added the Overdue label Oct 30, 2024
@twisterdotcom
Copy link
Contributor

Man this bug is so niche. Yes, I agree, if we can show the error earlier, ie before they even try to send the message to create the task, that is better and as you say, more in line with the comment maximum error.

@melvin-bot melvin-bot bot removed the Overdue label Oct 31, 2024
@marcaaron
Copy link
Contributor

marcaaron commented Nov 21, 2024

const useHandleExceedMaxCommentLength = (enableTaskTitleValidation : boolean = false) => {

I actually don't love this enableTaskTitleValidation part. What is the purpose of this boolean really? What problem is solved by opting in/out?

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

melvin-bot bot commented Nov 21, 2024

📣 @wildan-m 🎉 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 📖

@wildan-m
Copy link
Contributor

What is the purpose of this boolean really? What problem is solved by opting in/out?

@marcaaron Markdown only renders in the main composer when creating a new chat. It does not render when editing an existing chat, so task title validation is not necessary for other cases.

@marcaaron
Copy link
Contributor

task title validation is not necessary for other cases.

Feels like a pre-optimization?

@marcaaron
Copy link
Contributor

Or we can make a more specific hook?

@wildan-m
Copy link
Contributor

wildan-m commented Nov 21, 2024

@marcaaron Before, I only included the code logic in the main composer since it would be exclusively used there.

bcbde08

Or we can make a more specific hook?

can you provide more details on the suggestion? the current specific logic would call existing logic from validateCommentMaxLength

@marcaaron
Copy link
Contributor

marcaaron commented Nov 22, 2024

Yeah, sorry, I don't know how to add more details here without doing the work for you.

Mainly, I'm not wanting to see the argument to add some "exceptional" functionality. We can create a new method or just have the logic run each time. Pick either one.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Nov 22, 2024
@wildan-m
Copy link
Contributor

@hoangzinh @marcaaron The PR is ready with the most recent feedback. #52941. Thanks!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Dec 12, 2024
@melvin-bot melvin-bot bot changed the title [$125] Task-Inconsistency in error display on creating task with long task title [HOLD for payment 2024-12-19] [$125] Task-Inconsistency in error display on creating task with long task title Dec 12, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Dec 12, 2024
Copy link

melvin-bot bot commented Dec 12, 2024

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

Copy link

melvin-bot bot commented Dec 12, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.74-8 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 2024-12-19. 🎊

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

Copy link

melvin-bot bot commented Dec 12, 2024

@hoangzinh @twisterdotcom @hoangzinh The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 18, 2024
@twisterdotcom
Copy link
Contributor

twisterdotcom commented Dec 19, 2024

Payment Summary:

@twisterdotcom twisterdotcom changed the title [HOLD for payment 2024-12-19] [$125] Task-Inconsistency in error display on creating task with long task title [Awaiting checklist] [$125] Task-Inconsistency in error display on creating task with long task title Dec 19, 2024
@hoangzinh
Copy link
Contributor

hoangzinh commented Dec 19, 2024

BugZero Checklist:

  • [Contributor] Classify the bug:
Bug classification

Source of bug:

  • 1a. Result of the original design (eg. a case wasn't considered)
  • 1b. Mistake during implementation
  • 1c. Backend bug
  • 1z. Other:

Where bug was reported:

  • 2a. Reported on production (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 2d. Reported on a PR
  • 2z. Other:

Who reported the bug:

  • 3a. Expensify user
  • 3b. Expensify employee
  • 3c. Contributor
  • 3d. QA
  • 3z. Other:
  • [Contributor] 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: There is no offending PR. It's a scenario that we haven't covered before.

  • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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

  • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

  • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

    Link to issue: https://github.com/Expensify/Expensify/issues/454876

Regression Test Proposal

Test:

  1. Sign in to any account
  2. Open any chat
  3. Enter a message [] Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean ma (a creating task message with more than 100 characters)
  4. Verify that the Submit button is disabled and an error is shown with "The maximum task title length is 100 characters"
  5. Remove characters so that the message is under 100 characters
  6. Verify that the Submit button is enabled and there is no max length error

Do we agree 👍 or 👎

@hoangzinh
Copy link
Contributor

Requested payment in ND

@garrettmknight
Copy link
Contributor

$125 approved for @hoangzinh

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

9 participants