Repository navigation
Files app navigation sidebar - #6260
Conversation
|
@karlitschek @MTRichards best also have a look at this first prototype. It includes Work in Progress (!) on both
|
|
@jancborchardt can you post a screenshot? THX |
|
I will have a look. But please dont forget the ownCloud 6 bugs!! |
|
Nice!
... |
|
Dry hit the wrong button :P |
Yes. Exactly identical for now, even though there will be »Shared« in the sidebar as well, and we should also put external storages in the sidebar. In the long run we could only show them in the sidebar, but webdav would be unchanged / is separate from this.
Currently not (clicking »Deleted Files« reloads the whole page) but ideally should be. cc @PVince81 @schiesbn
Recent files is cool. But Pictures, Music and Documents we have the apps for. Would be strange to duplicate here. @Raydiation what do you think then? :) |
|
Ok, after discussion with @DeepDiver1975 we concluded that it would indeed make sense to have the Pictures, Music and Documents views in the sidebar. Be it just for organizing your stuff. But also since these are all files and we pride ourselves in file sync and sharing – so we should also take care of these core file types. @PVince81 do we want to move forward on this? Additionally this is a blocker for the mobile compatibility I’d say. Because two important points for that are 1) Moving the app list away and 2) giving apps sidebars. |
I fully agree. I think this makes a lot of sense. But if they are in the sidebar they should probably no longer be in the apps drop-down, right? Maybe it would make sense to add a app-type "fileview" to the info.xml. If a app is defined as "fileview" it goes to the sidebar if not it goes to the apps drop-down. What do you think? |
|
@schiesbn yes, we can discuss that afterwards as it can be a transitionary phase which is unrelated to the information architecture. (Another argument for putting them as views directly in the Files app instead of separate apps is that a lot needs to be duplicated. Like all actions (upload, new, and all of the file actions) and some kind of structure (files or else).) |
|
I'd like to work on the ajaxification of the files app (clean up) first before adding new stuff. |
|
@PVince81 ok, maybe let’s undertake this latest at the workweek in Stuttgart? |
|
Sounds good. |
|
@owncloud/designers does anyone want to pick this up? I would be willing to help on the design side to get this done for ownCloud 7, but I can’t do the main coding work. |
|
I've rebased this onto master. There is still work to be done to find out how to properly integrate apps (like sharing) into this without hard-coding them into the files app (like the trashbin is at the moment). |
|
@jancborchardt if you like you can maybe have a look at fixing the styles and mobile styles for the controls and trashbin. Note that on this branch there is a new CSS class "app-$APPNAME" on the content which should make it easier to write app-specific CSS selectors (to override global ones) |
|
I will continue working on the code for this. There are a few challenges ahead which I've identified:
I will probably start with the trashbin app, it will help to refactor the files app in a way that doesn't pollute the global namespace or conflict. Hopefully this will also make these apps testable with unit tests. Note: having to refactor the FileList further means there is a risk of breakage of the files app again. But I assume that this one will be regression tested once the sidebar is in place. |
|
@PVince81 @schiesbn I´m a big fan of registering the navigation entries programmatically instead of with configuration. So an app can register no or several entries based on permissions or settings or other conditions. Do you know what I mean? |
|
|
@karlitschek I think one argument from @schiesbn was mostly to prevent crashing everything if the app has a defect. |
|
Yes, having a hook or something similar risk that a app does some crazy stuff and crashes the whole process. Additionally from a app developer point of view it might be easier to just add two values to the info.xml (we could also allow multiple entries or a list of sidebar entries)) instead of connection to a hook, manipulating an array, etc. This needs much more knowledge about the internal behavior. But ultimately I'm fine with both approaches. |
|
@schiesbn Hmm. Well if an app has a problem then it can crash everything anyways with app.php |
- Added links to trashbin and shared dir - Moved "WebDAV" settings block to the app nav's settings section - Added sidebar support in trashbin app as well
Apps can now register navigation items into the sidebar of the files app. For every sidebar item there is a container. The container's content is rendered based on the script name given at registration time.
- added new OCA.Files namespace for files classes - the sidebar can now switch between views/containers - the trashbin renders in its own container but currently doesn't work due to overrides - added app.js as entry point for JS code (ideally all other files should only contain classes and not trigger anything)
- FileList is now an instantiable class - FileActions is now in namespace - added App class for trashbin app - moved trashbin overrides into classes extending FileList - replaced many static calls with "this." or "self." to make the classes reusable/extendable - new URL parameter "view" to specify which view is shown, for example "files" or "trashbin" - added OC.Util.History utility class in core for handling history - moved URL handling/routing to OCA.Files.App - popstate will correctly update the current view and notify the view of the URL change so it can update the current dir - added JS unitt tests for the trashbin app - fixed public app to work with the new namespaces
- fixed upload and storage statistics - fixed infinite scroll to use the correct contain for scroll detection - fixed unit test that sometimes fail for rename case - controls are now sticky again - fixed selection overlay to be aligned with the table - fixed "select all" checkbox that had id conflicts - fixed public page - fixed global actions permissions detection - fix when URL contains an invalid view id - viewer mode now hides the sidebar (ex: text editor) - added unit tests for trashbin - clean up storage info in template (most is retrieved via ajax call now)
|
This is ready for review/testing, please have a look @icewind1991 @DeepDiver1975 If there are no criticial bugs (some IE8 bugs already exist on master) we can merge this first and tweak it later. I need it for the sharing overview. Still, @owncloud/designers please feel free to push CSS tweaks on this branch. If you touch the controls style or sidebar, make sure to test the following: "regular files view", "with text editor open", "public page" and "select overlay". |
|
Please use this link (ignore whitespace) when reviewing: https://github.com/owncloud/core/pull/6260/files?w=1 |
|
The inspection completed: 22 new issues, 1 updated code elements |
|
🚀 Test Passed. 🚀 |
|
nice 👍 |
|
also @MorrisJobke @jbtbnl |
|
|
@jbtbnl is there a standard function or CSS3 class I could use ? |
|
@PVince81 currently every app has it's own implementation: https://github.com/owncloud/calendar/blob/master/js/calendar.js#L1069 https://github.com/owncloud/contacts/blob/master/js/app.js#L1077 Shall we treat this as a separate issue? |
|
Okay, then let's make it a separate issue as to not delay the merging of this PR 😄 |
|
Yup, agree with @jbtbnl on the settings menu: should smoothly animate, and automatically close if focus is lost (clicked outside of it). Everything else looks awesome so far! :) |
|
Ok, good point making it a separate issue. I would give my 👍 design wise. But I think a more intensive code review is needed here @DeepDiver1975 @butonic @bantu |
|
Design wise it might also be an option (maybe only for smaller screens) to, instead of having the navigation in the sidebar replace the root breadcrumb with a dropdown for selecting the various "views" Code looks good, works as expected 👍 |
|
Thanks a lot guys, merging. |
Files app navigation sidebar
|
@jancborchardt @owncloud/designers another thing: the breadcrumb always has the "home" icon, also for the trashbin as well. Should I replace it with "Deleted files" ? The same question will appear for the sharing overview, might make sense to always put a text there except for files where it's the "home" icon. |
|
@PVince81 let’s leave it at the home icon for now, it seems fitting. Better than duplicating the text of the navigation. |
|
@PVince81 @jancborchardt Did you review for small screens? It just destroys the UX for phones, because you just see the sidebar and the controls are misaligned ( |
|
Yes, it does look crap on small screen. |
|
This one: #8159 |
|
@PVince81 Just noticed it now :D Thanks anyway :) Great work |


FYI @jancborchardt @owncloud/designers