gkubisa / elm-app-boilerplate

Base project for Elm applications
http://gkubisa.github.io/elm-app-boilerplate/
MIT License
120 stars 16 forks source link

can't use semantic-ui #13

Closed lidorcg closed 7 years ago

lidorcg commented 8 years ago

worked on it for about 3 hours now. there must be something i'm missing...

Trying to use the menu of semantic ui but none of the css seems to be included... I just want to use the default theme... is there any modifications I need to use for the basic styling of semantic ui?

hutch commented 8 years ago

Same problem here. Not sure how to integrate what ships with the boilerplate.

Gave up and installed as instructed on the semantic-ui website. Added the script tags to html/index.html, and it seems to work.

gkubisa commented 8 years ago

Sorry about the delay. Have you imported the less files, which you wanted to use, from Semantic UI? Here's an example: https://github.com/gkubisa/elm-app-boilerplate/blob/e64573a3a5e1a9d960c19cf4b2167738ad8b770b/js/semantic-ui/modules/accordion.js#L2

I decided to import the modules individually to avoid unnecessary/unused code in the output bundle. You could of course import semantic.less and get all styles at once.

PS. I'm planning to drop Semantic UI in the next release. Afterwards I will likely replace LESS with elm-css. It might take a while though, as I'm currently very busy with other stuff.

hutch commented 8 years ago

I'll give that a try tomorrow.

Why do you want to drop Semantic UI? I don't know it more than what I've seen this afternoon, so I don't really have an opinion, but it seems okay so far.

gkubisa commented 8 years ago

Yes, Semantic UI is fine, however, I still want to drop it for a few reasons.

Styling

I would like to promote the solutions from the Elm ecosystem. Semantic UI and LESS are both fine, however, elm-css is simply a better fit for this project.

Scripting

First of all, I would like to promote a healthy Elm ecosystem, where as much code as possible is written in Elm, in order to take advantage of the Elm's features and the guarantees provided by the Elm compiler. The type of functionality provided by Semantic UI is generally very basic, so there's no reason why it shouldn't be implemented in Elm.

Secondly, I have no confidence in the current way in which this project integrates the JS code from Semantic UI (using MutationObservers). It works fine in the simple examples I have set up but it likely contains some edge cases which would lead to some weird behaviours. The approach suggested here seems much more reasonable to me but I would reserve it for embedding some more complex JS components, which cannot be easily ported to Elm.

gkubisa commented 7 years ago

Semantic UI is not part of elm-app-boilerplate as of https://github.com/gkubisa/elm-app-boilerplate/releases/tag/v0.4.0.