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

Shorter "Last Modified" display in narrow columns #15947

Closed
JasonWeill opened this issue Mar 8, 2024 · 1 comment · Fixed by #15948
Closed

Shorter "Last Modified" display in narrow columns #15947

JasonWeill opened this issue Mar 8, 2024 · 1 comment · Fixed by #15948

Comments

@JasonWeill
Copy link
Contributor

Problem

The "Last Modified" column takes up a lot of horizontal space in a narrow container. In English, a relative date like "11 months ago" is likely longer than the filename it describes:

long-date

The absolute date appears on hover, in a tooltip.

Proposed Solution

We use an Intl.RelativeTimeFormat object to make human-readable dates in an internationalizable format. When changing that to use the "short" format, units like "months" shorten, but "days" does not, and "ago" remains, even though we can be reasonably certain that almost all files will have been created in the past.

short-date

As a more extreme alternative, we could reduce this to "#u", with a number and a very short unit. This pattern is already used by mobile apps and mobile web sites, and may require additional manual internationalization. We can also shorten "Last Modified" to "Mod", to allow for the column to be shortened.

image

Note that Asian languages already have single characters for most time units,

In the rare case that a file's time stamp in the future, we can put a + before the number; the normal expectation is that a date is in the past.

Additional context

See also #14237, #3875, and #8497 for other issues about columns in the filebrowser.

@GabrielaVives
Copy link

I agree that even the "ago" could be removed, like you showed in your 2nd suggestion.

@JasonWeill JasonWeill changed the title Much shorter "Last Modified" display Shorter "Last Modified" display in narrow columns Mar 12, 2024
@JasonWeill JasonWeill removed the status:Needs Triage Applied to new issues that need triage label Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants