Skip to content

Fix mentions rendering in comment editor - #35187

Merged
artonge merged 1 commit into
masterfrom
artonge/fix/mention_in_comment_editor
Nov 21, 2022
Merged

Fix mentions rendering in comment editor#35187
artonge merged 1 commit into
masterfrom
artonge/fix/mention_in_comment_editor

Conversation

@artonge

@artongeartonge commented Nov 15, 2022

Copy link
Copy Markdown
Collaborator

NcRichContentEditable needs an index of users to properly display them[0].
This commit adds a caching logic and provides it to NcRichContentEditable.

[0] https://github.com/nextcloud/nextcloud-vue/blob/01dc781d18e2d2a81fed6ad578b90532709b7e1d/src/mixins/richEditor/index.js#L106-L119

Fix#35047

Screenshot from 2022-11-16 14-18-05

@danxuliu

Copy link
Copy Markdown
Member

This is already addressed in #35053, but it was not reviewed yet :-)

@artonge

Copy link
Copy Markdown
CollaboratorAuthor

Closing in favor of #35053

@artongeartonge closed this Nov 15, 2022
auto-merge was automatically disabled November 15, 2022 22:03

Pull request was closed

@artonge

Copy link
Copy Markdown
CollaboratorAuthor

Reopening after discussion with @danxuliu :)

@artongeartonge reopened this Nov 16, 2022
@artonge
artongeforce-pushed the artonge/fix/mention_in_comment_editor branch from 6c303e4 to 80768c2CompareNovember 16, 2022 09:24
@artonge
artonge enabled auto-merge November 16, 2022 13:18

@miaulalalamiaulalala left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM

@miaulalala

Copy link
Copy Markdown
Contributor

/backport to stable25

@miaulalala

Copy link
Copy Markdown
Contributor

/backport to stable24

@danxuliudanxuliu left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Tested and works 👍

One thing, though. It seems that editing a comment that ends with a mention in Firefox does not work (or, at least, it does not work here :-) ):

  • Use Firefox
  • Send a new comment which is just a mention (like @user0)
  • Edit that comment
  • The cursor does not appear, and typing is not reflected in the comment. On the other hand, if the message was hello @user0 it is possible to place the cursor at the beginning with the mouse and type there, but not at the end.

But I guess this is not a problem caused by this pull request (well, it is because now there are rendered mentions, but you know what I mean ;-) ).

Comment threadapps/comments/src/views/Comments.vue
@danxuliu

Copy link
Copy Markdown
Member

/backport to stable23

NcRichContentEditable needs an index of users to properly display them. This commit adds a caching logic and provides it to NcRichContentEditable.
Signed-off-by: Louis Chemineau <louis@chmn.me>
@artonge
artongeforce-pushed the artonge/fix/mention_in_comment_editor branch from 80768c2 to 0f66806CompareNovember 21, 2022 09:49
@artonge
artonge disabled auto-merge November 21, 2022 09:49
@artonge
artonge merged commit e644205 into masterNov 21, 2022
@artonge
artonge deleted the artonge/fix/mention_in_comment_editor branch November 21, 2022 11:24
@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable25

@artonge

Copy link
Copy Markdown
CollaboratorAuthor

/backport to stable24

@backportbot-nextcloud

Copy link
Copy Markdown

The backport to stable25 failed. Please do this backport manually.

1 similar comment
@backportbot-nextcloud

Copy link
Copy Markdown

The backport to stable25 failed. Please do this backport manually.

@backportbot-nextcloud

Copy link
Copy Markdown

The backport to stable24 failed. Please do this backport manually.

1 similar comment
@backportbot-nextcloud

Copy link
Copy Markdown

The backport to stable24 failed. Please do this backport manually.

@backportbot-nextcloud

Copy link
Copy Markdown

The backport to stable23 failed. Please do this backport manually.

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: comment_editor text field shows UID instead of user mention_bubble

3 participants

@artonge@danxuliu@miaulalala