Announcement

  •  » Extensions
  •  » New experimental PhotoSwipe-based slideshow

Notice: Undefined offset: 5 in /var/www/piwigo.org/forum/include/parser.php on line 551

#1 2022-11-21 22:36:26

mmoy
Member
France
2014-08-18
85

New experimental PhotoSwipe-based slideshow

Hello/Hi/Greetings,

I love the Fotorama plugin, but it lacks the ability to zoom, especially on mobile phones. As I mentioned in another thread, I started hacking a variant of the Fotorama plugin based on PhotoSwipe. There's a demo/test here: https://matthieu-moy.fr/piwigo/index.php?/category/1 . The interesting code is essentially [Github] Piwigo-Fotorama file template/photoswipe-content.tpl.

I'm now wondering how to proceed. Initially I thought this would become a standalone plugin, as an alternative to Fotorama. BUT ... there's a lot of code in main.inc.php that deserves to be shared between Fotorama and PhotoSwipe (and honestly, it's rather obscure to me who's not used to Piwigo's code). So I'm wondering whether both Fotorama and PhotoSwipe should live in the same plugin, with a configuration option "use Fotorama"/"use PhotoSwipe", and perhaps "use PhotoSwipe on mobile browser, and Fotorama otherwise" (I really prefer PhotoSwipe on mobile, but Fotorama's thumb mode on desktop is kind of cool also, so choosing the tool to use depending on the client may be nice too).

Any advice on what to do next?

Thanks,

Last edited by mmoy (2022-12-01 11:06:31)

Offline

 

#2 2022-12-02 09:38:45

mmoy
Member
France
2014-08-18
85

Re: New experimental PhotoSwipe-based slideshow

I've sent a pull-request to Piwigo-Fotorama, comments are welcome there too.

Offline

 

#3 2022-12-02 09:54:37

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: New experimental PhotoSwipe-based slideshow

Very interesting. I'm going to make deeper tests. 2 first feedbacks:

1) funny piece of code ;-)

Code:

<div id="Matthieu"></div>

2) offering option photoswipe/fotorama for mobile on one side and desktop on another side is a purely technical option. It is absolutely impossible to understand for a non-developer user. Could we find a piece of explanation to provide next to this option?

Offline

 

#4 2022-12-02 12:45:54

mmoy
Member
France
2014-08-18
85

Re: New experimental PhotoSwipe-based slideshow

Oops, I said my code was still a draft, a leftover piece of debug code was indeed still there ;-).

The admin page still requires some love. My plan was:
- to write a short explanatory text saying what Fotorama and PhotoSwipe are, with the pros and cons of each backend, just above the dropdown menus to chose the backend.
- to have explicitly a part about configuring Fotorama and another about configuring PhotoSwipe (but right now, PhotoSwipe is not configurable), probably greying out the section of a backend when it's not selected at all.
- Maybe have a part with common options (e.g. "add an info button" that would apply to both Fotorama and PhotoSwipe), but I'm not sur whether it's a good idea: if the user choses only one backend, the "common options" part doesn't have a real added value, and if they chose different backends for desktop and mobile, maybe it's a good idea to allow different customization for both.

I just wanted preliminary feedback before doing this, because none of this would make sense if the idea of having both backends in the same plugin is discarded.

Offline

 

#5 2022-12-02 13:15:27

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: New experimental PhotoSwipe-based slideshow

mmoy wrote:

I just wanted preliminary feedback before doing this, because none of this would make sense if the idea of having both backends in the same plugin is discarded.

I think both backends are valid options and if they are in 2 separate plugins, they would be conflicted. Having them both in the same plugins give the choice to the user on which backend to use and use one for desktop and another one for mobile (what I write is obvious for you, I just write it for readers who would not understand the advantage to have 2 possible backends in the same plugin).

For me, it's a GO :-)

Offline

 

#6 2022-12-05 17:48:53

mmoy
Member
France
2014-08-18
85

Re: New experimental PhotoSwipe-based slideshow

OK, we're on the same page :-). I wrote a quick todo-list on the PR's text on GitHub. If you have a bit of time, any help on the combine_css / combine_script issue (currently last item on the todo-list).

Offline

 

#7 2022-12-29 16:22:50

mmoy
Member
France
2014-08-18
85

Re: New experimental PhotoSwipe-based slideshow

FYI, I finally got time to clean up my code a bit, the PR is now in a reasonable shape.

Offline

 

#8 2023-02-24 15:34:54

mmoy
Member
France
2014-08-18
85

Re: New experimental PhotoSwipe-based slideshow

Hi,

Just a ping, my PR is waiting for someone to review/merge it :-).

https://github.com/Piwigo/Piwigo-Fotorama/pull/25

Cheers,

Offline

 

#9 2023-02-24 17:55:58

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: New experimental PhotoSwipe-based slideshow

First review done but blocked very quickly. I reported a problem with new configuration settings.

I swear my second review will come much faster ;-)

Offline

 

#10 2023-03-14 14:05:24

mmoy
Member
France
2014-08-18
85

Re: New experimental PhotoSwipe-based slideshow

In case you've missed it, I've updated my PR and it should be ready for review.

(And there's another unrelated but straightforward, literally 2 lines, fix here that I'd like to get merged too https://github.com/Piwigo/Piwigo-Fotorama/pull/26 )

Thanks,

Offline

 

#11 2023-12-13 12:46:12

plg
Piwigo Team
Nantes, France, Europe
2002-04-05
13791

Re: New experimental PhotoSwipe-based slideshow

2 PRs merged and new revision of [extension by JanisV] Fotorama

Note : we had to deal with the new parameters on update with [Github] Piwigo-Fotorama commit 50f18d24

Offline

 
  •  » Extensions
  •  » New experimental PhotoSwipe-based slideshow

Board footer

Powered by FluxBB

github twitter newsletter Donate Piwigo.org © 2002-2024 · Contact