Skip to content
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

Don't use relative times for Conversations panel timestamps. #2707

Open
wants to merge 2 commits into
base: clearnet
Choose a base branch
from

Conversation

ianmacd
Copy link

@ianmacd ianmacd commented Mar 14, 2023

Contributor checklist:

Description

I find the conversation panel's timestamps a bit annoying. I don't really like the relative timestamps, i.e. 6 mins ago, 2 months ago, etc.

What does 2 months ago even mean? More than 30 or 31 days? About 60 days? More than 45?

I decided to reimplement these timestamps Telegram-style:

  • If the conversation last received a message today, just the time of the message is given, e.g. 12:03.
  • If the conversation last received a message in the last week, just the day of the message is given, e.g. Mon.
  • If the conversation last received a message more than a week ago, the date of the message is given, e.g. 13/03/2023.

An attempt is made to use the system locale when formatting these.

This could be made into a configurable option under Settings, so that relative or absolute timestamps can be chosen by the user.

image
image2

@KeeJef
Copy link
Collaborator

KeeJef commented Mar 15, 2023

Agree this is a problem, and Session Desktop behavior deviates from other platform behavior too, spoke about this with the team, the approach we settled on was.

  • If the message was sent/received on the same day we show: 12 hour time + am/pm
    • 12:43 pm
  • If the message was sent/received in the same week we show: word abbreviation day of week + 12 hour time + am/pm
    • Tue 12:34 pm
  • If the message was sent/received in the same year we show, word abbreviation of month, date (day) and 12 hour time + am/pm
    • Mar 7 12:34 pm
  • If the message was sent or received outside of the current year, then we show dd/mm/yy
    • 07/03/23

We want to implement this cross platform, this is most similar to the iOS approach currently. We can merge this if it conforms to the above rules

EDIT: Updated month -> year, previous solution didn't make sense

@ianmacd
Copy link
Author

ianmacd commented Mar 15, 2023

Agree this is a problem, and Session Desktop behavior deviates from other platform behavior too, spoke about this with the team, the approach we settled on was.

  • If the message was sent/received on the same day we show: 12 hour time + am/pm

    • 12:43 pm
  • If the message was sent/received in the same week we show: word abbreviation day of week + 12 hour time + am/pm

    • Tue 12:34 pm
  • If the message was sent/received in the same month we show, word abbreviation of month, date (day) and 12 hour time + am/pm

    • Mar 7 12:34 pm
  • If the message was sent or received outside of the current year, then we show dd/mm/yy

    • 07/03/23

This proposal has even more granularity than the one I proposed (which was merely how Telegram does it), so I'm not opposed to it except for one detail: The use of 12- vs. 24-hour clock should be determined by the user's locale, not hard-coded.

ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Mar 15, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Mar 15, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Mar 15, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
Instead, we move to Telegram-style timestamping:

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, just the
  day of the message is used, e.g. Mon.

* If the conversation last received a message more than a week ago, the
  date of the message is used, e.g. 13/03/2023.
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
@ianmacd
Copy link
Author

ianmacd commented Mar 15, 2023

A second commit has now been added to this PR to further modify the timestamps to comply with Kee's spec above.

As I suggested, I have left the issue of 12- vs. 24-hour clock to the user's locale.

image
image

@ghost
Copy link

ghost commented Mar 15, 2023

Agree this is a problem, and Session Desktop behavior deviates from other platform behavior too, spoke about this with the team, the approach we settled on was.

  • If the message was sent/received on the same day we show: 12 hour time + am/pm

    • 12:43 pm
  • If the message was sent/received in the same week we show: word abbreviation day of week + 12 hour time + am/pm

    • Tue 12:34 pm
  • If the message was sent/received in the same month we show, word abbreviation of month, date (day) and 12 hour time + am/pm

    • Mar 7 12:34 pm
  • If the message was sent or received outside of the current year, then we show dd/mm/yy

    • 07/03/23

We want to implement this cross platform, this is most similar to the iOS approach currently. We can merge this if it conforms to the above rules

I feel that it's too granular, feels over engineering.

Also the month level isn't properly defined, I think you mean the same "year", not the same "month".

  • If the message was sent/received in the same month we show, word abbreviation of month, date (day) and 12 hour time + am/pm

    • Mar 7 12:34 pm

Personally I don't like too many levels, two levels including "today" and "everyday before" is enough for me.

Three levels (skip the week level) is also fine.

The week level is annoying to me, because "Tuesday" doesn't tell me what date is that day and I have to find an external tool to convert it to a YYYY-MM-DD or double check what day is today and do some mental calculation.

It's not a big deal if this is the final design already, but at least I think someone like me who doesn't like it should make some voice.

@ianmacd
Copy link
Author

ianmacd commented Mar 15, 2023

Also the month level isn't properly defined, I think you mean the same "year", not the same "month".

Indeed. That's how I interpreted the spec, too.

Personally I don't like too many levels, two levels including "today" and "everyday before" is enough for me. It's not a big deal if this is the final design already, but at least I think someone like me who doesn't like it should make some voice.

I have posed this question in detail to about half a dozen people now, and no two of them ultimately stated the same preference. This is a highly subjective area.

Ideally, the number of levels, the criteria for the boundaries between those levels, and the timestamping for each level would be available as advanced configuration options, hidden from users for whom the defaults are intuitive, but available to users who like to tweak every last aspect of their software experience.

More generally, I'd like to see Session adopt an Advanced Configuration checkbox under Settings that allows the bolder user to access and configure any such options that less sophisticated users might find confusing or potentially disruptive.

@ghost
Copy link

ghost commented Mar 15, 2023

More generally, I'd like to see Session adopt an Advanced Configuration checkbox under Settings that allows the bolder user to access and configure any such options that less sophisticated users might find confusing or potentially disruptive.

As a user I don't mind having Advanced Configuration, but I rarely use them in most daily apps I use. If there is no Advanced Configuration, I am usually fine to sacrifice my preference and accept it.

As an open source contributor to the Oxen project, I can understand the dev team might have their opinions on allocating limited development resources, reducing communication overhead, saving code reviewing effort, minimizing future code refactoring costs, etc. I just check Signal and found it doesn't have Advanced Configuration either, which gives an example that the lack of Advanced Configuration doesn't prevent an app from growing to 40 million month active users ;-)

Signal do have a few unofficial forks though: https://community.signalusers.org/t/signals-complementary-downstream-projects-please-list-them-here/5093/2

Maybe when Session grows to 40 million month active users, there would be a few unofficial forks for minorities as well.

@ianmacd
Copy link
Author

ianmacd commented Mar 15, 2023

As an open source contributor to the Oxen project, I can understand the dev team might have their opinions on allocating limited development resources, reducing communication overhead, saving code reviewing effort, minimizing future code refactoring costs, etc.

Those are all valid considerations, of course. Proper resource and scope management is very important, particularly when one has to operate within tight constraints.

I just check Signal and found it doesn't have Advanced Configuration either, which gives an example that the lack of Advanced Configuration doesn't prevent an app from growing to 40 million month active users ;-)

Different people have different needs, tastes and levels of expertise, so different software will appeal to different users.

Underpinning most of my PRs is the unabashedly selfish desire to nudge Session in the direction I'd like to see it go. That happens to be more towards the Element and Telegram end of the spectrum in terms of power (i.e. feature set) and flexibility (i.e. configurability) than the Signal end, which I personally find too basic to have a unique use case.

Maybe when Session grows to 40 million month active users, there would be a few unofficial forks for minorities as well.

I think that moment may come a lot sooner for Session, as there is a much smaller choice of decentralised, anonymous messengers. In that sense, users like me will naturally seek to mould Session to give us what we desire from it.

ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Mar 21, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
@@ -48,14 +48,29 @@ export const Timestamp = (props: Props) => {

const momentValue = moment(timestamp);
let dateString: string = '';
// Set the locale for the timestamps.
moment.locale(osLocaleSync().replace(/_/g, '-'));
Copy link
Collaborator

Choose a reason for hiding this comment

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

I guess that's a blocking call which is a bad idea to have in the renderer side

You should be able to get the locale required by the user (and not just the system one) using:
const lang = (window.i18n as any).getLocale();

Copy link
Author

Choose a reason for hiding this comment

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

That code will retrieve only the generic language, e.g. en, not the specific locale variant, such as en_gb.

ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Mar 31, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Apr 6, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Jun 21, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Jun 28, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Jul 17, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Jul 18, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Jul 18, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Jul 18, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Jul 18, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Jul 18, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Jul 18, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
ianmacd added a commit to ianmacd/session-desktop that referenced this pull request Aug 9, 2023
See
oxen-io#2707 (comment)
for the discussion.

* If the conversation last received a message today, just the time of
  the message is used, e.g. 12:03.

* If the conversation last received a message in the last week, the day
  and time of the message are used, e.g. Mon 12:03.

* If the conversation last received a message this calendar year, the
  month, day of month and time of the message are used, e.g. Mar 13 12:03.

* If the conversation last received a message in a previous calendar
  year, the date of the message is used, e.g. 13/03/2023.
@KeeJef
Copy link
Collaborator

KeeJef commented Mar 28, 2024

Tracking this issue internally for desktop through https://optf.atlassian.net/browse/SES-1101 tasks are present for other platforms as well to make sure the approach is consistent

@KeeJef KeeJef added the Jira This ticket is being tracked in Jira label Mar 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Jira This ticket is being tracked in Jira
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants