nextcloud/server

Files Sharing javascript cleanup

Open

#874 创建于 2016年8月15日

在 GitHub 查看
 (3 评论) (2 反应) (0 负责人)PHP (4,865 fork)batch import
1. to developfeature: sharinghelp wantedstandardizationtechnical debt

仓库指标

Star
 (34,953 star)
PR 合并指标
 (平均合并 20天) (30 天内合并 627 个 PR)

描述

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?

贡献者指南