Skip to content

Commit

Permalink
feat: add message edited timestamp (#275)
Browse files Browse the repository at this point in the history
### 🎯 Goal

Adds styles for a new collapsible section in message status that shows
the last time message text was updated.

### 🎨 UI Changes



https://github.com/GetStream/stream-chat-css/assets/975978/efb1e985-3d67-4ba2-9b72-7522d76c8315

---------

Co-authored-by: Zita Szupera <szuperaz@gmail.com>
  • Loading branch information
myandrienko and szuperaz authored Mar 5, 2024
1 parent fbf0682 commit d61a371
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions src/v2/styles/Message/Message-layout.scss
Original file line number Diff line number Diff line change
Expand Up @@ -192,13 +192,29 @@
.str-chat__message-metadata {
grid-area: metadata;
display: flex;
flex-wrap: wrap;
align-items: center;
column-gap: var(--str-chat__spacing-1);
margin-block-start: var(--str-chat__spacing-0_5);

.str-chat__message-simple-name {
@include utils.prevent-glitch-text-overflow;
}

.str-chat__message-simple-time + .str-chat__mesage-simple-edited::before {
content: '';
margin-right: var(--str-chat__spacing-1);
}

.str-chat__message-edited-timestamp {
--str-chat__message-edited-timestamp-height: 1rem;
flex-basis: 100%;
}
}

&.str-chat__message--me .str-chat__message-metadata {
justify-content: flex-end;
text-align: right;
}

.str-chat__message-status {
Expand Down Expand Up @@ -473,3 +489,20 @@
transform: none;
}
}

.str-chat__message-edited-timestamp {
overflow: hidden;
transition: height 0.1s;

&--open {
height: var(--str-chat__message-edited-timestamp-height, 1rem);
}

&--collapsed {
height: 0;
}
}

.str-chat__message-text--pointer-cursor {
cursor: pointer;
}

0 comments on commit d61a371

Please sign in to comment.