Skip to content
This repository has been archived by the owner on Dec 4, 2018. It is now read-only.

Implement new Gallery design #20

Open
PhoenixLandPirate opened this issue Aug 3, 2017 · 19 comments
Open

Implement new Gallery design #20

PhoenixLandPirate opened this issue Aug 3, 2017 · 19 comments

Comments

@PhoenixLandPirate
Copy link

I made some mock ups, these mock ups are to show how the Gallery could look when we add support for new online services.
As well as showing images by the folders they're from, such as downloads, camera, telegram, and more.

gallery 5
gallery 1
gallery 2
gallery 3
gallery 4
gallery 6

@TronFortyTwo
Copy link
Collaborator

They look good! There are two points I like to highlight:

  • Implement folders
  • Header with sections

@PhoenixLandPirate
Copy link
Author

So the Collections tap is basically folders.
Originally I was going to call the tap folders, but in a photo app they dont really act much like a file manager, and in my head thats how a tab like folders would work, so I looked at what my OP3 called it, and they called it collections.

That's why one is called Camera, and the other is called Download in the collection view, a question with that would be, how would apps work, as if you look where telegram places it's images, they put them in weirdly named folders, where as in android they're placed in >Pictures>Telegram
Flickr is placed in >DCIM>Flickr

Having a folders/Collection view, is VERY desirable, we also have to figure out the best way of pulling images in under the correct name.

@PhoenixLandPirate
Copy link
Author

The two things I wanted to solve with the new designs was;

  • Online accounts
    A design which makes it easy for users to change to online accounts and what tabs they may have in place.

  • More organised gallery
    So the current Gallery app is pretty all over the place,
    we have the events tab which shows you images from anywhere and everywhere, but is organised by date, this isn't to bad if you're not looking specifically for an image which you don't know what date it's from.
    Then Albums, this is a way to organise the gallery app, but it takes a lot of time to maintain and ends up being a feature little used in my PO
    The Photo stream is even less organised as it puts all of your photos in a block with nothing to separate anything.

So I added Collections which should organise images by what folder they're placed in.

I imagine most people will be going between the Events tab and Collections tab if it was implemented in a way which specified where the photos came from, see last comment.

@TronFortyTwo
Copy link
Collaborator

TronFortyTwo commented Aug 3, 2017

About collections, I suppose is a very good idea and I suppose it's very important. I received various segnalations about difficult browsing when you have many medias from many sources. Collection will solve the issue

@TronFortyTwo
Copy link
Collaborator

The main problem about collections is how Gallery media importing works: All apps to save media in the Gallery have to give the media to the Gallery throught content-hub, I do not know if is possible from the Gallery side know what app has shared that media, hence it put all the media received from content-hub in the imported/ folder. I have to invstigate on this.

@PhoenixLandPirate
Copy link
Author

PhoenixLandPirate commented Aug 3, 2017

Sure, this is one of the reasons why I believe it hasn't been implemented in the Gallery app so far.
With that being said we don't have to work with all the same restrictions that canonical placed on apps, especially since this is a core app.

I recon that a talk about how best to implement this with Marius would be good as there might be something he could add to the main image which would make it easier.

at the moment if I download an image and I select to just download it, I have to go into downloads then open with gallery before the gallery app can see it, but the gallery app should be able to see the images in the Download directory and automatically pull them in under the Collections Download title.

Then using the file manager people should be able to move images to different locations, so if I have a folder for profile pictures, I could download an image, go into the file manager, cut the image, go into pictures, then create a folder called "Profile Pictures" then paste it in there, and gallery should be able to detect what the folder is called and that the photo's moved and create a new collection with that image inside it.

Perhaps the gallery app could only see inside the photos directory and downloads, so photos in directory's such as documents aren't shown in the gallery?

But then apps like telegram would have to download images specifically to >Photos>Telegram.

Perhaps there's a way to make it so the Telegram app could only see >Photos>Telegram, and couldn't see other folders such as >Photos>Camera or >Photos>Matriks.

The content-hub definitely needs to be used for apps like Telegram and Matriks, but perhaps the rule should be at least optionally turned off for Gallery to allow this feature, because its one that's really needed to make a really useful and easy to use Gallery app.

This is just spitballing ideas, and this wouldn't work at all using the current system which is why we should talk to @mariogrip about a good way to implement it, and what rules the gallery app can break.

@Flohack74
Copy link
Member

I propose (also some thoughts with @sverzegnassi together) smth like:

  • click apps keep their local confinement and data folders in .config, .cache .local etc
  • /home/phablet/Bigletterfolder should always be accessible to all Apps. So users can create whatever they want.

@TronFortyTwo
Copy link
Collaborator

Definetely there is something to change in the isolation system. I thought about two solution, they can help not only the Gallery, since probably other apps are going to have the same problem in the future:

  1. Gallery (or whatever receiving app which manage a BigLetter folder, such Document Viewer for Documents folder )-side solution. Since Gallery have to order imported media, content hub need to inform Gallery of the name of the app has sent the media, is then the Gallery app to manage the folders/collection accordingly to the implementation.
  2. Whatever App which have to save the media-side solution. Is the app to manually put the media in the correct folder, Gallery has to do nothing. The app has to have access grant to the /Bigletterfolder to do that, or to /Bigletterfolder/app-name/

I have more to say about this topic, such as pro and con of the two solutions, but I think we should talk about it in the forum, since it relates not only to the Gallery app, but also to other apps and all the ut isolation system.

@sverzegnassi
Copy link

sverzegnassi commented Aug 4, 2017

You've discussed a tons of stuff here!

I like @ChloeWolfieGirl 's redesign. While I'm not sure if it would still make sense to have a 'Photos' (i.e. see all medias w/out organization) section, once 'Collections' became available, this is definitely what I'd like to see.

Events: I would say to remove the UbuntuShape and OrganicView usage from the app, since it has been found that those components are pretty heavy for being painted during the QML delegate creation. For instance, the UI design of gallery-app has not been updated since 2013.
Also - this is more a wish for a longer term - I would like to see some kind of smart organization of events, which includes geotag data. As a QuickPic user on Android, it is a feature I really appreciate.

Collections: the mockup for collections is gorgeous!

Online accounts: I won't say anything here. I'm not a big fan of those apps that support a thousand of different web services, so I might have a strong bias on this topic.

ContentHub and confinement:
@Flohack74 and I were working on a draft redefining how confinement and file management should work on the platform. We have a first draft in my GDrive folder; even if it's not something readable at the moment, we have some indication:

  • Relaxing confinement restriction would reduce the security of the platform. To compensate, privacy should be enforced: we should make the user aware of any usage of her data. trust-store might help us with this.

  • Indeed, we were considering to make XDG folder publicly available through proper AppArmor policies (currently those policies are restricted). Access to XDG folders should be mediated by trust-store, in order to allow users to fine-tuning permissions required by installed applications.

  • Generally speaking, we thought to enforce the separation between private app storage and public storage.
    -- ~/.local/<app_id> and others paths would still be restricted and exclusive as usual
    -- We could add [SD_CARD]/Apps/<app_id> as another restricted/private storage
    -- The other folders in the SD card might be fully accessible by all the apps

  • Moreover, we identified two different kind of situations in content management:
    -- Applications requiring ownership on the content - e.g. InstantFX when imports a picture for future manipulation
    -- Applications not requiring ownership - e.g. it might be a text editor used for editing system configurations
    Currently, both situations are handled by ContentHub, which lead us to sub-optimal results. The latter situation (i.e. no ownership) should actually be handled by an Android Intent-like interface, or some kind of xdg-open replacement (which is not implement in UT).

In any case, this doesn't change the way gallery-app works directly, since the ideas Florian and I were gathering were meant to grant the highest compatibility with the current confinement design.

What might be relevant for gallery-app are our incidental considerations on ContentHub.

  • Thinking at InstantFX, its flow is:
    Import from gallery-app -> In-app editing -> Export to gallery -> Share
    The way ContentHub currently works, however, makes impossible to perform any further action after export, since the exporting app loses its focus. This is a huge bug in user experience.
    We were considering to show a toast notification instead, in order to still notify the user that the export has been successful, and preserve app focus at the same time.

  • Core apps do not store exported content in a common way.
    -- For instance, music-app saves exported content in ~/Music/Imported/yyyy/MM/dd/hhmmss
    -- DocViewer stores in ~/Documents/Imported instead
    -- Gallery-app stores in ~/Pictures/imported
    We should enforce a consistent standard, which should be compatible with future changes in our confinement policies.
    Even if at an initial phase we wouldn't allow access to XDG folders, we might - for convenience - allow third party apps to access in read-only mode e.g. ~/Pictures/Apps/<app_id>.
    That would be the folder where ContentHub stores the exported content. It would require minimum changes, and it would relax the confinement enough for matching the needs of e.g. telegram-app, without compromising the current security enhancement granted by the platform.
    Moreover, such predictable path would allow gallery-app to implement collections smoothly. You would only need to check for an app-id through 'libclick' in order to get a "human-readable" app name and an icon.

Summing up:

  • ContentHub should export content w/out stealing app focus
  • Core apps should export content in ~/< xdg-folder >/Apps/<app_id>
  • Third party apps should have an exclusive, read-only access to ~/< xdg-folder >/Apps/<app_id>
    These should be the minimum requirements for implementing collections in gallery-app, still preserving all the security features at a initial phase.

@TronFortyTwo
Copy link
Collaborator

Ok
I will start work on this new stuff then.

@PhoenixLandPirate
Copy link
Author

I'm glad you like the designs!
I dont think anyone would mind if you dropped the photos tab.

My question for this idea of implementation is.
can people still organise there photos manually by moving photos in the file manager?

There's multiple reasons from this, many people download lots of different photos from the browser, they maybe backgrounds, profile picture, photos of friends etc, and what to organise them by so, but also back ups and restores.

I have lots of photos organised on my android phone, if I copied them to ubuntu Touch, the organisation would go, same for organisation from the desktop, I organise my pictures into many folders.

Is this a long goal option for us to be able to accept users being able to organise in this way?

If I look at my android phone, most of my photos are organised just by what app its been downloaded from, so just looking at what app downloaded the app seems to be fine in most use cases, but not in all.

Image Organisation

@sverzegnassi
Copy link

Is this a long goal option for us to be able to accept users being able to organise in this way?

It is. I'm currently working on the new File Manager for phones, and I specifically created a custom view for handling folders with pictures. It is an alternative way to access pictures, with a focus on advanced file management features, rather than a full gallery-app replacement, so it may probably cover your requirements.

@PhoenixLandPirate
Copy link
Author

I saw some screenshots or mock-ups of that on telegram a bit ago, looks great :D

@sverzegnassi
Copy link

sverzegnassi commented Aug 5, 2017

Sorry for further spamming but, after the last messages, I came up with a design proposal for 'collections', and I'd like to hear @TronFourtyTwo 's opinion about it.

Chloe has been asking to implement some basic file management capabilities inside gallery-app, in order to organize her photos. Instead of adding those features (e.g. Move, Copy, New Folder/New Collection), which would add more overhead to gallery-app development (which is btw a database-driven app), we can add a "Manage photos/media" action into each Collection page[1][2].

That action would trigger a URL link like:

Qt.openUrlExternally("folder:///home/phablet/Pictures/Holidays/Croatia%202017?use_pictures_view=true")

or

Qt.openUrlExternally("file_manager:///home/phablet/Pictures/Holidays/Croatia%202017?use_pictures_view=true")

Which is handled by the new File Manager through the url-dispatcher service: filemanager-app is launched and shows the collection folder.

I think this would be a win-win situation:

  • It's a win for developers, since costs of the implementation of collections would be reduced at a minimum, since we wouldn't need to implement file management capabilities in gallery-app.
  • It's a win for users, since they get a real file manager with all the features they want. In terms of UX, we keep a single UI without divergent implementations (also, = easy learning curve) and, in any case, a user can easily return to gallery-app with a short swipe from right.

Also:

  • We would incidentally start to fixing the lack of integration between apps, which strongly compromise the UX consistency.
  • In case users don't like this solution, we could easily revert the change: other than the cost of implementing the features in gallery-app (it's a cost we would only postpone), removing the action would cost only the removal of 5~10 lines of code.

Any thought? :)

======
[1] i.e. UITK.Page.Header.trailingActionBar.actions
[2] "Delete" action would still be available

@PhoenixLandPirate
Copy link
Author

I didnt mean add a file manager to the gallery app, but rather if someone uses the file app or just moves folders from there computer to there phone, the gallery app should detect where the photos have been moved to.

@TronFortyTwo
Copy link
Collaborator

@sverzegnassi I think is a good idea, but to know if it will be actually good in practice we have to try it, we should make a prototype, and see if it works.

@TronFortyTwo
Copy link
Collaborator

TronFortyTwo commented Jan 10, 2018

Hi!
Sorry for my few (actually none at all) commits to the gallery app lately. Unfortunately since some months my Ubuntu Phone get broken and I have no other ut device available. For some time I managed to develop something on it using it remotely, but still, I had no possibility to work on graphical applications, but now is completely unusable. With this I am not saying I am not going to work on gallery app anymore, I hope to get soon an Ubuntu Touch device so that I can get back to work. I wanted just to explain the reason for my inactivity.

@Flohack74
Copy link
Member

@TronFortyTwo the foundation can maybe send you a development device, we got some stock from Canonical for this...

@TronFortyTwo
Copy link
Collaborator

@hummlback Yes, I am still without an Ubuntu Touch device.. :(
@Flohack74 That would be absolutely great and very kind and helpful! :D

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants