New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 640135 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug

Blocking:
issue 640685



Sign in to add a comment

Quick View: Time metadata is wrapped In a strange position.

Project Member Reported by oka@chromium.org, Aug 23 2016

Issue description

PM or AM can be positioned in a new line. Maybe we could tweak the margin size for it to fix into one line.

Example:
May 24, 2016, 8:09
PM


 

Comment 1 by oka@chromium.org, Aug 24 2016

Summary: Quick View: Time metadata is wrapped In a strange position. (was: Quick View: Time metadata is wrapped In a strainge position.)
Blocking: 640685
Cc: mcirimele@chromium.org weifangsun@chromium.org sgabr...@chromium.org
Labels: M-63
I noticed this too. Agree we should have it fit into one line. We should test with the longest possible date string to make sure it works for all cases. 

sgabriel@ do you have guidance on how to solve this? Should we move the margin or make the panel bigger? 
Screenshot 2017-09-05 at 1.34.44 PM.png
1.3 MB View Download
We can probably start by reducing the left padding by half (I assume that would be 16). Would it work for that? Do we know which language gives the longer string and if it would work in that case?
I'm not sure about what language would have the longest string but we can at least test it in English. Assuming we always shorten the month to three characters it the longest would be:

MMM DD, YYYY, HH:MM AM  

I get that to 22 chars, that is what is shown in the screenshot above. The wrapping problem appears with strings that have 21 chars, but with 20 it fits...

Comment 8 by oka@chromium.org, Sep 25 2017

Maria, I think we could shrink the font size to fit the string into the limited space. WDYT?
My proposal is to have a enough space for English text to fit in with preferred font size, and possibly change the font size for other languages.


Let's definitely make sure it fits for English with the original font size. Would it work with Sebastien's suggestion to reduce the left padding? If my calculations are right we only need to fit two more characters. 

Hopefully this format should cover most (at least roman?) languages. The only thing I can see going over is abbreviations of the month. For other languages I don't know what we do if the . Reducing the font sounds dicey with readability. Sebastien - do you have thoughts?

Comment 10 by oka@chromium.org, Sep 26 2017

The style used for the metadata values was, as I checked in developer console,
font-size: 12.96px, and font: Roboto.

I extracted possible language tags (attached tags.txt) from the Language Subtag Registry [1].
With that we can technically compute the maximum possible width in px. Will it be worth doing from UI's point of view?

[1] https://www.iana.org/assignments/language-subtag-registry/language-subtag-registry.

tags.txt
791 bytes View Download
Oh how cool! Yes, if it's not too much effort I think it would be worth doing the computation so we get a better picture of what our worst-case scenario is. 
Labels: -M-63 M-64
Labels: -M-64 M-65
Labels: -M-65 M-66
Labels: Hotlist-GoodFirstBug
Owner: joelhockey@chromium.org
The current layout has

| 32 left pad | 96 label | 32 mid pad | 128 value | 32 right pad|  total = 320

I think the 32 left pad should not be changed since it is the most noticeable and keeps the whole information box looking consistent with the rest of the UI.  However the mid pad and right pad has plenty of scope for reduction without being noticeable.  I'll start by dropping each to 16 and then I have an extra 32 for the value which can come up to 160.  This is wide enough for English, and will also help any other language.
Re: #17
SGTM!
Project Member

Comment 19 by bugdroid1@chromium.org, Feb 13 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ab4392b2386796ddc709e543c8337ceaf9e377f5

commit ab4392b2386796ddc709e543c8337ceaf9e377f5
Author: Joel Hockey <joelhockey@chromium.org>
Date: Tue Feb 13 09:07:00 2018

Reduce QuickView files-metadata-entry mid and right pad to stop mod time wrap

Changed middle and right padding from 32px to 16px.  Value can now
increase by 32px from 128px to 160px.  Left padding stays at 32px
which is consistent with the rest of the UI.

Value is now wide enough to hold typical English Modified Time string
"Aug 24, 2017, 10:30 AM" without wrapping.  Will also help any other
language with long strings.

Bug:  640135 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I68c2f907027415cad375116ff376c83eec156425
Reviewed-on: https://chromium-review.googlesource.com/910750
Reviewed-by: Naoki Fukino <fukino@chromium.org>
Commit-Queue: Joel Hockey <joelhockey@chromium.org>
Cr-Commit-Position: refs/heads/master@{#536304}
[modify] https://crrev.com/ab4392b2386796ddc709e543c8337ceaf9e377f5/ui/file_manager/file_manager/foreground/elements/files_metadata_entry.html

Status: Fixed (was: Assigned)
Screenshot with middle and right padding reduced from 32px to 16.
Screenshot from 2018-02-14 12-23-58.png
637 KB View Download
Labels: CrOS-FilesApp-QuickView
<files-triage>
Cc: dhadd...@chromium.org sdantul...@chromium.org mkarkada@chromium.org
Status: Assigned (was: Fixed)
AM/PM is missing in preview. 

Google Chrome	66.0.3352.0 (Official Build) dev (64-bit)
Platform	10431.0.0 (Official Build) dev-channel eve

Screenshot 2018-02-23 at 2.17.04 PM.png
1.1 MB View Download
Status: Fixed (was: Assigned)
It looks like you are using 24-hour time (Settings > Advanced > Date and time > Use 24-hour clock.  Turn this setting off and it should show AM/PM.

Sign in to add a comment