Feature #5034

[Workbench] Show content statistics/summary (total size, number of files) at top of collections#show page

Added by Tom Clegg almost 6 years ago. Updated over 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Brett Smith
Category:
Workbench
Target version:
Start date:
01/20/2015
Due date:
% Done:

100%

Estimated time:
(Total: 1.00 h)
Story points:
0.5

Description

The "summary" area at the top of the page should include:
  • UUID (except in the special case where the page was loaded via PDH instead of UUID)
  • Portable data hash (use the term "content address" as well, see #5027)
  • Optional/nice: copy-to-clipboard feature for PDH and UUID (see #5027)
  • Total content size
  • Number of files

Subtasks

Task #5027: [Workbench] Improve Content Address/UUID display on Collection pageResolvedBrett Smith

Task #5452: Review 5034-workbench-collection-summary-wipResolvedBrett Smith

Associated revisions

Revision 71c4fdc3
Added by Brett Smith over 5 years ago

Merge branch '5034-workbench-collection-summary-wip'

Closes #5027, #5034, #5452.

Revision 1e54d655 (diff)
Added by Brett Smith over 5 years ago

5034: Update Workbench Gemfile post-merge.

Refs #5034.

Revision f1bb6330 (diff)
Added by Brett Smith over 5 years ago

5034: Update Workbench integration tests.

A lot of tests started failing because

  • they were looking for the string "content hash" to assert they were
    on a collection page, or
  • they expect the portable data hash to be real text on the page (as
    opposed to the value of an <input>).

Fixes:

  • Have the upload test check that the collection is empty by looking
    for the relevant size information, which was specified by the story.
  • Make sure we're on a specific collection page by looking for the
    collection's name or UUID (depending on what's available).
  • Refute we're on a specific collection page by matching against the
    URL. This seems much safer in the long run.
  • Remove the "Content hash" assertion from projects test altogether.
    The prior text assertion should be sufficient to ensure we're on the
    right page.

Refs #5034.

History

#1 Updated by Bryan Cosca almost 6 years ago

In "This collection was the output of:" maybe change this to "This collection was uploaded by" if its not an output of a job.

#2 Updated by Tom Clegg almost 6 years ago

  • Target version changed from Arvados Future Sprints to 2015-03-11 sprint

#3 Updated by Tom Clegg almost 6 years ago

  • Subject changed from [Workbench] Show content summary (total size, number of files) at top of collections#show page to [Workbench] Show content statistics/summary (total size, number of files) at top of collections#show page

#4 Updated by Brett Smith almost 6 years ago

  • Assigned To set to Brett Smith

#5 Updated by Tom Clegg almost 6 years ago

  • Description updated (diff)
  • Category set to Workbench

#6 Updated by Brett Smith over 5 years ago

  • Status changed from New to In Progress

#7 Updated by Brett Smith over 5 years ago

  • Target version changed from 2015-03-11 sprint to 2015-04-01 sprint

#8 Updated by Brett Smith over 5 years ago

5034-workbench-collection-summary-wip is up for review. Some notes about the story implementation.

Tom Clegg wrote:

The "summary" area at the top of the page should include:
  • UUID (except in the special case where the page was loaded via PDH instead of UUID)

The special case can't happen because if you look up a collection by PDH, the controller searches for other collections with that PDH and does one of two things: if there's a single result, you get redirected to the collection page by UUID; and if there's more than one, you get a list. See the block in CollectionsControll#show starting if Keep::Locator.parse params["uuid"].

  • Optional/nice: copy-to-clipboard feature for PDH and UUID (see #5027)

For security reasons, it's not possible to copy to the clipboard in native JavaScript. I've done the next best thing I know: when you click/focus the text, the entire text is automatically highlighted, so you can just hit Ctrl+C or whatever to make your copy.

This isn't a common UI thing, so I went back and forth on how to present it to the user. I went with a half-inlaid appearance. I'm sure we can bikeshed the presentation to death.

#9 Updated by Radhika Chippada over 5 years ago

Brett, looks great. Just a few minor suggestions.

  • _show_autoselect_text.html
    • The comment says “Render local ‘text’ …” It is a bit confusing. Can you expand this comment to say local variable text … or something?
    • Is the input tag missing the terminating ‘/‘ character?
  • _show_source_summary:
    • All other items have titles and values such as “Arvados UUID:”, “Content address:”, “This collection was the output of:” etc. I think it would look more balanced if we have a title such as “Collection metrics:” for the number of files and size info.
    • “Arvados UUID”: Everything is Arvados, right :) ? I think “Collection UUID” might be a better title for this item.
    • Both “Arvados UUID” and “Content address” are using the same tagclass. Is this intentional?
  • Selectable uuid and pdh text: Usually an underlined text means a clickable link in webpages. The left border is barely visible as well. I am concerned that the auto-select underlining might confuse users. I suggest making the left border more visible with a touch of blue color, and removing the bottom line. Alternatively, we can put the text in a “box” by having the top and right borders also.

#10 Updated by Radhika Chippada over 5 years ago

Forgot to say this in my previous comment. The summary information is taking quite some space in the collection#show page now and occupying almost half the space in my browser window (my laptop terminal size). It would be desirable that this does not take too much space.

Are we planning to implement a "summary" tab for collections (I vaguely remember seeing it yesterday but I am not sure if I am imagining things) in which case we can move some of this stuff into that tab when we have it.

If we not have plans to implement a Summary tab for collections, I suggest revisiting the display layout of items in this page for the Summary panel. Some suggestions: we can remove dax image from the summary panel and display items in single row layout (some thing like "UUID: xxxxx-xxxxx-xxxxxxxxxxxxxx", "Address: ..." ). Just display them in a single line and let them wrap as needed, which should save quite some space here and make it take less space.

#11 Updated by Tom Clegg over 5 years ago

2¢: I'm inclined to defer as much as possible of the UI-tweaking to #5415.

#12 Updated by Brett Smith over 5 years ago

Radhika Chippada wrote:

Brett, looks great. Just a few minor suggestions.

  • The comment says “Render local ‘text’ …” It is a bit confusing. Can you expand this comment to say local variable text … or something?

Done.

  • Is the input tag missing the terminating ‘/‘ character?

No, <input> must not have a closing tag, and a trailing / is just shorthand for that.

  • All other items have titles and values such as “Arvados UUID:”, “Content address:”, “This collection was the output of:” etc. I think it would look more balanced if we have a title such as “Collection metrics:” for the number of files and size info.

I have added it as "Content size." I feel like "metrics" often gets used in the context of number of visits/downloads/etc. which is information we might want to provide later.

  • “Arvados UUID”: Everything is Arvados, right :) ? I think “Collection UUID” might be a better title for this item.

Done.

  • Both “Arvados UUID” and “Content address” are using the same tagclass. Is this intentional?

Yes. It's purely presentational (right now it sets some font details), so it's fine to use for both. At different times in the past, we've used it for both collection PDHs and Arvados object UUIDs.

  • Selectable uuid and pdh text: Usually an underlined text means a clickable link in webpages. The left border is barely visible as well. I am concerned that the auto-select underlining might confuse users. I suggest making the left border more visible with a touch of blue color, and removing the bottom line. Alternatively, we can put the text in a “box” by having the top and right borders also.

I have put it in a rounded box with a little more padding that turns blue when you select it. This mimics the style GitHub uses for its clone URL widget (you can see it in the right sidebar of, e.g., our repository), which has the same behavior. If you want more changes, please let me know the exact CSS you'd like and I'll add it.

Per Tom, I have left the rest of the UI work you discussed for #5415, which is also on this sprint. Now at ad4c4cf. Thanks.

#13 Updated by Radhika Chippada over 5 years ago

Brett:

  • Ok with #5415 to improve UI
  • Can we add glyphicon-copy next to the Collection uuid and content address elements? (I was thinking about it and now see that in github as well. We do not need to make ours selectable though).

LGTM even if you prefer not to add glyphicon-copy :).

Thanks.

#14 Updated by Brett Smith over 5 years ago

Radhika Chippada wrote:

  • Can we add glyphicon-copy next to the Collection uuid and content address elements? (I was thinking about it and now see that in github as well. We do not need to make ours selectable though).

LGTM even if you prefer not to add glyphicon-copy :).

I thought about adding some kind of icon, but since we don't have any functionality to hook it up to, I'm afraid people will try to click it and get frustrated when it does nothing. So I'm going to merge as-is, and we'll see what kind of user feedback we get and go from there. Thanks very much.

#15 Updated by Brett Smith over 5 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 50 to 100

Applied in changeset arvados|commit:71c4fdc3352ad5ca34c2f260fe43fa1150868a04.

Also available in: Atom PDF