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

Use viewer in other apps #157

Closed
julien-nc opened this issue Jul 1, 2019 · 8 comments
Closed

Use viewer in other apps #157

julien-nc opened this issue Jul 1, 2019 · 8 comments
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement New feature or request integration Compatibility with other apps

Comments

@julien-nc
Copy link
Member

Hey!

I'm currently developing Maps app and would like to be able to launch the Viewer for pictures. Currently I'm opening a new tab to the gallery app but it would be nice to stay in the Maps app. I might want to use Viewer in GpxPod too.

When I include Viewer (script('viewer', 'viewer');) I get this in the browser:

OCA.Viewer initialized                Viewer.js:37:10
TypeError: OCA.Files is undefined     Viewer.vue:369
TypeError: OCA.Files is undefined     Viewer.vue:369

Would it be possible to make Viewer (or part of it) independent from files app?

@julien-nc julien-nc added enhancement New feature or request integration Compatibility with other apps labels Jul 1, 2019
@skjnldsv
Copy link
Member

skjnldsv commented Jul 1, 2019

Yes, this is planned :)
I actually took some steps next week to start going this way ;)

The last steps are actually quite easy.
We should just check against OCA.Files and not register new actions handlers if it does not exists.
After that everything should works! (Though other apps that register their views will not be loaded as you also need their script, so viewer will be standalone with minimal default support: images + video)

@skjnldsv skjnldsv added the 2. developing Work in progress label Jul 1, 2019
@julien-nc
Copy link
Member Author

Yay! Great. Looking forward to it. Thanks for the quick answer!

@matiasdelellis
Copy link

Great!.
However, I have a special request.. 😅

Can it become independent of OCA.Files?
My idea is to do something similar, but for the application of facerecognition. Provide something similar to "OCA.Files" where you generate a virtual list, and in these case allow to see all the photos where there is a particular person. The same can apply to browse photos by nextcloud tags, project, etc.

Here, nextcloud/maps#93 (comment)
You point out that it is enough if we go through directories for Maps, but what happens if in Android Client we have activated the option to upload images by date.? Half of the photos of some vacations can be in one directory, and half in the other. So, this also applies for maps

What do you think? 😄

p.s: Maybe the answer goes to extend OCA.Files, to generate the virtual views in the application of files too, but I think here is the starting point.
Note that if we go to the favorites view, when clicking a favorite image, this viewer is launched, but when moving to the right, continue with photos of the same directory, and we would expect to continue seeing the favorites... So this idea also applies.. 😅

@skjnldsv
Copy link
Member

That's the whole goal of this issue yes :)
Being able to launch the viewer regardless of any app you're currently in !

@szaimen
Copy link
Contributor

szaimen commented Nov 7, 2019

@skjnldsv is this ready now that #271 is merged?

@skjnldsv
Copy link
Member

skjnldsv commented Nov 7, 2019

Yes :)
Please test it!

@skjnldsv skjnldsv closed this as completed Nov 7, 2019
@szaimen
Copy link
Contributor

szaimen commented Nov 7, 2019

@eneiluj Maybe you could test it in the Maps app? :)

@skjnldsv skjnldsv added 4. to release Ready to be released and/or waiting for tests to finish and removed 2. developing Work in progress labels Nov 8, 2019
@julien-nc
Copy link
Member Author

Great, it works fine! I tried v18.0.0beta3.

nextcloud/maps#227 makes it happen in Maps app.

Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
4. to release Ready to be released and/or waiting for tests to finish enhancement New feature or request integration Compatibility with other apps
Projects
None yet
Development

No branches or pull requests

4 participants