Expensify / App

Welcome to New Expensify: a complete re-imagination of financial collaboration, centered around chat. Help us build the next generation of Expensify by sharing feedback and contributing to the code.
https://new.expensify.com
MIT License
3.51k stars 2.87k forks source link

[$250] Task - On task created, description shown as hidden #51485

Open lanitochka17 opened 1 week ago

lanitochka17 commented 1 week ago

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.0.54-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: N/A Issue reported by: Applause - Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/
  2. Login with a new gmail id
  3. Open self DM
  4. Tap plus icon -- assign task
  5. Enter title
  6. Paste description - task for @applausetester+88@applause.expensifail.com point
  7. Tap next
  8. Tap confirm task
  9. Open the task
  10. Note in description, used is shown as hidden
  11. Open the description
  12. Note hidden is not selected
  13. Paste the same content and tap save
  14. Note hidden highlighted
  15. Now refresh the page
  16. Note a whisper message is shown below if description added after creating task.

Expected Result:

On task created, description must not be shown as hidden

Actual Result:

On task created, description shown as hidden. On opening description hidden not highlighted. Again saving with same description and refreshing page shows a whisper message

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Add any screenshot/video evidence

https://github.com/user-attachments/assets/f8d62492-ee87-4ff9-a902-eae8fb9cb1ec

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021851677782773395839
  • Upwork Job ID: 1851677782773395839
  • Last Price Increase: 2024-10-30
Issue OwnerCurrent Issue Owner: @akinwale
melvin-bot[bot] commented 1 week ago

Triggered auto assignment to @abekkala (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.

melvin-bot[bot] commented 4 days ago

@abekkala Whoops! This issue is 2 days overdue. Let's get this updated quick!

melvin-bot[bot] commented 2 days ago

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

melvin-bot[bot] commented 2 days ago

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

ranli commented 2 days ago

Proposal

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

Mentioned user in description shown as hidden when creating task

What is the root cause of that problem?

The user may not exist in the system. So backend return the account payload like:

{
    "accountID": 18092501,
    "avatar": "https://d2k5nsl2zxldvw.cloudfront.net/images/avatars/default-avatar_6.png",
    "firstName": "",
    "lastName": ""
}

The payload does not have displayName or login, so MentionUserRenderer will return 'Hidden' as the displayname by default.

https://github.com/Expensify/App/blob/aa6401de4a3c02adce2cb898eba8c58e1c92b62d/src/components/HTMLEngineProvider/HTMLRenderers/MentionUserRenderer.tsx#L62

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

Option 1: If we are okay to user the accountId returned from backend as the displayName, we can set the accountId as default value when getDisplayName.

mentionDisplayText = LocalePhoneNumber.formatPhoneNumber(user?.login ?? '') || PersonalDetailsUtils.getDisplayNameOrDefault(user, accountID.toString(), true, false);

Option 2: If we want a more friendly name (e.g email address we entered), backend need to return the data first. And then base on the payload backend returned, we can modify the default value in the same place as option 1.

What alternative solutions did you explore? (Optional)

N/A 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.

ranli commented 2 days ago

!(renamed webm)