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

Allow URLs to be bookmarked / shared. Don't lose page when reloading #831

Closed
benmccann opened this issue Jan 6, 2021 · 3 comments
Closed
Labels
duplicate This issue or pull request already exists

Comments

@benmccann
Copy link
Contributor

If I open up a photo or video the URL is something like https://demo.photoprism.org/photos#&gid=1&pid=1. It'd be nice if the photo ID were in the URL so that if I refreshed the page the same photo would load. E.g. something like https://demo.photoprism.org/photos/2305e512e3b183ec982d60a8b608a8ca501973ba

I'm not that familiar with vue-router and whether this would be the best way to implement it, but since the background of the lightbox is opaque you might be able to simply make a new page for the lightbox instead of having it be a modal.

@lastzero
Copy link
Member

lastzero commented Jan 6, 2021

The viewer just displays search results, as it is implemented right now. So photo 1 doesn't refer to a specific photo, just to the first result. I would expect users to be disappointed if they save or share a link to a photo and then another photo appears (or none, if there are no results this time).

Once we have time and a budget, I'm more than willing to give our photo viewer an upgrade. We also need URLs for individual photos to implement link sharing (on our roadmap).

@lastzero lastzero added the idea Feedback wanted / feature request label Jan 6, 2021
@benmccann
Copy link
Contributor Author

benmccann commented Jan 7, 2021

hls.js and mediaelement are very large packages, which together are about 1MB. These packages are used by the video player. p-video-dialog is statically loaded in app.vue, so even when dynamically loading routes as in #841 these packages still end up in the main bundle.

I think if the photo and video players were both routes instead of dialogs it would allow them to be lazily loaded, which would cut down on the package size a lot (it would also probably allow photoswipe to be lazily loaded with the photo viewer). This in addition to the original motivation suggested here of allowing bookmarking, page reloading, etc. Just noting this as an additional consideration to take into account if any updates are made here

@graciousgrey
Copy link
Member

Closed in favor of: #1307

@graciousgrey graciousgrey added duplicate This issue or pull request already exists and removed idea Feedback wanted / feature request labels Nov 2, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

3 participants