reflex-frp / reflex-dom-semui

A reflex-dom API for Semantic UI components
https://reflex-frp.org/
BSD 3-Clause "New" or "Revised" License
22 stars 10 forks source link

Add the beginnings of example code as a test-suite #4

Closed spl closed 7 years ago

spl commented 7 years ago

WARNING: This PR currently builds on #3 due to a conflict in reflex-dom-semui.cabal. Whether or not you merge #3, I'm happy to rebase to fix this.

I implemented a test-suite to demonstrate examples of the widgets in use and in presentation. I imagine that this code will grow along with the widgets as they are defined. It can serve as a test to check that type signatures are unchanged and that the output still renders and behaves the same. It can also serve as the go-to source for showing others how to use the widgets.

I added straightforward instances for Dynamic with some of the type classes used in the example code. I'm not sure if that's how you envisioned those classes working, but it made sense to me.

Currently, it's a little bit of work to get the example loaded in the browser. I build the test executable JavaScript, copy lib/* and example/index.html to the output directory, and load the index.html in the browser. I'm sure there is a better way to do this.

mightybyte commented 7 years ago

Thanks. I had been wanting to start a test suite, so this is perfect. :) I merged #3, so can you fix the conflicts here?

spl commented 7 years ago

Can we leave this out since I listed semantic.min.js in js-sources?

Yep!

I wasn't sure whether jquery.min.js was actually required or not.

It is, as I found out earlier. The strange thing that I've now discovered is the ordering on the js-sources is backwards from what I'd expect.

can you fix the conflicts here?

Done.