Ks89 / angular-modal-gallery

Modal image gallery for Angular
https://ks89.github.io/angular-modal-gallery-2024-v12.github.io/
MIT License
146 stars 80 forks source link

Buttons in plain-gallery #203

Open giTonyx opened 4 years ago

giTonyx commented 4 years ago

I'm submitting a...


[ ] Regression (a behavior that used to work and stopped working in a new release)
[ ] Bug report  
[ ] Feature request
[ ] Documentation issue or request
[x] Support request

Current behavior

Is it possible to have buttons on the gallery images? I.e. having buttons (either in a corner of the image or only available with mouse over) on the images in the gallery, without having to open it first?

Expected behavior

Show the buttons before opening the image.

Minimal reproduction of the problem with instructions

Just a question, not sure is needed.

What is the motivation / use case for changing the behavior?

In case of large galleries sometimes it could be useful to perform some actions (like delete or download) on many images. Having the buttons on the gallery will speed it up.

Environment (the most important section to fill very carefully)


- @ks89/angular-modal-gallery version: X.X.X
- Node version: X.X.X  
- npm version: X.X.X  
- Operating System and version:  
- Angular version: X.Y.Z 
- angular-cli version (or SystemJS/Webpack): X.Y.Z 
- I'm using Server Side Rendering with angular-universal: YES/NO
- I'm compiling with mode: DEBUG / PROD / PROD with AOT



Browser:
- [ ] Chrome (desktop) version XX
- [ ] Chrome (Android) version XX
- [ ] Chrome (iOS) version XX
- [ ] Firefox version XX
- [ ] Safari (desktop) version XX
- [ ] Safari (iOS) version XX
- [ ] IE version XX
- [ ] Edge version XX

Others:

Ks89 commented 4 years ago

This is not part of the library but it's interesting. It could be a feature for next releases, to improve plain gallery.

At the moment, you can use custom plain galleries to add buttons and create your own style for the plain gallery (see example P8 - (id=207), under section "plain gallery", on my stackblitz example). However, to add logic to your buttons you have to implement it by yourself (if you want you can check the source code of the library to see how I download or delete images).

cmschandan commented 1 year ago

is the above feature added for version 10.0.0 or it is still in progress

Ks89 commented 1 year ago

Hi @cmschandan, no it isn't implemented yet. I'm open to Pull Request, if someone want to work on this. But this is a very specific request and it should be designed in the right way to be useful in a library (not so easy).

However, you can implement this by yourself based on your specific requirements, because you can trigger modal-gallery via angular service and write your custom plain gallery component. Obviously, adding a feature like this, it will require some work, because you have to manage all by yourself. If you only need a button to delete an image, it's quite easy to implement, but other things can be challenging.