Commit d9d47693 authored by Coung Ngo's avatar Coung Ngo

Make tribute mentions autocomplete items bigger

Right now, the avatar and font is a bit small. This commit
increases their size.

Related to https://gitlab.com/groups/gitlab-org/-/epics/4002
parent 0df9f800
...@@ -84,7 +84,7 @@ export const tributeConfig = { ...@@ -84,7 +84,7 @@ export const tributeConfig = {
value.type === groupType ? last(value.name.split(' / ')) : `${value.name}${value.username}`, value.type === groupType ? last(value.name.split(' / ')) : `${value.name}${value.username}`,
menuItemLimit: memberLimit, menuItemLimit: memberLimit,
menuItemTemplate: ({ original }) => { menuItemTemplate: ({ original }) => {
const commonClasses = 'gl-avatar gl-avatar-s24 gl-flex-shrink-0'; const commonClasses = 'gl-avatar gl-avatar-s32 gl-flex-shrink-0';
const noAvatarClasses = `${commonClasses} gl-rounded-small const noAvatarClasses = `${commonClasses} gl-rounded-small
gl-display-flex gl-align-items-center gl-justify-content-center`; gl-display-flex gl-align-items-center gl-justify-content-center`;
...@@ -111,7 +111,7 @@ export const tributeConfig = { ...@@ -111,7 +111,7 @@ export const tributeConfig = {
return ` return `
<div class="gl-display-flex gl-align-items-center"> <div class="gl-display-flex gl-align-items-center">
${avatar} ${avatar}
<div class="gl-font-sm gl-line-height-normal gl-ml-3"> <div class="gl-line-height-normal gl-ml-4">
<div>${escape(displayName)}${count}</div> <div>${escape(displayName)}${count}</div>
<div class="gl-text-gray-700">${escape(parentGroupOrUsername)}</div> <div class="gl-text-gray-700">${escape(parentGroupOrUsername)}</div>
</div> </div>
......
...@@ -21,10 +21,10 @@ exports[`gfm_autocomplete/utils labels config shows the title in the menu item 1 ...@@ -21,10 +21,10 @@ exports[`gfm_autocomplete/utils labels config shows the title in the menu item 1
exports[`gfm_autocomplete/utils members config shows an avatar character, name, parent name, and count in the menu item for a group 1`] = ` exports[`gfm_autocomplete/utils members config shows an avatar character, name, parent name, and count in the menu item for a group 1`] = `
" "
<div class=\\"gl-display-flex gl-align-items-center\\"> <div class=\\"gl-display-flex gl-align-items-center\\">
<div class=\\"gl-avatar gl-avatar-s24 gl-flex-shrink-0 gl-rounded-small <div class=\\"gl-avatar gl-avatar-s32 gl-flex-shrink-0 gl-rounded-small
gl-display-flex gl-align-items-center gl-justify-content-center\\" aria-hidden=\\"true\\"> gl-display-flex gl-align-items-center gl-justify-content-center\\" aria-hidden=\\"true\\">
G</div> G</div>
<div class=\\"gl-font-sm gl-line-height-normal gl-ml-3\\"> <div class=\\"gl-line-height-normal gl-ml-4\\">
<div>1-1s &lt;script&gt;alert(&#39;hi&#39;)&lt;/script&gt; (2)</div> <div>1-1s &lt;script&gt;alert(&#39;hi&#39;)&lt;/script&gt; (2)</div>
<div class=\\"gl-text-gray-700\\">GitLab Support Team</div> <div class=\\"gl-text-gray-700\\">GitLab Support Team</div>
</div> </div>
...@@ -36,8 +36,8 @@ exports[`gfm_autocomplete/utils members config shows an avatar character, name, ...@@ -36,8 +36,8 @@ exports[`gfm_autocomplete/utils members config shows an avatar character, name,
exports[`gfm_autocomplete/utils members config shows the avatar, name and username in the menu item for a user 1`] = ` exports[`gfm_autocomplete/utils members config shows the avatar, name and username in the menu item for a user 1`] = `
" "
<div class=\\"gl-display-flex gl-align-items-center\\"> <div class=\\"gl-display-flex gl-align-items-center\\">
<img class=\\"gl-avatar gl-avatar-s24 gl-flex-shrink-0 gl-avatar-circle\\" src=\\"/uploads/-/system/user/avatar/123456/avatar.png\\" alt=\\"\\" /> <img class=\\"gl-avatar gl-avatar-s32 gl-flex-shrink-0 gl-avatar-circle\\" src=\\"/uploads/-/system/user/avatar/123456/avatar.png\\" alt=\\"\\" />
<div class=\\"gl-font-sm gl-line-height-normal gl-ml-3\\"> <div class=\\"gl-line-height-normal gl-ml-4\\">
<div>My Name &lt;script&gt;alert(&#39;hi&#39;)&lt;/script&gt;</div> <div>My Name &lt;script&gt;alert(&#39;hi&#39;)&lt;/script&gt;</div>
<div class=\\"gl-text-gray-700\\">@myusername</div> <div class=\\"gl-text-gray-700\\">@myusername</div>
</div> </div>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment