Story #2884

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

Added by Tom Clegg about 5 years ago. Updated almost 5 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Category:
-
Target version:
Start date:
06/06/2014
Due date:
% Done:

100%

Estimated time:
(Total: 16.00 h)
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).

Subtasks

Task #2997: Preview pane showing details of last-clicked collectionResolvedPeter Amstutz

Task #3033: Ability to switch projectsResolvedPeter Amstutz

Task #2902: Use selector in pipeline runnerResolvedTom Clegg

Task #2901: General purpose folder browser popupResolvedTom Clegg

Task #3041: Review 2884-improved-pickerResolvedPeter Amstutz

Associated revisions

Revision 47042547
Added by Peter Amstutz almost 5 years ago

Merge branch '2884-improved-picker' closes #2884

Revision c9c800c1 (diff)
Added by Peter Amstutz almost 5 years ago

Fix pipeline instance creation workbench tests. refs #2884

Revision 8fc3ca1a (diff)
Added by Tom Clegg almost 5 years ago

Remove spurious puts. refs #2884

History

#1 Updated by Ward Vandewege about 5 years ago

  • Project changed from Umbrella Project to Arvados

#2 Updated by Ward Vandewege about 5 years ago

  • Assigned To set to Peter Amstutz

#4 Updated by Tom Clegg about 5 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)

#5 Updated by Tom Clegg about 5 years ago

  • Description updated (diff)

#6 Updated by Tom Clegg almost 5 years ago

  • Status changed from New to In Progress

#7 Updated by Tom Clegg almost 5 years ago

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

#8 Updated by Tom Clegg almost 5 years ago

  • Story points changed from 3.0 to 1.0

#9 Updated by Tom Clegg almost 5 years ago

  • Story points changed from 1.0 to 0.5

#10 Updated by Tim Pierce almost 5 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?

#11 Updated by Peter Amstutz almost 5 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.

#12 Updated by Tim Pierce almost 5 years ago

LGTM, thanks.

#13 Updated by Anonymous almost 5 years ago

  • Status changed from In Progress to Resolved

Applied in changeset arvados|commit:47042547e7873d63f764e85ace085a8da314afd3.

Also available in: Atom PDF