nextcloud/server

Files Sharing javascript cleanup

Open

#874 opened on Aug 15, 2016

View on GitHub
 (3 comments) (2 reactions) (0 assignees)PHP (34,953 stars) (4,865 forks)batch import
1. to developfeature: sharinghelp wantedstandardizationtechnical debt

Description

As a leftover of times long gone there is still a lot of sharing code all over te place. This issue focues on the javascript part.

  • Sidebar code is in the files_sharing app
  • ShareModel and views are in core
  • ShareModel depends on the OCS Sharing API which lives in files_sharing

We should define a proper separation between what is in core and what is not. Kind of like we do on the PHP side as well. The sharemanager is in core. But the share providers (should) live in the different apps. We could do the same with the javascript:

  • Have a kind of share manager where apps can register
    • This is just a collection of collections
  • Items models live in their own apps
  • Views don't live in core since each app might want to display different stuff.
  • We also need to split sharee loading then??

In short this makes the js part somewhat modular. If an other app wants to use sharing functionality it can use the 'manager' in OC.Share.ShareManager (or whatever). And trough that it will automagically get access to all the fancy stuff it can do.

CC: @oparoz as this is kind of your JS API you have been asking for

CC: @schiessle @nickvergessen @MorrisJobke @icewind1991 any input idea's?

Contributor guide