Custom Fields introduce a plugin for image gallery: fotorama.io
Can we either drop this plugin altogether or find a vanilla script or use bootstrap's carousel?
Labels |
Added:
?
|
Title |
|
Title |
|
What does the current gallery field do? It didn't work for me on XAMPP when I tried so can't say.
I think it's mainly meant as an example field. It doesn't have to have many options (there are currently no parameters anway in the plugin).
I haven't an issue with it being a jQuery plugin. That alone isn't an argument to me. It's a plugin and if someone doesn't want to use a jQuery gallery plugin, then he is absolutely free to use another one.
Altough would be nice to have a gallery plugin in core.
I agree it is nice to have one since it's a common requested feature.
@dgt41 has a point in that we add another JS to our core. We could do this plugin as a very basic image slider using the Bootstrap Carousel (http://getbootstrap.com/2.3.2/javascript.html#carousel). This way we wouldn't need any added JS or CSS at all.
It would of course miss the thumbnails the current fotorama JS does, Not sure if that is needed.
@Bakual we can still have thumbs with bootstrap carousel: http://bootsnipp.com/snippets/featured/carousel-extended
Yeah with custom JS of course it is possible. The slider itself would be possible with any custom JS at all. You just need the call to JHtml::_('bootstrap.carousel');
and add the appropriate HTML stuff.
how to cook a simple gallery:
Make thumbs with JavaScript it a very bad idea: User will upload full photos with 6MB size each and JavaScript make it smaller. Very "useful" gallery, especial on mobile
@Fedik I think there is more than just a thumbnail that is required here. Responsive images should be considered, https://developer.mozilla.org/en-US/docs/Learn/HTML/Multimedia_and_embedding/Responsive_images
<img srcset="elva-fairy-320w.jpg 320w,
elva-fairy-480w.jpg 480w,
elva-fairy-800w.jpg 800w"
sizes="(max-width: 320px) 280px,
(max-width: 480px) 440px,
800px"
src="elva-fairy-800w.jpg" alt="Elva dressed as a fairy">
A gallery that doesn't support responsive images, in 2017, it's outdated and totally useless...
My 2c
who cares about all that fancy stuff
I would avoid having a full fledged gallery plugin in core. Leave that to 3rd party developers. They can do all the fancy stuff.
Imho we just need to have some very basic example plugin so 3rd parties have an easy way to figure out how it works.
Imho we just need to have some very basic example plugin so 3rd parties have an easy way to figure out how it works.
If that's the purpose of this plugin, then make another repo for that and DON'T ship it with as core plugin.
If that's the purpose of this plugin, then make another repo for that and DON'T ship it with as core plugin.
It is good that Joomla has a gallery field by default,
to do the above the gallery logic should be limited to exist only inside the display ('render') layout
I think to offer 3 options by default and create 3 layout files
e.g. existing file:
plugins\fields\gallery\layouts\field\prepare\gallery.php
should be renamed to be:
plugins\fields\gallery\layouts\field\prepare\fotorama.php
... and in future joomla will also need to add ... fotorama.xml ... an XML file per layout ... for the layout-specific configuration
Then the parameter to display layout should be a "filelist" element or similar looking into folder(s):
plugins\fields\gallery\layouts\field\prepare
and to the other layout overriding folders ...
so that 3rd party template authors and extension authors can add more
and the layout parameter should be of course added to 'all' fields which are now being made a joomla 'plugin'
If that's the purpose of this plugin, then make another repo for that and DON'T ship it with as core plugin.
An own repo for a 5 file plugin? That's a bit to much administrative overhead I think.
It's fine to have it in core.
It is good that Joomla has a gallery field by default,
It's a good example plugin, yes.
just make it flexible to use other JS libraries to display the images, that is both inline galleries and popup (clickable thumbnails) (or hybrid)
Please don't do an extended gallery plugin with various options and layouts. That's overkill and gets out of hand fast. Please leave that to 3rd parties.
We don't need a customisable or library agnostic plugin. It's very simple to create an own one if needed.
It is good that Joomla has a gallery field by default,
I am afraid I will disagree here. If the core provided plugins are not covering most use cases, then the plugin should not be delivered. And this plugin as is (only one image size) is not gonna help anyone achieving something good.
Either provide something that supports, lazyloading, responsive images, good support for touch devices (e.g. #13375 (comment)) or drop this, as it's gonna be another plugin that most people have to disable!
@ggppdk the layouts could work here, although there is some code missing for creating thumbs and different sizes of images (for responsive).
Anyways, my point is, that for 2017 the fotorama.io script is inefficient for most use cases. If there is a need to include this in core at least provide a good js script with it: http://photoswipe.com
It's very simple to create an own one (own plugin) if needed.
This is very true too,
but layout selection inside the field configuration also serves a very different purpose
You have this problem:
how do you display differently some of them if needed ?
i do not mean style differently
ok actually you can !
still it is not a neat solution / and takes more effort to maintain it, than just selecting layout inside the field configuration , and then going and modifying the specific layout file
-- also you can even add inside the field configuration, option to create a new layout file and edit them directly there
about removing fotorama, and / or using other JS, i have no opinion, i do not really care much about it
Of course as a 3rd party developer, even if Joomla does not add a layout-selection parameter
I can just add a layout-selection parameter of my own, in the parameters of my custom field-plugins,
To be honest even if Joomla adds a layout-selection parameter, i may replace it with my own implementation, that will do exactly what i need
Afaik there is currently no general layout selection supported for plugins. That would need to be coded for each plugin manually. We only use plugin layouts for pagenavigation and vote plugins so far anyway.
Either provide something that supports, lazyloading, responsive images, good support for touch devices (e.g. #13375 (comment)) or drop this, as it's gonna be another plugin that most people have to disable!
Sorry, but no. It's a custom field, it is not a replacement for a full gallery. If you need that, use a regular gallery extension. Those are much better suited to do the job and there are a lot to choose from on JED.
Also keep in mind as soon as you want to add parameters to the field, that needs to be done for the field creation part or even in the plugin parameters itself.
In the item (eg article) you can only choose the folder, you can't adjust it more detailled at this point.
Afaik there is currently no general layout selection supported for plugins. That would need to be coded for each plugin manually. We only use plugin layouts for pagenavigation and vote plugins so far anyway.
Yes, it can be a parameter inside field-specific configuration (its XML parameters file)
that is added by fields that need it
i agree it does not need to be a core property that appears in all fields
I agree with @dgt41 even just on the responsive image support! I was at JDUK16 and they had a great guy in chatting about it. Even Wordpress natively supports this! Why are we not? It's a pain to come up but provides a much better user experience on the website if don't let properly.
Hello everyone, here are my 2 cents:
Every custom field type should have a default layout.
As far as the gallery is concerned, since Bootstrap is used throughout, a simple Bootstrap-made gallery should be used as the default layout. It is useless adding jQuery plugins that would get dropped on a later release. Multiplying the use of outsourced plugins multiplies issues when new updates come out.
Then, let the developers create their own layouts if they feel like their users need something more sophisticated, with 'responsive' images... and put the burden of updating the gallery scripts they use to their projects, limiting the burden on the Joomla core.
Guess so.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2017-02-24 21:49:01 |
Closed_By | ⇒ | Bakual |
different CSS slideshow code snippet https://www.csscodelab.com/tag/css-slideshow/
A far better script for this could be: http://photoswipe.com
Is MIT, supports IE8, lazy loading, is accessible and a gazzilion more goodies comes with it!
And of course is lighter and dependency free!