diff --git a/frontend/src/Editor/Comments.jsx b/frontend/src/Editor/Comments.jsx index 305f3c95df..ed2c13c449 100644 --- a/frontend/src/Editor/Comments.jsx +++ b/frontend/src/Editor/Comments.jsx @@ -19,6 +19,9 @@ const Comments = ({ newThread = {}, appVersionsId, socket, canvasWidth }) => { const _users = data.users.map((u) => ({ id: u.id, display: `${capitalize(u.first_name)} ${capitalize(u.last_name)}`, + email: u.email, + first_name: u.first_name, + last_name: u.last_name, })); setUsers(_users); }); diff --git a/frontend/src/_ui/Mentions/index.js b/frontend/src/_ui/Mentions/index.js index 0b8631388f..4da8a331b9 100644 --- a/frontend/src/_ui/Mentions/index.js +++ b/frontend/src/_ui/Mentions/index.js @@ -1,5 +1,4 @@ import React from 'react'; - import { MentionsInput, Mention } from 'react-mentions'; const Mentions = ({ users, value, setValue, placeholder, darkMode }) => { @@ -30,13 +29,15 @@ const Mentions = ({ users, value, setValue, placeholder, darkMode }) => { backgroundColor: 'white', boxShadow: '0px 2px 12px rgba(41, 45, 55, 0.156863)', borderRadius: '4', - marginTop: '-20px', - height: '22px', + marginTop: '-100px', + height: '100%', + width: '270px', fontSize: '14px', color: '#282D37', }, item: { padding: '10px 16px', + height: '56px', '&focused': { background: '#EEF3F9', @@ -58,6 +59,46 @@ const Mentions = ({ users, value, setValue, placeholder, darkMode }) => { // backgroundColor: '#218DE3', // }} appendSpaceOnAdd + renderSuggestion={(suggestion) => ( +
+
+ {suggestion.first_name.slice(0, 1) + suggestion.last_name.slice(0, 1)} +
+
+

+ {suggestion.display} +

+

{suggestion.email}

+
+
+ )} /> );