elm-dialog icon indicating copy to clipboard operation
elm-dialog copied to clipboard

Decouple from Bootstrap

Open mehl321 opened this issue 8 years ago • 3 comments

Your implementation is pretty neat and I integrated it in my project.. well not exactly. My project is based on Foundation and having a Bootstrap based popup in the middle of it is not ideal.

It would be great if we could specify our own HTML/CSS for the modal layout so that those using Foundation or other would be happy too. And it would potentially make your package more popular by opening it to more users.

How hard is this feature to implement?

mehl321 avatar Jun 14 '16 18:06 mehl321

Yeah, this would be a great improvement. I don't want this to be tied to Bootstrap, it was just a good starting point.

For my own reference, here are the docs for Foundation modals: http://foundation.zurb.com/sites/docs/reveal.html

All being well I'll take a look at implementing this shortly.

krisajenkins avatar Jun 15 '16 08:06 krisajenkins

Yesterday evening I created a very basic implementation for Foundation (using Reveal) that does the job for my private project, with the help of your original code. It was not too difficult.

I had some thoughts about updating your library. It should work no matter what CSS framework we are using. You could either provide some options (bootstrap, foundation, other) or, more generic, let the user create his own modal layout. I think the latter solution is the most flexible, it would only involve the user add an HTML template, not a big deal.

Have fun with the implementation! Looking forward to using it. Maybe I can help if I have time.

mehl321 avatar Jun 15 '16 08:06 mehl321

Right, I've got something that looks okay. Do you want to give the new views branch a test drive? To try it, you should just need to:

  1. Check out the views branch somewhere.
  2. Add .../elm-dialog/src to your source-paths.
  3. Change Dialog.view to Dialog.foundationView.

This is the first time I've used Foundation, so take a look and let me know if it looks good. All the code's in Foundation.elm, so feel free to tweak and PR if you're up for it.

krisajenkins avatar Jun 29 '16 21:06 krisajenkins