Project

General

Profile

Actions

Idea #2884

closed

Improve file selection dialog (switch projects, add preview area)

Added by Tom Clegg over 10 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
06/06/2014
Due date:
Story points:
0.5

Description

Probably good if the "preview" pane looks similar to (even uses the same partials as) the content of the "show collection" page.
  • List of files probably has to be condensed a bit (but maybe that's good in both settings)
  • "Source information" portion should surely use the same code/partial as the "show collection" page (we will certainly be working on improving the content as a separate effort).

Files


Subtasks 5 (0 open5 closed)

Task #2997: Preview pane showing details of last-clicked collectionResolvedPeter Amstutz06/06/2014Actions
Task #3033: Ability to switch projectsResolvedPeter Amstutz06/06/2014Actions
Task #2902: Use selector in pipeline runnerResolvedTom Clegg06/06/2014Actions
Task #2901: General purpose folder browser popupResolvedTom Clegg06/06/2014Actions
Task #3041: Review 2884-improved-pickerResolvedPeter Amstutz06/06/2014Actions
Actions #1

Updated by Ward Vandewege over 10 years ago

  • Project changed from 37 to Arvados
Actions #2

Updated by Ward Vandewege over 10 years ago

  • Assigned To set to Peter Amstutz
Actions #4

Updated by Tom Clegg over 10 years ago

  • Subject changed from Bring up file selection dialog instead of using "shopping cart" mechanism to Improve file selection dialog (switch projects, add preview area)
Actions #5

Updated by Tom Clegg over 10 years ago

  • Description updated (diff)
Actions #6

Updated by Tom Clegg over 10 years ago

  • Status changed from New to In Progress
Actions #7

Updated by Tom Clegg over 10 years ago

  • Target version changed from 2014-06-17 Curating and Crunch to 2014-07-16 Sprint
Actions #8

Updated by Tom Clegg over 10 years ago

  • Story points changed from 3.0 to 1.0
Actions #9

Updated by Tom Clegg over 10 years ago

  • Story points changed from 1.0 to 0.5
Actions #10

Updated by Tim Pierce over 10 years ago

Review at 76dea877

I don't understand generally what's going on with the ajax:complete vs ajaxComplete and ajax:send ajaxSend changes. Can you explain a little more?

My JavaScript is not very strong so I don't have anything substantive, but I'm going to ask for some stupid little changes that make the code easier for me to follow because jQuery makes my head hurt:

  • apps/workbench/app/assets/javascripts/select_modal.js
    • $(this) -> $this in the $.ajax call
    • Does the jqxhr .done() callback imply that the request succeeded? The docs sort of suggest that but I'm not sure. (If the call didn't succeed, then I think we don't want to populate modal-dialog-preview-pane with whatever's in the "data" argument.)
  • apps/workbench/app/controllers/application_controller.rb
    • @objects = Group.find(params[:project_uuid]).contents({:filters => [['uuid', 'is_a', "arvados\##{ArvadosApiClient.class_kind(model_class)}"]]})
      • I can't make head or tails of this. Is this code basically filtering the uuids listed in the project_uuid param for uuids which are members of the current controller class? I'd expect every uuid in that list to be arvados#group anyway, so I'm pretty lost here.
      • Not your code, but -- can we move ArvadosApiClient.class_kind into a helper library function of some kind? It's confusing to call a class method in a totally unrelated class just because that's where it happens to be defined. Might as well move generic code to an all-purpose location.
  • apps/workbench/app/controllers/collections_controller.rb
    • Leftover debugging puts statement?
  • apps/workbench/app/views/collections/_choose_rows.html.erb
    • Leftover debugging puts statements?
Actions #11

Updated by Peter Amstutz over 10 years ago

Tim Pierce wrote:

Review at 76dea877

I don't understand generally what's going on with the ajax:complete vs ajaxComplete and ajax:send ajaxSend changes. Can you explain a little more?

Added comment in the source to explain what is going on.

My JavaScript is not very strong so I don't have anything substantive, but I'm going to ask for some stupid little changes that make the code easier for me to follow because jQuery makes my head hurt:

  • apps/workbench/app/assets/javascripts/select_modal.js
    • $(this) -> $this in the $.ajax call

Fixed

  • Does the jqxhr .done() callback imply that the request succeeded? The docs sort of suggest that but I'm not sure. (If the call didn't succeed, then I think we don't want to populate modal-dialog-preview-pane with whatever's in the "data" argument.)

done() is only called on success. Added fail() callback which states the preview load failed.

  • apps/workbench/app/controllers/application_controller.rb
    • @objects = Group.find(params[:project_uuid]).contents({:filters => [['uuid', 'is_a', "arvados\##{ArvadosApiClient.class_kind(model_class)}"]]})
      • I can't make head or tails of this. Is this code basically filtering the uuids listed in the project_uuid param for uuids which are members of the current controller class? I'd expect every uuid in that list to be arvados#group anyway, so I'm pretty lost here.

Added comment to source.

  • Not your code, but -- can we move ArvadosApiClient.class_kind into a helper library function of some kind? It's confusing to call a class method in a totally unrelated class just because that's where it happens to be defined. Might as well move generic code to an all-purpose location.

I agree this is stupid and annoying, but I don't have a better idea of where to put it at the moment.

  • apps/workbench/app/controllers/collections_controller.rb
    • Leftover debugging puts statement?
  • apps/workbench/app/views/collections/_choose_rows.html.erb
    • Leftover debugging puts statements?

Fixed.

Actions #12

Updated by Tim Pierce over 10 years ago

LGTM, thanks.

Actions #13

Updated by Anonymous over 10 years ago

  • Status changed from In Progress to Resolved

Applied in changeset arvados|commit:47042547e7873d63f764e85ace085a8da314afd3.

Actions

Also available in: Atom PDF