Skip to content
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

Show favourites [$250] #230

Closed
1 task
oparoz opened this issue Jul 26, 2015 · 26 comments
Closed
1 task

Show favourites [$250] #230

oparoz opened this issue Jul 26, 2015 · 26 comments

Comments

@oparoz
Copy link
Contributor

oparoz commented Jul 26, 2015

It would be nice to also be able to only see one's favourites in Gallery.

capture_favorites
screenshot by joephein

What to expect

  • A button somewhere which will let the user have access to his favourites
  • A star on pictures which are favourites

Pre-requirements

Specifications

  • Each favourite image is shown at the root of the favourites view
  • Each favourite folder is shown at the root of the favourites view
  • A special breadcrumbs needs to be built: 🏠 > ⭐ > folder
  • A special favourites ephemeral cache has to be designed. It will only be rebuilt every time the user clicks on Favourites unless the API gives us an etag for favourites. It will be destroyed when the session is closed
  • Since there is no equivalent in the Files app, it won't be possible to switch back to a precise location in the Files app. We can keep the switch to Files icon, but we will land in the favourites tab, showing all favourites

Future plans

New issues need to be created for these suggestions:

  • If activated via settings, each favourite image is shown in its parent album unless it's located in the root folder. The user should be able to select the depth at which an image is to be found. 1,2 folders deep per example or even in its original location, even if it's 10 folders deep
  • Implement a way to star pictures and albums.

Caveats

  • Will take forever if we don't set a limit and will be incomplete if we do
  • The Fileinfo object doesn't seem to contain the tags, so separate requests have to be made and the arrays have to be merged. It will slow things down

Code to steal

There is a $250 open bounty on this issue. Add to the bounty at Bountysource.

@oparoz oparoz added this to the backlog milestone Jul 26, 2015
@oparoz oparoz changed the title Show favourites Show favourites [$50] Oct 27, 2015
@oparoz oparoz added the bounty label Oct 27, 2015
@oparoz
Copy link
Contributor Author

oparoz commented Oct 27, 2015

@joephein - I closed your other issue a bit too quickly as it was a subset of this issue, but since you're already sponsoring this one, I'm going to modify it to make it match your original request and split the rest in another ticket about a global search for favourites, which requires a working search engine.

Do you agree with the following scope? It's OK if you don't, it's just so that we can meet your expectations.

Specifications (rejected)

  • The filter switch gets an extra position, allowing the view to be modified to only show the favourites contained in the current album
  • Activating the filter only shows the images which have been tagged as favourites in the current album
  • No albums are shown when showing favourites
  • New empty page when no favourites are found in the current album

@youphyun
Copy link

That is a good start. Ideally it should also show only those albums (folders in the Files section) that contain photo's that have been marked as favorite including the thumbnails of those photo's that were marked as favorite. If this would require more work I can try to get some more backers :-)

Can this be based on the same functionality that already exist in the Files view?
Of course for photo's it would be even better if they could be rated with stars from 1 to 5 like in picturelife but I would not consider this right now and use the already existing flag from ownCloud that hopefully can be easily used in the gallery+ app

capture_favorite_files

@oparoz
Copy link
Contributor Author

oparoz commented Oct 27, 2015

@joephein The way Files is doing it is different from my understanding of the filtering idea you've described earlier. Files just shows all Favourites on one page, it's not a filter, more a search engine with a locked query.

Would you prefer it if it worked just like in Files? In that case, I don't think the favourite button should be part of the sorting section as that acts only on the current album.
We could have a new button in the controls, on the left, but users may still think it acts on the current album only.
We can't easily add a left sidebar, so that's not really an option.

That leaves a new button on the right...

@jancborchardt ?

@jancborchardt
Copy link
Member

It gets to the point where a sidebar for Gallery makes sense. Although unlike Files, I would say it should be collapsed by default as it is on mobile & tablets to focus on the content. (Similar to what we should do for Calendar and Maps.)

What do you think @oparoz @owncloud/designers

@oparoz
Copy link
Contributor Author

oparoz commented Oct 28, 2015

I agree, but it has to be built from scratch as there are no re-usable GUI components in ownCloud and it's not part of the base template.
The side-bar is tracked here: #401

@youphyun
Copy link

youphyun commented Oct 28, 2015

The sidebar might indeed give more ways to show more options. I agree that it should be collapsed by default. I have made a word document with more screenshots and an explanation how I think it should work. However it should not work the same as in Files. It would be good though if the favorite flag is shared between the Files and Gallery+. I really like the option to work with the photo's in both views depending on what is needed.

With regards to the UI, for me it does not really matter where the favorite filtering option is. It can be next to the current sorting icons until the sidebar has been sorted out. Currently the AZ and Date filtering are not working for me.

https://cloud.hein.nu/index.php/s/dAiDG9A8s7PG2YB

@jancborchardt
Copy link
Member

@oparoz sure – just use <div id="#app-navigation"> and in there an <ul> with <li> elements for the entries. Just as described in https://doc.owncloud.org/server/8.2/developer_manual/app/css.html#navigation

For hiding the sidebar by default we can introduce an additional class which will trigger the mobile CSS (where the sidebar is hidden and a toggle is inserted) also on desktop.

@jancborchardt
Copy link
Member

@joephein you use Sugarsync to share a docx document here? Smells like treason. ;)

@oparoz
Copy link
Contributor Author

oparoz commented Oct 28, 2015

@jancborchardt - Ah yes, I forgot about the navigation template. I wanted to get the exact same side-bar as Files though, but there is too much to rewrite. We can start with favourites and add the rest as needed.

It would be good though if the favorite flag is shared between the Files and Gallery+. I really like the option to work with the photo's in both views depending on what is needed.

@joephein Favourite is a special tag and all tags are stores in the DB, so we're not creating our own tagging engine.You should even be able to switch between the Files and Gallery view.

Currently the AZ and Date filtering are not working for me.

@joephein Do you mean there is a bug or is it that it doesn't fit your workflow?

I've looked at the document. I'm thinking:

  • Bigger star, top right
  • Favourite folders are going to be a problem. We need to retrieve them, because that's an easy way to fill this use case, but we need to scan the entire content to see if there are pictures in them. It's going to be as slow or slower than the home page of Gallery, depending on the number of favourite folders. We also can't re-use the search engine as-is since we don't want to look in sub-folders. It's all because we don't get a virtual view from the API (that would allow so many cool things), but a bunch of disconnected files and folders.
  • I'm not sure I agree with the way your present favourites by organising them in folders, simply because it's going to require a lot of clicks to access some images and there will be no hierarchy. Imagine 2 favourites per folder, with 15 folders. You have to go in-out-in-out. It's much nicer to have them all in plain view from the start I think and only have favourite folders shown as albums

@youphyun
Copy link

@jancborchardt I use at least 6 cloud services and was very happy to discover owncloud recently when searching for a picturelife / trovebox solution that I can fully host on my own server. I have updated the link in my original post. I think you like this more :-)

@youphyun
Copy link

@oparoz

Currently the AZ and Date filtering are not working for me

It is strange but I just tried it again and it does work as expected. So please ignore.

You have to go in-out-in-out. It's much nicer to have them all in plain view from the start I think and only have favourite folders shown as albums

We can make a compromise here based on API limitations and the need to build code from scratch. However for me it is crucial to keep the photo's organized. If I have 15 folders each corresponding to a different event (for example: Birthday party of our son, Trip to Prague, Team building with my colleagues, etc.) I do not want to have those photo's all mixed up in one single level view.
In general I would maintain a depth of 2 levels only: lvl1: year, lvl2: event name (maybe prefix with Month number (or date) to allow easy sorting). In theory 1 lvl could work as well but using two levels will reduce the number of folders/events/albums that need to be shown at the same time and prevent performance issues.

The only reason to have a single level view would be to create some kind of timeline of my favorite photo's but to me this is a separate feature.

@jancborchardt
Copy link
Member

@joephein yeah, I was kidding a bit. ;) But it’s good to both dogfood, and also evaluate other services – so welcome to the ownCloud community! Your knowledge of the different services can be very helpful to improve ownCloud Gallery. :)

@oparoz
Copy link
Contributor Author

oparoz commented Nov 4, 2015

Specifications

Moved to the OP

@oparoz
Copy link
Contributor Author

oparoz commented Nov 4, 2015

@joephein - I've given it some thoughts and I think one folder depth is achievable. Anything above that will be complex to render because you then need to show some images in a top album as well as in a sub-album or have more levels, etc.

@oparoz
Copy link
Contributor Author

oparoz commented Nov 4, 2015

Also, bear in mind that if there are a thousand tagged images, they will all need to be referenced in memory. In other words, it won't scale.

@oparoz oparoz changed the title Show favourites [$50] Show favourites [$250] Dec 17, 2015
@warent
Copy link

warent commented Dec 18, 2015

I don't really do mobile development so I can't be much help here, but perhaps I can make a suggestion?

Say a user wants to view their favorites. Upon requesting viewing favorites, "loading, loading, loading, etc." during this period the server side will be gathering all the favorited images from the user. Then, say maybe for every 25 images you can compile them into a single bitmap, compress it way down, and place it in a cache (i.e. Redis) for later referencing. Provide the user with the compressed 25 image bitmap, decompress and explode into individual images again on the client side.

Either repeat this process until all images are loaded, or include some kind of trigger (scrolling, "show more", etc) to request additional images from the server.

Just going out on a limb here; I've personally never used owncloud.

@oparoz
Copy link
Contributor Author

oparoz commented Dec 25, 2015

Specs have been moved to the OP.

@jospoortvliet @jancborchardt @karlitschek @LukasReschke I need your feedback.

I think that putting favourites in their folder is going to be a problem.

Let's look at this example
Son -> 2015-> first_glasses
Daughter -> 2015-> graduation

Flat view
first_glasses
graduation

Works, but everything is mixed up

1 folder view
2015-> first_glasses
2015-> graduation

User will have no idea which 2015 is which

  • 2 folders-deep view won't solve the issue as there may be similar conflicts 2 folders up
  • Recreating the full hierarchy would lead to having to click loads before being able to see some favourites

I think the flat view, like in Files, offers the least problems, but there may be a better alternative.

@jancborchardt
Copy link
Member

I'd say if in doubt, let's do it like in Files. Flat view is the simplest and quickest way to actually access favorites too.

@oparoz
Copy link
Contributor Author

oparoz commented Dec 28, 2015

OK, I've updated the OP. Flat view to begin with and a future plan to introduce a way to let users alter that presentation by setting the number of levels they need for their favourites organisation.

@oparoz oparoz added On hold and removed ready labels Mar 1, 2016
@manishbisht
Copy link
Member

manishbisht commented May 3, 2016

Is anyone working on this issue ?

One more thing i want to suggest taking the same example given by @oparoz

Son -> 2015-> first_glasses
Daughter -> 2015-> graduation
Daughter -> 2015-> July-> g

Here Son, Daughter, 2015 and July are folders/directories and first_glasses, graduation and g are files. And we have marked first_glasses and g as favourites.

Flat view
first_glasses
g

Gallery favourites View
Son -> 2015-> first_glasses
Daughter -> 2015-> July-> g

The folders/directories displays only the files which are marked as favourites.

@jancborchardt
Copy link
Member

@manishbisht as said, it should work like in files. A flat list, the same as in the Files app. If there are conflicts, then in parentheses behind them the parent folder can be shown (up to the folder where the conflict ends) – and only for those folders/files where there are conflicts.

@oparoz
Copy link
Contributor Author

oparoz commented May 3, 2016

@manishbisht - #401 is blocking this. Once that's solved I'll let you know if I need help with this. There are other items which work the same way and require #401, like #532

@oparoz oparoz self-assigned this May 3, 2016
@youphyun
Copy link

youphyun commented May 9, 2016

And #401 is waiting for #22347 and this one for ownCloud release 9.1. Looking roughly at the release history ownCloud 9.1 might be ready during the summer period.

@youphyun
Copy link

youphyun commented Jun 3, 2016

ownCloud 9.1 beta is out but I am not sure that #22347 will be implemented. Instead a fork of ownCloud was made by ownCloud contributors as nextCloud. What are the plans to get this implemented?

@oparoz
Copy link
Contributor Author

oparoz commented Jun 3, 2016

There is still time for #22347 to be implemented in 9.1 as fixes are still being commited, so the plan is to currently wait for the fix.

@oparoz
Copy link
Contributor Author

oparoz commented Sep 4, 2016

This issue was moved to nextcloud/gallery#61

@oparoz oparoz closed this as completed Sep 4, 2016
@oparoz oparoz removed the bounty label Apr 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants