-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add "Recent" file listing #292
Conversation
Wow... Amazing 👊 |
Love, love, love this! I can create an icon if needed. My first thought though, is that a "reload" type icon would work just fine here though, as would a clock. Gnome 3's nautilus kind of combines both which I quite like, while KDE's Dolphin uses a calendar, which I'm not fond of, as generally people are looking for files modified in the last few minutes/hours, not days/weeks. What think the rest of @nextcloud/designers? My preference is something Nautilus-like (despite being a KDE fanboy) such as this. |
cc @nextcloud/designers |
* | ||
* @return DataResponse | ||
*/ | ||
public function getRecentFiles() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unit test for this? 😉
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In the todo 😄
👍 Looks good, Just need the Icon. @Bugsbane I like the idea of some sort of clock face. Would be awesome if we could get it to actually show the time of the last file which was modified (Would probably cause to many issues). |
It gets all it's data from the cache, as long as changes are scanned they should show up |
Ok, so how does this exactly compare to »Sort by modified date«? I think the general thing is cool and all, I am just worried we're adding more and more stupid sections to the navigation without properly connecting everything. That is, I think a much better solution would be to:
|
The recents "tab" shows recent files across all folders, not just the current folder |
This is exactly the same as how file browsers let you both sorry by date, but also see all of the files you've modified recently, regardless of location. I use both daily, for different purposes. |
It was partly a rhetorical question. ;) What I meant to say is that my proposal above would already take care of a majority of cases for the »Recent« section, but in a less interface-filling and more integrated way. Let's take small steps, and find how we can do more with less. Again sure, we can just add stuff, but that's the trap software falls into before people abandon it cause it's too complicated. |
@Bugsbane very nice! :) I'd only increase the size by 1px for each side because compared to the square icons around it looks a tad small. That's because it has the same width as the folder or share icons, but being a circle it needs a bit more size to appear visually sized correctly. |
master will no longer have fallback png's so no need to add a png version
You'll need to add the |
Ah, ok. It's being pulled in by css. Thanks. I just did a quick search on the commit changes page for .png and .svg and didn't see anything, and assumed you hadn't added the icon yet as it didn't exist. I'll add the class. |
@Bugsbane looks great! Please make sure the circle is pixel-perfect, that is it should be either 1px or most probably 2px width. That will ensure it will look sharp and not blur. |
Ok, I've submitted PR #340 and made sure that as much as is possible, that everything uses whole pixel stroke widths and aligns with the pixel grid. One thing puzzles me though. I could see the class pulling in the svg, but I didn't see anything referring to the PNG fallbacks, although I figure that these substitutions are probably done automatically by JS rather than being hard coded. |
Oh, and I tried svgo on it, but no matter how I tried to modify the original SVG, svgo always butchered the image, completely removing the hands of the clock or worse. Accordingly I ran sourge over it instead, which worked fine. |
3ee1621
to
d425040
Compare
Added the class "nav-icon-recent" to display the new "recent files" file list view to be added by @icewind1991 in PR nextcloud#292 It's now placed after nav-icon-files which was where @jancborchardt was suggesting iirc.
Add the new icon for "Recent files" file list view in the files app by @icewind1991, as discussed in PR nextcloud#292 Icon is already compressed/cleaned by scour rather than svgo as svgo seems to corrupt it.
79cbf84
to
2139a03
Compare
This is good for re-review ( @jancborchardt @schiessle @MorrisJobke ) any open tasks in the original post are things we can look into for a further release |
I tested it and it works 👍 |
|
👍 tested and works, it is missing the favourites column, I think this should still be included in the view. Without it looks a bit odd transitioning from Files to Recent as everything shifts over to the left. |
The other views also don't have the favorite column. I would leave it like it is now. |
For consistency, it might be worth reviewing and adding favourites to all the views. |
Is this something we want to have for Nextcloud 10? @karlitschek |
I would say no, because this is clearly a feature and we only back port bug fixes. |
Nice. I agree that we shouldn't backport this for now |
@williambargent can you open a new issue about adding the favorites column to all views? It should indeed be there for everything, including search results. |
Show a list of recently modified files and folders
On showing folders
How to show folders in the list is the most complex part of this PR, since the mtime (both on disk and in cache) of a folder gets changed when a file in the folder is modified simply just showing folders in the same way as files would result in the parent folder being shown together with the most recently changed file in that folder.
Ideally we would show folders based on their creation time but unfortunately we don't save that information, instead this PR uses the modified date of the least recently changed file in the folder which isn't perfect (especially for folders containing a single file) but it works decently.
I could also be better to hide most folders altogether in most cases
On hiding folder contents
Another thing I was thinking about to make the recent list more useful is hiding the contents of newly uploaded folders, currently if you upload a large folder the contents of it will take over the entire recents list.
Instead it would be nice if the recents list would only show the newly uploaded folder, with the newly uploaded contents being implicitly grouped in the folder.
Further work (maybe for nc+1)
cc @jancborchardt @LukasReschke