fix: Adjust relative date display to also use timestamp for yesterday#12863
Open
jancborchardt wants to merge 1 commit intomainfrom
Open
fix: Adjust relative date display to also use timestamp for yesterday#12863jancborchardt wants to merge 1 commit intomainfrom
jancborchardt wants to merge 1 commit intomainfrom
Conversation
AI-assisted: GitHub Copilot (Claude Sonnet 4.6) Signed-off-by: Jan C. Borchardt <925062+jancborchardt@users.noreply.github.com>
|
Thanks for opening your first pull request in this repository! ✌️ |
kesselb
reviewed
May 4, 2026
| import { translate as t } from '@nextcloud/l10n' | ||
|
|
||
| export const shortDatetime = curry((ref, date) => { | ||
| export const shortDatetime = curry((ref, date, withLabel = false) => { |
Contributor
There was a problem hiding this comment.
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 ;)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
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:
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.