-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add message edited timestamp #275
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 { | ||
|
@@ -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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @myandrienko I've added this here -> SDK's can apply this dynamically There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Angular logic for reference: https://github.com/GetStream/stream-chat-angular/pull/563/files#diff-1a38d0771c6ea73cc1bfd32b5699ffdc969cbcd65f0f99fef492517b2f201ed1R179-R183 - I know, I know that expression is a bit too complicated, but it handles the following cases:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks, this is useful! |
||
cursor: pointer; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Adding wrap to the message metadata so that the "edited at ..." label can occupy the second line.