Commit Graph

11 Commits (21f0825703337fa5c5018588e70df92cb6a0b773)

Author SHA1 Message Date
Michael Weimann 526645c791
Apply prettier formatting 2022-12-12 12:24:14 +01:00
grimhilt 35ba389d61
Use "frequently used emojis" for autocompletion in composer (#8998)
Co-authored-by: grimhilt <grimhilt@users.noreply.github.com>
2022-07-21 15:27:11 +02:00
commonlawfeature 08a2d81d6b
Resolve emoji autocomplete not being temporally consistent (#8086)
* Adds a test to demonstrate the issue with emoji autocomplete reported in https://github.com/vector-im/element-web/issues/19302.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Trim trailing `:` when checking for autocompletes for emoji.

Closes https://github.com/vector-im/element-web/issues/19302

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Move all references to the emoji delimiter character to reference a constant.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Revert "Move all references to the emoji delimiter character to reference a constant."

This reverts commit ac09e71e4c6151e35d21f612c9b329ead2a381f1.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Rename variable.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Make the test file a .js file.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Update quotes to match style and make a valid stubbed room.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Fix variable name and test reporting.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Use str.replace with a regex.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Use an improved regex that does not have have to iterate through the entire string, and can just backtrack at most the last 2 characters.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

* Revert "Use an improved regex that does not have have to iterate through the
entire string, and can just backtrack at most the last 2 characters."

This regex is very efficient, but requires a specific form of the emoji
shortcode that it is not clear is within our control. This is a restriction
that is not required by the technicalities of solving the bug this PR is
attempting to fix. (It requires that an emoji shortcode end with a colon.)

This reverts commit 220cb0efb8de247158c11daf9170464a57cc3af2.

Signed-off-by: Ryan Browne <code@commonlawfeature.com>

Co-authored-by: Ryan Browne <code@commonlawfeature.com>
2022-04-14 20:31:50 +00:00
Kerry b8040a5739
Typescriptification - notification utils (#8209)
* rename ContentRules to ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* prvstest to ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* QueryMatcher-test to ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* UserActivity-test to ts

Signed-off-by: Kerry Archibald <kerrya@element.io>

* fix ts issues

Signed-off-by: Kerry Archibald <kerrya@element.io>
2022-04-01 08:45:50 +02:00
J. Ryan Stinnett ae0a8b8da4 Auto-fix lint errors 2021-06-29 13:11:58 +01:00
Šimon Brandner 46bfbbadf9
Enable indent rule and fix indent
Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
2021-04-27 17:23:27 +02:00
Germain Souquet c81847689a Remove query matcher shouldMatchPrefix support 2021-03-31 18:21:02 +01:00
Mike Pennisi 6af4d82ce7 Extend QueryMatcher's sorting heuristic
Use the order of the input keys as a signal for relative importance of
matches.

Signed-off-by: Mike Pennisi <mike@mikepennisi.com>
2020-06-17 23:41:41 -04:00
Michael Telatynski 6ad31fe023 30 test failures to go :D 2019-12-16 11:12:48 +00:00
David Baker a58de9e189 Also test the two options while we're at it 2018-10-11 21:04:50 +01:00
David Baker 53e13be047 Add some unit tests for QueryMatcher
Which 1) has a fairly complex interface with lots of subtleties and
2) is really trivial to unit test.
2018-10-11 20:50:48 +01:00