Introduce per message timestamps as a configurable option.
Contributor checklist:
- [x] My commits are in nice logical chunks with good commit messages
- [x] My changes are rebased on the latest
clearnetbranch - [x] A
yarn readyrun passes successfully (more about tests here) - [x] My changes are ready to be shipped to users
Description
This introduces per message timestamps as a configurable option. Enabling per message timestamps disables the display of date breaks between messages.
Confguration:
In action:
Tested on Linux and Windows 10.
We should probably decide on just one of these options, either per message timestamp option or more frequent timestamp messages. I'd be in favor of just the per message timestamp option. I don't think this looks visually right either, its close to what Telegram is doing, but not sure i like how it looks visually.
We should probably decide on just one of these options, either per message timestamp option or more frequent timestamp messages. I'd be in favor of just the per message timestamp option. I don't think this looks visually right either, its close to what Telegram is doing, but not sure i like how it looks visually.
I was thinking the same thing: No need to have the timestamps both between messages and in the message bubbles.
I'm just playing with ideas here, and not all will make sense in combination with each other.
I changed the timestamp colour to color-last-seen-indicator-text earlier this evening, but didn't update the screenshot. The new colour visually separates the time from the body of the message and mutes it somewhat, the combined effect of which is quite pleasing, I feel:
Modified to use a new definable colour, color-message-timestamp-text, because using the standard value of color-last-seen-indicator-text didn't provide enough contrast on outgoing messages.
can you get a screenshot of what happens with this feature ON and a message without any text but just an attachment?
can you get a screenshot of what happens with this feature ON and a message without any text but just an attachment?
Ah yeah, nice catch.
This is from a note-to-self:

No timestamp.
@blib I'm not sure how to fix the case of the timestamp being omitted from bodiless messages containing only an attachment.
This is an easy fix:
--- a/ts/components/conversation/composition/CompositionBox.tsx
+++ b/ts/components/conversation/composition/CompositionBox.tsx
@@ -841,7 +841,7 @@ class CompositionBoxInner extends React.Component<Props, State> {
// this does not call call removeAllStagedAttachmentsInConvers
const { attachments, previews } = await this.getFiles(linkPreview);
this.props.sendMessage({
- body: messagePlaintext,
+ body: messagePlaintext || '\0',
attachments: attachments || [],
quote: extractedQuotedMessageProps,
preview: previews,
but because it creates a fake, non-printing body, unnecessary whitespace gets added to the message bubble.
I've added a commit (a232eea7e5f9ceb38b3fa788d37b38ff71cf7613) that ensures that attachment-only messages now get properly timestamped, and addresses the concern above by keeping the additional whitespace to the minimum possible with this approach.
Rebased on clearnet to make it independent of #2178, which has since been rejected, and to allow it to merge cleanly.
@Bilb OK, I think the latest commit to this makes the feature pretty good now.
With this latest change, the old-style date breaks are inserted between messages that span a date change.
This combination of punctuating messages with date break captions, plus putting a timestamp on every individual message seems ideal to me.
I hope you guys like the idea, too.
I have now rebased on HEAD and reimplemented this feature at a higher level, thereby obviating the issue of certain types of message not receiving a timestamp.
Is the feature still being considered for inclusion at this point?
The commits in this PR have been left intact to show the progression. Obviously, if this were to be included, I would squash everything down to a single commit.
Looking at this screenshot, I personally like this design as it is.
However, are there any possibilities of showing the timestamp at the left or right of each message box, or would that have aesthetic or other issues? There's a fair amount of vacant space there, and having the timestamp in the lower right corner inside each message box does render the bottom of each message box void.
Looking at this screenshot, I personally like this design as it is.
However, are there any possibilities of showing the timestamp at the left or right of each message box, or would that have aesthetic or other issues? There's a fair amount of vacant space there, and having the timestamp in the lower right corner inside each message box does render the bottom of each message box void.
The code of this patch has changed somewhat over time, but perhaps hasn't been rebased here. The screenshots are certainly not up to date.
The current implementation wastes less space beneath the timestamp. Compare the messages above with this one:

There's now more space above the timestamp, but that can be reduced by the developers if they adopt the timestamp feature. They could also elect to offer the choice of where to place the timestamp.
Unfortunately, this PR is 6 months old now and still hasn't been merged. It remains open, however, so I find it hard to estimate its chance of inclusion at this point.