Story #8441

[Workbench] Update project chooser popup to display favorites and top level my projects instead of using build_project_trees

Added by Radhika Chippada almost 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
Workbench
Target version:
Start date:
02/18/2016
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
Story points:
1.0

Description

The build_project_trees method retrieves all projects accessible by the user. In a system with many shared projects, this proved to be quite expensive operation. #8183 implemented an optimization of building my projects tree for the top level projects and #8286 implemented the ability to mark projects as favorites.

Display the projects tree as a combination of favorites and top-level-my-projects similar to Projects dropdown in breadcrumbs display.

A user can star a shared but not writable project to mark it as a favorite. When displaying the Favorite projects in the chooser popup, these non-writable starred projects should be non-selectable.

After making this update, remove the build_project_trees code from application_controller.

Update any existing tests that are impacted. Add test(s) to expect favorite projects in chooser popup.


Subtasks

Task #8471: Review branch 8441-project-chooserResolvedPeter Amstutz


Related issues

Related to Arvados - Story #8286: [API] [Workbench] Allow users to choose which projects appear in their dropdown areaResolved01/22/2016

Associated revisions

Revision 03245f8f
Added by Radhika Chippada almost 6 years ago

closes #8441
Merge branch '8441-project-chooser'

History

#1 Updated by Radhika Chippada almost 6 years ago

  • Description updated (diff)

#2 Updated by Radhika Chippada almost 6 years ago

Question: How do we determine if a favorite is writable or not by the user when displaying a link to it in the chooser popup? We can set the star link's name as "readonly" or "writable" during the "star" operation and use this information while building of the tree. However, this will be incorrect / stale if an admin were to modify the sharing permission for a user after it is shared or if it is moved.

#3 Updated by Tom Clegg almost 6 years ago

Radhika Chippada wrote:

Question: How do we determine if a favorite is writable or not by the user when displaying a link to it in the chooser popup?

I think we can do something like

writable_items = items.select(&:editable?)

We can set the star link's name as "readonly" or "writable" during the "star" operation and use this information while building of the tree. However, this will be incorrect / stale if an admin were to modify the sharing permission for a user after it is shared or if it is moved.

Let's not do that. :)

Even though the "editable?" method has some drawbacks (it looks like it can cause N API calls in the worst case) at least it's correct!

#4 Updated by Brett Smith almost 6 years ago

  • Assigned To set to Radhika Chippada

#5 Updated by Brett Smith almost 6 years ago

  • Category set to Workbench
  • Story points set to 1.0

#6 Updated by Radhika Chippada almost 6 years ago

  • Status changed from New to In Progress

#7 Updated by Peter Amstutz almost 6 years ago

8441-project-chooser looks good to me

#8 Updated by Radhika Chippada almost 6 years ago

  • Status changed from In Progress to Resolved

Applied in changeset arvados|commit:03245f8fb2e143864966dc151bf12368d2bd78fa.

Also available in: Atom PDF