Page MenuHomePhabricator

[web] Modify mention typeahead regex
ClosedPublic

Authored by patryk on Aug 25 2023, 3:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Wed, Jul 17, 7:06 PM
Unknown Object (File)
Fri, Jul 12, 11:53 AM
Unknown Object (File)
Fri, Jul 12, 11:53 AM
Unknown Object (File)
Fri, Jul 12, 11:53 AM
Unknown Object (File)
Fri, Jul 12, 11:53 AM
Unknown Object (File)
Fri, Jul 12, 10:27 AM
Unknown Object (File)
Fri, Jul 12, 6:47 AM
Unknown Object (File)
Tue, Jul 9, 4:25 PM
Subscribers

Details

Summary

This diff modifies mention typeahead regex on web to support chat mentioning.

Depends on D8943.

Test Plan

Tested later in the stack.

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

patryk held this revision as a draft.
patryk edited the test plan for this revision. (Show Details)
patryk added inline comments.
web/utils/typeahead-utils.js
22 ↗(On Diff #30308)

Potential drawbacks of this solution are described here.

I think it'll be useful to add some unit tests for this regex, alongside the regex in D8834

web/utils/typeahead-utils.js
22 ↗(On Diff #30308)

Is there any point is using an alternative here? Isn't oldValidUsernameRegexString a subset of validChatNameRegexString?

Remove oldValidUsernameRegexString.

In D8944#263772, @rohan wrote:

I think it'll be useful to add some unit tests for this regex, alongside the regex in D8834

This comment doesn't appear to have been addressed

This revision is now accepted and ready to land.Sep 22 2023, 7:32 AM
This revision was automatically updated to reflect the committed changes.