-
-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Fix mention bubbles not rendered in comment editor #35053
Fix mention bubbles not rendered in comment editor #35053
Conversation
/backport to stable25 |
/backport to stable24 |
/backport to stable23 |
03b87a3
to
66941e3
Compare
66941e3
to
a16899d
Compare
/compile amend / |
The NcRichContenteditable requires the "userData" property to be given to render the mention bubbles. Otherwise after selecting a candidate mention just "@" followed by the user id is shown in plain text. To solve that now the data of the candidate mentions is cached whenever the autocomplete list is shown, and reset once a comment has been sent. Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com> Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
a16899d
to
fedc7f4
Compare
Hey @danxuliu very sorry, I saw this PR notification but didn't make the link. When fixing it, I noticed that the issue also occurs when editing an existing comment and adding a mention. To fix it, I also had to add this: https://github.com/nextcloud/server/pull/35187/files#diff-b569f730b67ed3363f41a268df4d68e6693d02b2eddb278194ddb7326f8b041aL178-R194 Can you check your PR and add it too if necessary ? |
No problem at all :-)
That is a very good point, my pull request only fixes new comments, but not editing existing ones. Moreover, as the user data is shared between all comments at all time it is not possible to reset the candidate mentions when a comment is sent like done here. Therefore, if you are OK with that, I would instead close my pull request in favour of yours :-) |
Closed in favour of #35187 |
The NcRichContenteditable requires the
userData
property to be given to render the mention bubbles. Otherwise after selecting a candidate mention just@
followed by the user id is shown in plain text.To solve that now the data of the candidate mentions is cached whenever the autocomplete list is shown, and reset once a comment has been sent.
How to test
@
and mention any userResult with this pull request
A mention bubble is added
Result without this pull request
The user id is written in plain text