Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
<div
v-if="!isDeletedMessage"
class="message-main__info">
<span v-if="isSplitViewEnabled && isOwnMessage && message.lastEditTimestamp" class="editor">
<span v-if="message.lastEditTimestamp" class="editor">
<IconPencilOutline :size="14" />
<AvatarWrapper
v-if="isEditorDifferentThenAuthor"
Expand Down Expand Up @@ -503,9 +503,9 @@ export default {

isEditorDifferentThenAuthor() {
return this.message.lastEditActorId
&& this.message.lastEditActorId !== this.message.actorId
&& this.message.lastEditActorDisplayName !== this.message.actorDisplayName
&& this.message.lastEditActorType !== this.message.actorType
&& (this.message.lastEditActorId !== this.message.actorId
|| this.message.lastEditActorType !== this.message.actorType)
},
Comment on lines 504 to 509

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.

two different users with the same name will pass this and will be read as self-edited

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

So then we should fully remove displayName condition? actorId+actorType pair is unique enough


isMessagePinned() {
Expand Down Expand Up @@ -617,7 +617,8 @@ export default {
min-height: var(--clickable-area-small);
min-width: 100%;
// Layout 1 (standard view): text and info in two columns
grid-template-columns: minmax(0, $messages-text-max-width) $messages-info-width;
// Info column grows past its minimum to fit the edited-message icon, so it never overlaps the text column
grid-template-columns: minmax(0, $messages-text-max-width) minmax($messages-info-width, max-content);
row-gap: var(--default-grid-baseline);

& .message-main__thread-title,
Expand Down Expand Up @@ -691,11 +692,7 @@ export default {
width: auto;

.editor {
display: inline-flex;
align-items: center;
margin-inline-end: var(--default-grid-baseline);
gap: calc(var(--default-grid-baseline) / 2);
height: 1lh;
}
}

Expand Down Expand Up @@ -805,13 +802,25 @@ export default {
position: relative;
user-select: none;
display: flex;
align-items: center;
justify-content: flex-end;
color: var(--color-text-maxcontrast);
font-size: var(--default-font-size);
width: $messages-info-width;
min-width: $messages-info-width;

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.

this is not reset in split mode css classes. So instead of width: auto , min-width: 0; needs to be added there --sided (line 692) and --compressed-system (line 673)

Image

gap: calc(var(--default-grid-baseline) / 2);
padding-inline: calc(2 * var(--default-grid-baseline));

.editor {
display: inline-flex;
align-items: center;
gap: calc(var(--default-grid-baseline) / 2);
height: 1lh;

:deep(.avatar-wrapper) {
line-height: 0;
}
}

.date {
width: 8ch;
text-align: end;
Expand Down
3 changes: 1 addition & 2 deletions src/components/MessagesList/MessagesGroup/MessagesGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,13 @@ export default {
const firstMessage = computed(() => messages.value[0])
const {
remoteServer,
lastEditor,

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.

it was the only consumer of this computed. Instead of removing it, maybe keep it and add in aria label of the pencil icon?

actorDisplayName,
actorDisplayNameWithFallback,
} = useMessageInfo(firstMessage)
const isSidebar = inject('chatView:isSidebar', false)

const actorInfo = computed(() => {
return [actorDisplayNameWithFallback.value, remoteServer.value, lastEditor.value]
return [actorDisplayNameWithFallback.value, remoteServer.value]
.filter((value) => value).join(' ')
})

Expand Down
4 changes: 0 additions & 4 deletions src/components/MessagesList/MessagesList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -592,10 +592,6 @@ export default {
return false
}

if (!!message1.lastEditTimestamp || !!message2.lastEditTimestamp) {
return false // Edited messages are not grouped
}

Comment on lines -595 to -598

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.

There is a test test('does not group edited messages') to be removed

if (message1.actorType === ATTENDEE.ACTOR_TYPE.BOTS // Don't group messages of bots
&& message1.actorId !== ATTENDEE.CHANGELOG_BOT_ID // Apart from the changelog bot
&& message1.actorId !== ATTENDEE.SAMPLE_BOT_ID) { // Apart from the sample message
Expand Down
Loading