framework/extensions/mentions
Sami Mazouz e407c66784 New mentions format, decouple usernames from mentions (#65)
* Convert user mentions to new `@"Display Name"#ID` format

* Handle deleted user's mentions

* Convert post mentions to `@"Display Name"#pID` format

* Handle deleted user's post mentions and deleted posts mentions

* Clean display name of `"#{letters}{numbers}` (replace with underscore _)

* Adapt integration tests to new mention formats

* Use a deleted attribute for user mentions

* Introduce cleanDisplayName util

* Detect new format with autocomplete

* Slug needed on rendering only

* Invalidate user mention tag when ID is invalid
This used to be implicitly done, when there was a username attribute configured, formatter would check that all attributes are available and if not invalidate.

since we now only have `displayname` and `id` attributes which are both available from the regex matching, formatter doesn't implicitly invalidate anymore and therefore validates ANY matches. So we explicitly invalidate the tag when the ID does not match a user.

* Allow username mention format with a setting

* Add tests for turning setting on/off

* Move setting check to tag filter
Because the configurator caches, changing the setting only takes effect after the cache is cleared.

* fix: showing autocomplete at the right moment

* Add dockblocks to explain unparsing process
2021-04-21 10:58:54 +01:00
..
.github/workflows Add integration tests (#66) 2021-04-13 22:27:42 +01:00
js New mentions format, decouple usernames from mentions (#65) 2021-04-21 10:58:54 +01:00
less New mentions format, decouple usernames from mentions (#65) 2021-04-21 10:58:54 +01:00
locale New mentions format, decouple usernames from mentions (#65) 2021-04-21 10:58:54 +01:00
migrations New mentions format, decouple usernames from mentions (#65) 2021-04-21 10:58:54 +01:00
src New mentions format, decouple usernames from mentions (#65) 2021-04-21 10:58:54 +01:00
tests New mentions format, decouple usernames from mentions (#65) 2021-04-21 10:58:54 +01:00
views/emails Fix incorrect display_name showing in email notifications (#59) 2020-12-21 12:43:27 -05:00
.editorconfig Add integration tests (#66) 2021-04-13 22:27:42 +01:00
.gitattributes Webpack (#33) 2018-06-20 13:35:33 +09:30
.gitignore Add integration tests (#66) 2021-04-13 22:27:42 +01:00
.styleci.yml Update StyleCI rules 2016-11-16 15:46:20 +10:30
CHANGELOG.md Release v0.1.0-beta.16 2021-03-15 12:11:51 +01:00
composer.json Add integration tests (#66) 2021-04-13 22:27:42 +01:00
extend.php New mentions format, decouple usernames from mentions (#65) 2021-04-21 10:58:54 +01:00
LICENSE Update copyright claims in LICENSE 2019-11-30 00:01:02 +01:00