Skip to content

fix: Adjust relative date display to also use timestamp for yesterday#12863

Open
jancborchardt wants to merge 7 commits into
mainfrom
fix/yesterday-timestamp
Open

fix: Adjust relative date display to also use timestamp for yesterday#12863
jancborchardt wants to merge 7 commits into
mainfrom
fix/yesterday-timestamp

Conversation

@jancborchardt

Copy link
Copy Markdown
Member

The inbox and folders in the Mail app have date headers like "Today", "Yesterday", "Last week", "Last month" etc. Currently we use a shortened weekday for mails in the "Yesterday" section, but instead it would be better to use the timestamp, same as is done for mails in the "Today" section.

Extra challenge: In the detail view it should show "Yesterday [hh:mm]" because otherwise it’s not clear it’s from yesterday, so the function needed to have a parameter added.

This could be good to go, and an additional fix as follow-up could be:

For mails older than a year, the sender and date can overlap in the message list. At the same time the width of list-item-content__inner__subname which contains subject and some body text preview is unnecessarily made narrow by the very wide list-item-content__inner__subname, which is only on the line of the sender. It is only the sender name which should be ellipsized due to longer dates, but the subject or body text preview should not be shortened unnecessarily.
The date should be aligned to the right and be shown fully, and the name should take the rest of available space. The name should ellipsize on overflow.

I tried that but couldn’t get the components to comply. :D


AI-assisted: GitHub Copilot (Claude Sonnet 4.6)

Prompt:
The inbox and folders in the Mail app have date headers like "Today", "Yesterday", "Last week", "Last month" etc. Currently we use a shortened weekday for mails in the "Yesterday" section, but instead it would be better to use the timestamp, same as is done for mails in the "Today" section.

Iteration 1
2 issues:

  1. For mails which are in "Last week" but less than 48 hours ago, so not yesterday, it still shows the timestamp in the list.
  2. For mails from yesterday, in the detail view it only shows the timestamp, not "Yesterday" or any other classifier.

Iteration 2
Now it shows "Yesterday [timestamp]" both in the detail view as well as in the envelope list. It should only show this long version in the detail view, keeping only the timestamp in the envelope list, because there is a "Yesterday" heading already.

@jancborchardt jancborchardt added enhancement 3. to review papercut Annoying recurring issue with possibly simple fix. labels May 4, 2026
@jancborchardt jancborchardt added the skill:frontend Issues and PRs that require JavaScript/Vue/styling development skills label May 4, 2026
@jancborchardt jancborchardt requested a review from kesselb as a code owner May 4, 2026 09:02
@welcome

welcome Bot commented May 4, 2026

Copy link
Copy Markdown

Thanks for opening your first pull request in this repository! ✌️

@jancborchardt jancborchardt requested a review from nimishavijay May 4, 2026 09:02
@jancborchardt jancborchardt moved this to 🏗️ At engineering in 🖍 Design team May 4, 2026
@jancborchardt jancborchardt self-assigned this May 4, 2026
Comment thread src/util/shortRelativeDatetime.js Outdated
import { translate as t } from '@nextcloud/l10n'

export const shortDatetime = curry((ref, date) => {
export const shortDatetime = curry((ref, date, withLabel = false) => {

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.

The withLabel flag has only an effect when the date is yesterday.

I think this should be done in the component itself, or if required in more places a own function.

The purpose of the shortDatetime function should stay with shorting a date ;)

jancborchardt and others added 4 commits July 9, 2026 17:43
AI-assisted: GitHub Copilot (Claude Sonnet 4.6)
Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com>
…sterday

Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Assisted-by: Claude:claude-fable-5
…sterday

Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Assisted-by: Claude:claude-fable-5
…sterday

Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Assisted-by: Claude:claude-fable-5
@ChristophWurst ChristophWurst force-pushed the fix/yesterday-timestamp branch from fe78165 to 11053b6 Compare July 9, 2026 16:08
@ChristophWurst

Copy link
Copy Markdown
Member
  1. Fixed kesselb's comment
  2. Fixed that not all emails are in a "date group". In PI we have "Favorites/Important" and they will use the long format
  3. Fixed that the short format did not use the user's locale setting. E.g. message list showed 13:38 and actions menu 1:38pm. Now it's consistent.

Comment thread src/util/shortRelativeDatetime.js Outdated
…sterday

Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Assisted-by: Claude:claude-fable-5
…sterday

Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Assisted-by: Claude:claude-fable-5
…sterday

Signed-off-by: Christoph Wurst <1374172+ChristophWurst@users.noreply.github.com>
Assisted-by: Claude:claude-fable-5
@ChristophWurst

Copy link
Copy Markdown
Member

In the right column we now use time for today, yesterday + time for yesterday and date + time for anything older. That makes it very easy to get precise info without any hover.

I think this is good to go

@ChristophWurst ChristophWurst requested a review from kesselb July 10, 2026 12:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review enhancement papercut Annoying recurring issue with possibly simple fix. skill:frontend Issues and PRs that require JavaScript/Vue/styling development skills

Projects

Status: 🏗️ At engineering

Development

Successfully merging this pull request may close these issues.

3 participants