Ticket #1215 (closed enhancement: fixed)

Opened 4 years ago

Last modified 4 years ago

add technical details to Journal details view

Reported by: sascha_silbe Owned by: sascha_silbe
Priority: Unspecified by Maintainer Milestone: 0.86
Component: sugar Version: Git as of bugdate
Severity: Unspecified Keywords: r+
Cc: eben, garycmartin Distribution/OS: Unspecified
Bug Status: New

Description

This patch series is an attempt at implementing the technical details (file size, file type, file date) info in the Journal details view as demonstrated in  Eben's mockup and thus #517 / #1033.

Open questions (to the designers):
a) what to do if mime_type is not set (currently: displays "Type: ")
b) what to do if filesize is 0 (currently: displays "Size: 0B")

I took the liberty of displaying the MIME type instead of the file extension because it's more appropriate IMO. File extensions are for legacy systems that need to store metadata in the filename and lose some of the information contained in the MIME type.

Attachments

0001-add-sugar.util.format_size.patch Download (0.8 KB) - added by sascha_silbe 4 years ago.
add sugar.util.format_size()
journal-technical-details.png Download (26.5 KB) - added by sascha_silbe 4 years ago.
Sample screenshot
0001-add-filesize-to-returned-metadata.patch Download (2.9 KB) - added by sascha_silbe 4 years ago.
sugar-datastore: add 'filesize' property to metadata returned by API calls
0001-add-technical-details-to-details-view-in-Journal.patch Download (3.4 KB) - added by sascha_silbe 4 years ago.
add technical details to details view in Journal (sugar-datastore change obsolete now)

Change History

follow-up: ↓ 2   Changed 4 years ago by sascha_silbe

  • cc eben, garycmartin added

Forgot to CC the designers, so asking the questions again:

a) what to do if mime_type is not set (currently: displays "Type: ")
b) what to do if filesize is 0 (currently: displays "Size: 0B")

in reply to: ↑ 1 ; follow-up: ↓ 3   Changed 4 years ago by garycmartin

Replying to sascha_silbe:

a) what to do if mime_type is not set (currently: displays "Type: ")

"Kind: <mime_type>" (as per Eben's mock-up and your screen shot look good. If there is no associated mime type I'd suggest showing "Kind: Unknown".

b) what to do if filesize is 0 (currently: displays "Size: 0B")

For "Size: 0B" case I would recommend spelling it out "Size: Zero". Also note the space after the digits as in Eben's mock-up helps readability "Size 215 KB".

Quick sanity check :-) The "Date: 17.08.2009" is shown in the correct locale date format, yes? Is it the file modification date or the file creation date (or does that end up being the same due to the way data-store works)?

Changed 4 years ago by sascha_silbe

add sugar.util.format_size()

Changed 4 years ago by sascha_silbe

Sample screenshot

in reply to: ↑ 2   Changed 4 years ago by sascha_silbe

Replying to garycmartin:

"Kind: <mime_type>" (as per Eben's mock-up and your screen shot look good. If there is no associated mime type I'd suggest showing "Kind: Unknown".

OK, Unknown it is.

b) what to do if filesize is 0 (currently: displays "Size: 0B")

For "Size: 0B" case I would recommend spelling it out "Size: Zero". Also note the space after the digits as in Eben's mock-up helps readability "Size 215 KB".

Spaces added, but spelled it "Empty" instead for zero.

Quick sanity check :-) The "Date: 17.08.2009" is shown in the correct locale date format, yes?

It is. Haven't tried any other locale, but as US format is the default I'm quite sure it works. :)

Is it the file modification date or the file creation date (or does that end up being the same due to the way data-store works)?

There's only one timestamp in the data store.

Thanks for the quick feedback!

Changed 4 years ago by sascha_silbe

sugar-datastore: add 'filesize' property to metadata returned by API calls

Changed 4 years ago by sascha_silbe

add technical details to details view in Journal (sugar-datastore change obsolete now)

follow-up: ↓ 5   Changed 4 years ago by tomeu

  • keywords r+ added; r? removed
  • owner changed from tomeu to sascha_silbe
  • status changed from new to assigned

Looks great, other than if file_path: should probably check for is None. Please push, thanks!

in reply to: ↑ 4   Changed 4 years ago by tomeu

  • status changed from assigned to closed
  • resolution set to fixed

Replying to tomeu:

Looks great, other than if file_path: should probably check for is None. Please push, thanks!

Disregard this, have just pushed it.

Note: See TracTickets for help on using tickets.