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

[Mentions v2] Add new rule in ExpensiMark for room mentions #680

Merged
merged 5 commits into from
Apr 10, 2024

Conversation

robertKozik
Copy link
Contributor

Important

Room mentions consists of # symbol followed by room name. Room name consist of any char sequence connected by hyphens (no spaces is allowed inside room name)

Fixed Issues

$ Expensify/App#39538

Tests

  1. What unit/integration tests cover your change? What autoQA tests cover your change?
    I've created multiple unit tests to cover most of the possible usages of room/report mentions. Room mentions consists of # symbol followed by room name
  2. What tests did you perform that validates your changed worked?
    Check if existing unit tests are not failing after my. changes, added additional tests to cover room mentions

QA

  1. What does QA need to do to validate your changes?
    Room mentions are not yet visible inside E/App, so to validate this changes we should only check for regressions or other markdown rules
  2. What areas to they need to test for regressions?
    Room mention syntax is very similar to Heading syntax. Extensive testing of this aspeect of markdown parser is recommended. Moreover all other markdown rules should be untouched

@robertKozik robertKozik requested a review from a team as a code owner April 9, 2024 22:33
@melvin-bot melvin-bot bot requested review from Beamanator and removed request for a team April 9, 2024 22:33
lib/ExpensiMark.js Show resolved Hide resolved
__tests__/ExpensiMark-HTML-test.js Show resolved Hide resolved
@robertKozik
Copy link
Contributor Author

Thanks @rlinoz, I've added tests and comment

Copy link
Contributor

@Beamanator Beamanator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we also add at least 1 test for room names with - since that will probably be a pretty common use-case? Ex: #room-name, maybe even #room-123

__tests__/ExpensiMark-HTML-test.js Outdated Show resolved Hide resolved
Copy link
Contributor

@Beamanator Beamanator left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking good to me!

@robertKozik robertKozik requested a review from rlinoz April 10, 2024 10:24
@rlinoz rlinoz merged commit 5543f9a into Expensify:main Apr 10, 2024
5 checks passed
{
name: 'roomMentions',

regex: /(?<![^ \n*~_])(#[\p{Ll}0-9-]{1,80})/gmiu,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NAB but certain improvements were introduced as mentioned in this issue with respect to identifying room mentions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants