Reverse changes related to mentionlink avatar, out of scope and too complicated

This commit is contained in:
Henry Jameson 2026-08-25 17:21:14 +03:00
commit 24fb1300b5
5 changed files with 4 additions and 17 deletions

View file

@ -1 +0,0 @@
If user avatars next to mentions are enabled it will show empty placeholder avatar next to label while user is being fetched, to avoid jumps

View file

@ -8,20 +8,15 @@
:href="url" :href="url"
class="original" class="original"
target="_blank" target="_blank"
><!-- eslint-enable vue/no-v-html --> v-html="content"
<UserAvatar /><!-- eslint-enable vue/no-v-html -->
v-if="shouldShowAvatar"
class="mention-avatar"
:user-id="null"
/>
<span v-html="content" />
</a>
<UserPopover <UserPopover
v-else v-else
:user-id="user.id" :user-id="user.id"
:disabled="!shouldShowTooltip" :disabled="!shouldShowTooltip"
> >
<span <span
v-if="user"
class="new" class="new"
:style="style" :style="style"
:class="classnames" :class="classnames"

View file

@ -12,7 +12,7 @@ const UserAvatar = {
props: { props: {
// UserID of a user to show avatar of // UserID of a user to show avatar of
userId: { userId: {
required: false, // You can pass null to just render a placeholder required: true,
type: String, type: String,
}, },
// Use less space and use alternative roundness // Use less space and use alternative roundness

View file

@ -70,7 +70,6 @@
&.-placeholder { &.-placeholder {
background-color: var(--background); background-color: var(--background);
border: 1px solid var(--border)
} }
} }

View file

@ -354,13 +354,11 @@ describe('RichContent', () => {
'<span class="MentionLink mention-link">', '<span class="MentionLink mention-link">',
'<a href="lol" class="original" target="_blank">', '<a href="lol" class="original" target="_blank">',
'<span>', '<span>',
'<span>',
'https://</span>', 'https://</span>',
'<span>', '<span>',
'lol.tld/</span>', 'lol.tld/</span>',
'<span>', '<span>',
'</span>', '</span>',
'</span>',
'</a>', '</a>',
'</span>', '</span>',
'</span>', '</span>',
@ -420,25 +418,21 @@ describe('RichContent', () => {
'<span class="MentionLink mention-link">', '<span class="MentionLink mention-link">',
'<a href="lol" class="original" target="_blank">', '<a href="lol" class="original" target="_blank">',
'<span>', '<span>',
'<span>',
'https://</span>', 'https://</span>',
'<span>', '<span>',
'lol.tld/</span>', 'lol.tld/</span>',
'<span>', '<span>',
'</span>', '</span>',
'</span>',
'</a>', '</a>',
'</span>', '</span>',
'<span class="MentionLink mention-link">', '<span class="MentionLink mention-link">',
'<a href="lol" class="original" target="_blank">', '<a href="lol" class="original" target="_blank">',
'<span>', '<span>',
'<span>',
'https://</span>', 'https://</span>',
'<span>', '<span>',
'lol.tld/</span>', 'lol.tld/</span>',
'<span>', '<span>',
'</span>', '</span>',
'</span>',
'</a>', '</a>',
'</span>', '</span>',
'</span>', '</span>',