prestaconcept / PrestaImageBundle

Allow to crop local and remote image before uploading them through a classic form.
MIT License
23 stars 19 forks source link

missing bootstrap modal ... :-( #92

Closed treeindark closed 1 year ago

treeindark commented 1 year ago

@PrestaImage/form/bootstrap_5.html.twig was deleted!!!!

J-Ben87 commented 1 year ago

Hi. Do not panic, be polite.

Indeed there is no CHANGELOG file in this bundle, I don't have time to maintain it. However the README.md is up to date and you'll find that the template has been renamed form_layout.html.twig.

treeindark commented 1 year ago

No Problemo J-Ben87, just surprise after an update.

form_layout.html.twig do not use de bootstrap modal, and cropper.js too

J-Ben87 commented 1 year ago

The renaming is related to this commit. The idea was to stop relying on external libraries, especially some that are getting abandonned by more and more people.

However you can create your own form layout to implement bootstrap styles if you really want to :wink:

nicodemuz commented 1 year ago

Is there any code shipped by default that makes the default look and feel like a modal? I just see a div that renders below the input box, is this expected behaviour?

J-Ben87 commented 1 year ago

Hi,

Indeed this is the expected behavior since I dropped Bootstrap support.

This bundle aims to provide tools to ease the development of an image upload and cropping system, but IMHO it should not come with a predefined look and feel that will pretty much not match your web app requirements. However it should be pretty easy to turn the <div class="presta-image-modal"> into a modal if you want to, or simply style it as a block component that may fade in/out below the form.

However if you feel like it would be more convenient to have a default modal style shipped with the bundle, feel free to open an issue and a PR so that we can discuss the best way to achieve that :slightly_smiling_face: