Project

General

Profile

Actions

Idea #8441

closed

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

Added by Radhika Chippada about 8 years ago. Updated about 8 years ago.

Status:
Resolved
Priority:
Normal
Assigned To:
Radhika Chippada
Category:
Workbench
Target version:
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 1 (0 open1 closed)

Task #8471: Review branch 8441-project-chooserResolvedPeter Amstutz02/18/2016Actions

Related issues

Related to Arvados - Idea #8286: [API] [Workbench] Allow users to choose which projects appear in their dropdown areaResolvedRadhika Chippada01/22/2016Actions
Actions #1

Updated by Radhika Chippada about 8 years ago

  • Description updated (diff)
Actions #2

Updated by Radhika Chippada about 8 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.

Actions #3

Updated by Tom Clegg about 8 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!

Actions #4

Updated by Brett Smith about 8 years ago

  • Assigned To set to Radhika Chippada
Actions #5

Updated by Brett Smith about 8 years ago

  • Category set to Workbench
  • Story points set to 1.0
Actions #6

Updated by Radhika Chippada about 8 years ago

  • Status changed from New to In Progress
Actions #7

Updated by Peter Amstutz about 8 years ago

8441-project-chooser looks good to me

Actions #8

Updated by Radhika Chippada about 8 years ago

  • Status changed from In Progress to Resolved

Applied in changeset arvados|commit:03245f8fb2e143864966dc151bf12368d2bd78fa.

Actions

Also available in: Atom PDF