Skip to content

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

Open
jancborchardt wants to merge 1 commit intomainfrom
fix/yesterday-timestamp
Open

fix: Adjust relative date display to also use timestamp for yesterday#12863
jancborchardt wants to merge 1 commit intomainfrom
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.

AI-assisted: GitHub Copilot (Claude Sonnet 4.6)
Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com>
@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
Copy link
Copy Markdown

welcome Bot commented May 4, 2026

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
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 ;)

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.

2 participants