You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Port FileList and other files app JS classes to Backbone #18211
I am currently struggling a lot because it is close to impossible to cleanly synchronise model state between different views with the legacy files app JS code that mixes everything.
As of now we have not only the file list containing a representation of a file model but also the right sidebar. This is shouting for proper MV* and for that I'd like to port the FileList class to Backbone JS.
It would look like this:
FileInfoModel is a new model that contains file information (the format file info arrays)
FileInfoCollection contains an array of FileInfoModel
FileList class becomes FileListView and accepts a FileInfoCollection
any change / file action done from either the file list, controls bar or side bar will be done directly on FileInfoModel.
any view that displays the state of a file will listen to FileInfoModel.on('change', ...) events and update themselves to reflect the latest changes.
This is what I am currently missing with the sidebar actions. One example is the star icon from the favorite file that needs to be displayed and actionable in both a file row and sidebar.
Activity
PVince81 commentedon Aug 11, 2015
The FileActions class might need to be reworked too as it needs to work with FileInfoModel instances too in order to propagate the changes properly.
PVince81 commentedon Aug 18, 2016
posting more ideas I got today, slightly modified:
PVince81 commentedon Aug 22, 2016
WIP PR #25909
PVince81 commentedon Sep 15, 2016
Making good progress in the PR, decoupling FileList (the future FileListView) from the file actions and collection.
PVince81 commentedon Jun 7, 2018
Obsolete, will be rewritten (is already partly) in Phoenix: owncloud/web#150
lock commentedon Jul 30, 2019
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.