Skip to content

Files app navigation sidebar - #6260

Merged
PVince81 merged 6 commits into
masterfrom
jan-navigation-filesidebar
May 16, 2014
Merged

PVince81 merged 6 commits into
masterfrom
jan-navigation-filesidebar

Conversation

@PVince81

@PVince81 PVince81 commented Dec 9, 2013

Copy link
Copy Markdown
Contributor

FYI @jancborchardt @owncloud/designers

@jancborchardt

Copy link
Copy Markdown
Contributor

@karlitschek @MTRichards best also have a look at this first prototype. It includes Work in Progress (!) on both

  • the app navigation being not shown all the time, only when clicking on the ownCloud logo. This gives more space to the app and unclutters the whole interface (which previously had both a persistent global header and sidebar)
  • the Files app having a sidebar, which enables people to filter out shared files, better placement for deleted files, etc.

@DeepDiver1975

Copy link
Copy Markdown
Contributor

@jancborchardt can you post a screenshot? THX

@karlitschek

Copy link
Copy Markdown
Contributor

I will have a look. But please dont forget the ownCloud 6 bugs!!

@jancborchardt

Copy link
Copy Markdown
Contributor

Rebased and here’s the screenshots. Files with sidebar (only the beginning, there will be »Shared with you«, »Shared with others«, external storages, etc in there:
new-files

App list reveals on clicking ownCloud icon. Only first WIP, needs to look better etc:
new-navigation

@DeepDiver1975

Copy link
Copy Markdown
Contributor

Nice!

  • Regarding the 'All files' - this will be the default view as we have it today? This is the identical view as a user would see them via web dav?
  • The side bar is fully ajaxified?
  • What about adding special views like: recent files, music (with id3 tag info), pictures (with exif data), documents.
  • Within these view we could have specialized display - e.g. date based for pictures with bigger thumbnails

...

@BernhardPosselt

Copy link
Copy Markdown
Contributor

Dry hit the wrong button :P

@jancborchardt

Copy link
Copy Markdown
Contributor

@DeepDiver1975

Regarding the 'All files' - this will be the default view as we have it today? This is the identical view as a user would see them via web dav?

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.

The side bar is fully ajaxified?

Currently not (clicking »Deleted Files« reloads the whole page) but ideally should be. cc @PVince81 @schiesbn

What about adding special views like: recent files, music (with id3 tag info), pictures (with exif data), documents.

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? :)

@jancborchardt

Copy link
Copy Markdown
Contributor

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.

@schiessle

Copy link
Copy Markdown
Contributor

Ok, after discussion with @DeepDiver1975 we concluded that it would indeed make sense to have the Pictures, Music and Documents views in the sidebar.

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?

@jancborchardt

Copy link
Copy Markdown
Contributor

@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).)

@PVince81

Copy link
Copy Markdown
Contributor Author

I'd like to work on the ajaxification of the files app (clean up) first before adding new stuff.
I'll keep this one in mind while doing so, there could be reusable parts.

@jancborchardt

Copy link
Copy Markdown
Contributor

@PVince81 ok, maybe let’s undertake this latest at the workweek in Stuttgart?

@PVince81

Copy link
Copy Markdown
Contributor Author

Sounds good.

@jancborchardt

Copy link
Copy Markdown
Contributor

@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.

@PVince81

PVince81 commented May 2, 2014

Copy link
Copy Markdown
Contributor Author

I've rebased this onto master.
@jancborchardt your commit disappeared because you pushed them on master separately already.

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).
Goal is to make it possible on the PHP side for apps to add navigation entries to the files sidebar.
Also one concern is about the order of these entries which is likely be the order in which the apps were loaded.

@PVince81

PVince81 commented May 2, 2014

Copy link
Copy Markdown
Contributor Author

@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)

@PVince81

PVince81 commented May 5, 2014

Copy link
Copy Markdown
Contributor Author

I will continue working on the code for this.

There are a few challenges ahead which I've identified:

  1. URL scheme: the URL should change when switching the mode, and navigation should still work as before (including browser back button)

  2. JS class conflicts between trashbin's FileList, sharing SharedFileList. This means the files app FileList needs to be cleant up.

  3. FileActions conflicts: the file actions are currently global but need to be changeable for every list view. Trouble is that many apps/plugins register their file actions at page load time (ex: text editor). Need to decide whether to "break" the API and expect apps to adapt or try and find a backward-compatible solution.

  4. Come up with a mechanism for apps to register their navigation into the files app sidebar. It also means that these apps must be self-contained and be able to display themselves into the app-container without a page reload. @schiesbn suggested to extend the existing navigation part of "info.xml".

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.

@karlitschek

Copy link
Copy Markdown
Contributor

@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?

@PVince81

PVince81 commented May 6, 2014

Copy link
Copy Markdown
Contributor Author
  1. Prevent view switching in the sidebar when an upload is in progress (even though it doesn't cause a full page reload)

@PVince81

PVince81 commented May 6, 2014

Copy link
Copy Markdown
Contributor Author

@karlitschek I think one argument from @schiesbn was mostly to prevent crashing everything if the app has a defect.
Anyway I'm ok either way, I'll just pick one and we can discuss it in the PR.

@schiessle

Copy link
Copy Markdown
Contributor

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.

@karlitschek

Copy link
Copy Markdown
Contributor

@schiesbn Hmm. Well if an app has a problem then it can crash everything anyways with app.php
I´m wondering how you can show an entry based on permission, group or any other condition.

Vincent Petry added 5 commits May 15, 2014 17:51
- 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)
@PVince81

Copy link
Copy Markdown
Contributor Author

This is ready for review/testing, please have a look @icewind1991 @DeepDiver1975
@schiesbn, If you like I can guide you through the code tomorrow.

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".
Thanks.

@PVince81

Copy link
Copy Markdown
Contributor Author

Please use this link (ignore whitespace) when reviewing: https://github.com/owncloud/core/pull/6260/files?w=1
There were many spaces/tab changes because I indented some classes.
Cheers.

@scrutinizer-notifier

Copy link
Copy Markdown

The inspection completed: 22 new issues, 1 updated code elements

@ghost

ghost commented May 15, 2014

Copy link
Copy Markdown

@karlitschek

Copy link
Copy Markdown
Contributor

nice 👍

@PVince81

Copy link
Copy Markdown
Contributor Author

also @MorrisJobke @jbtbnl

@jbtbnl

jbtbnl commented May 16, 2014

Copy link
Copy Markdown
Contributor
  • the settings menu should have an open/close animation, and automatically close when focus is lost
  • change selected class to active to have a second background color on hover

@PVince81

Copy link
Copy Markdown
Contributor Author

@jbtbnl is there a standard function or CSS3 class I could use ?
Ideally I'd love to have a CSS3 class defined in apps.css that every app can reuse and have no need for JS code.

@jbtbnl

jbtbnl commented May 16, 2014

Copy link
Copy Markdown
Contributor

@PVince81

Copy link
Copy Markdown
Contributor Author

Okay, then let's make it a separate issue as to not delay the merging of this PR 😄

@jancborchardt

Copy link
Copy Markdown
Contributor

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! :)

@jancborchardt

Copy link
Copy Markdown
Contributor

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

@icewind1991

Copy link
Copy Markdown
Contributor

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 👍

@PVince81

Copy link
Copy Markdown
Contributor Author

Thanks a lot guys, merging.

PVince81 pushed a commit that referenced this pull request May 16, 2014
@PVince81
PVince81 merged commit 1fb0d54 into master May 16, 2014
@PVince81
PVince81 deleted the jan-navigation-filesidebar branch May 16, 2014 11:00
@PVince81

Copy link
Copy Markdown
Contributor Author

@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.

@jancborchardt

Copy link
Copy Markdown
Contributor

@PVince81 let’s leave it at the home icon for now, it seems fitting. Better than duplicating the text of the navigation.

@MorrisJobke

Copy link
Copy Markdown
Contributor

@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 (70px to much because the apps menu is hidden ;)

@PVince81

Copy link
Copy Markdown
Contributor Author

Yes, it does look crap on small screen.
@jancborchardt mentionned that there is another PR pending for mobile optimization, so I ignored that issue.

@PVince81

Copy link
Copy Markdown
Contributor Author

This one: #8159

@MorrisJobke

Copy link
Copy Markdown
Contributor

@PVince81 Just noticed it now :D Thanks anyway :) Great work

@lock lock Bot locked as resolved and limited conversation to collaborators Aug 20, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants