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 Payment Sept 15th][$125] Room-mWeb-Inconsistency in Character allowed to create room from fab & via mentions #48168

Closed
3 of 6 tasks
IuliiaHerets opened this issue Aug 28, 2024 · 30 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 Aug 28, 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: 9.0.25
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/4896867
Issue reported by: Applause Internal Team

Action Performed:

  1. Go to https://staging.new.expensify.com/home
  2. Tap fab - start chat -- room
  3. Paste the room name - 345688988765544445665555444555455555555555555555555555555552357777dfghgggggggg5muuuddu
  4. Create a room
  5. Via mentions create another room with same number of characters - 345688988765544445665555444555455555555555555555555555555552357777dfghgggggggg6muuuddp
  6. Note user not shown whisper to create room with all characters entered

Expected Result:

There must be consistency in Character allowed to create room from fab & via mentions.

Actual Result:

Inconsistency in Character allowed to create room from fab & via mentions.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6584877_1724817879076.bug.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018f61735c851b2aec
  • Upwork Job ID: 1829102787350296440
  • Last Price Increase: 2024-08-29
  • Automatic offers:
    • alitoshmatov | Reviewer | 103992433
    • NJ-2020 | Contributor | 103992435
Issue OwnerCurrent Issue Owner: @trjExpensify
@IuliiaHerets IuliiaHerets added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Aug 28, 2024
Copy link

melvin-bot bot commented Aug 28, 2024

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

@trjExpensify 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

@NJ-2020
Copy link
Contributor

NJ-2020 commented Aug 28, 2024

Edited by proposal-police: This proposal was edited at 2024-08-29 14:11:05 UTC.

Proposal

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

Room-mWeb-Inconsistency in Character allowed to create room from fab & via mentions

What is the root cause of that problem?

Inside the expensify-common, we limit up to 80 characters only
https://github.com/Expensify/expensify-common/blob/331f53580a4ddd7f1c8e73c7c1494d0bb22962c7/lib/ExpensiMark.ts#L298-L303

{
    name: 'reportMentions',
    regex: /(?<![^ \n*~_])(#[\p{Ll}0-9-]{1,80})(?![^<]*(?:<\/pre>|<\/code>|<\/a>))/gimu,
    replacement: '<mention-report>$1</mention-report>',
},

But here in our case we mention the room name more than 80 characters, which 87 in our case

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

We can change the limit to 99 to match in our FE as the max of the room name length, so it will be:

{
    name: 'reportMentions',
    regex: /(?<![^ \n*~_])(#[\p{Ll}0-9-]{1,99})(?![^<]*(?:<\/pre>|<\/code>|<\/a>))/gimu,
    replacement: '<mention-report>$1</mention-report>',
},

I also think we don't need to update the react-native-live-markdown because it already synced with expensify-common meaning the limit for reportMentions is up to expensify-common so when we fix the expensify-common, the react-native-live-markdown will be automatically fixed by updating to expensify-common to the latest version and build it again

What alternative solutions did you explore? (Optional)

@FitseTLT
Copy link
Contributor

FitseTLT commented Aug 28, 2024

Edited by proposal-police: This proposal was edited at 2024-08-28 13:01:34 UTC.

Proposal

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

Room-mWeb-Inconsistency in Character allowed to create room from fab & via mentions

What is the root cause of that problem?

We are allowing only 80 characters when we parse reportMenions in common But the room name character limit we are using in FE is 99 here

MAX_ROOM_NAME_LENGTH: 99,

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

We need to be consistent and pick a max limit value and ensure that same value is used in both places
The easiest thing might be to change the max room name length here to 80 same as the expensify-common parsing

MAX_ROOM_NAME_LENGTH: 99,

but if we want the reverse we can update the expensify-common code

{
    name: 'reportMentions',
    regex: /(?<![^ \n*~_])(#[\p{Ll}0-9-]{1,99})(?![^<]*(?:<\/pre>|<\/code>|<\/a>))/gimu,
    replacement: '<mention-report>$1</mention-report>',
},

What alternative solutions did you explore? (Optional)

@dominictb
Copy link
Contributor

dominictb commented Aug 29, 2024

Edited by proposal-police: This proposal was edited at 2024-08-29 09:13:32 UTC.

Proposal

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

  • Inconsistency in Character allowed to create room from fab & via mentions.

What is the root cause of that problem?

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

What alternative solutions did you explore? (Optional)

@dominictb
Copy link
Contributor

Proposal updated

@trjExpensify trjExpensify changed the title Room-mWeb-Inconsistency in Character allowed to create room from fab & via mentions [$125] Room-mWeb-Inconsistency in Character allowed to create room from fab & via mentions Aug 29, 2024
Copy link

melvin-bot bot commented Aug 29, 2024

⚠️ Could not update price automatically because there is no linked Upwork Job ID. The BZ team member will need to update the price manually in Upwork.

@trjExpensify
Copy link
Contributor

I agree we should be consistent here, but this is a quick fix, so I'm dropping the price.

@trjExpensify trjExpensify added the External Added to denote the issue can be worked on by a contributor label Aug 29, 2024
Copy link

melvin-bot bot commented Aug 29, 2024

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

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

melvin-bot bot commented Aug 29, 2024

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

@NJ-2020
Copy link
Contributor

NJ-2020 commented Aug 29, 2024

Proposal Updated

  • Added a little bit explanation about the react-native-live-markdown
  • Updated the characters limit and other

@dominictb
Copy link
Contributor

Proposal updated

  • Added a minor explanation about the solution,

@melvin-bot melvin-bot bot added the Overdue label Sep 3, 2024
@NJ-2020
Copy link
Contributor

NJ-2020 commented Sep 3, 2024

Proposal updated

  • Added a minor explanation about the react-native-live-markdown,

@alitoshmatov
Copy link
Contributor

Seems very straightforward task and all proposals are suggesting the same solution.
I think we can go with @NJ-2020 's proposal. Even without edits his original proposal suggested to update mention name length

C+ reviewed 🎀 👀 🎀

Copy link

melvin-bot bot commented Sep 3, 2024

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

@NJ-2020
Copy link
Contributor

NJ-2020 commented Sep 5, 2024

@alitoshmatov PR ready for review

Copy link

melvin-bot bot commented Sep 6, 2024

@trjExpensify, @stitesExpensify, @alitoshmatov Whoops! This issue is 2 days overdue. Let's get this updated quick!

@melvin-bot melvin-bot bot added the Overdue label Sep 6, 2024
@trjExpensify trjExpensify removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 9, 2024
@trjExpensify trjExpensify added the Awaiting Payment Auto-added when associated PR is deployed to production label Sep 9, 2024
@trjExpensify trjExpensify changed the title [$125] Room-mWeb-Inconsistency in Character allowed to create room from fab & via mentions [Awaiting Payment Sept 15th][$125] Room-mWeb-Inconsistency in Character allowed to create room from fab & via mentions Sep 9, 2024
@trjExpensify
Copy link
Contributor

Payment summary as follows:

Doesn't look like @alitoshmatov actually reviewed the PR here, so I reduced partial payment of $75 for the proposal review only.

Let me know if that's correct, and I'll issue payments after the regression period.

@trjExpensify
Copy link
Contributor

Melv, go away. @alitoshmatov @NJ-2020, we might need a version bump of expensify-common here actually?

@melvin-bot melvin-bot bot removed the Overdue label Sep 9, 2024
@NJ-2020
Copy link
Contributor

NJ-2020 commented Sep 9, 2024

@trjExpensify Yes we need to bump the expensify-common to the latest version

@trjExpensify
Copy link
Contributor

Cool, and will you raise a PR for that?

@NJ-2020
Copy link
Contributor

NJ-2020 commented Sep 10, 2024

@trjExpensify PR ready

Just to confirm that we only need to update the expensify-common version to the latest version inside react-native-live-markdown only?

@trjExpensify
Copy link
Contributor

I'll defer to @alitoshmatov on that. 👍

@alitoshmatov
Copy link
Contributor

@trjExpensify Everything looks good for me

Copy link

melvin-bot bot commented Sep 11, 2024

@trjExpensify @stitesExpensify @alitoshmatov 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!

@trjExpensify
Copy link
Contributor

Great, so we should be good here when payment is due.

Copy link

melvin-bot bot commented Sep 16, 2024

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

Offer link
Upwork job

Copy link

melvin-bot bot commented Sep 16, 2024

📣 @NJ-2020 🎉 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 📖

@trjExpensify
Copy link
Contributor

Okay, offers have been sent. Please accept, and I'll modify accordingly to match this payment summary and close it out.

@trjExpensify
Copy link
Contributor

Settled up, closing!

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
No open projects
Status: No status
Development

No branches or pull requests

7 participants