[elm-discuss] [ANN] Elm Style Animation v 1.0.0 - Now with SVG animations

2016-05-17 Thread Matthew Griffith
Hi All, I just released a fairly large update I've been working on. https://github.com/mdgriffith/elm-style-animation First off, elm-html-animation has been renamed* elm-style-animation* because it now covers SVG animations as well as html styles. This is for elm 0.17. If you use this

[elm-discuss] 0.17 alternative to Task.sleep

2016-05-17 Thread Richard Osafo
Hi, What is the equivalence of Task.sleep in Elm 0.17? regards, Richard. -- You received this message because you are subscribed to the Google Groups "Elm Discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to

Re: [elm-discuss] How to map multi-level nesting components in 0.17

2016-05-17 Thread Nick H
Right now, I am guessing your Tab.view has this signature: Tab.view : Tab.Model -> List (Html Tab.Msg) -> Html Tab.Msg Try changing it to follow this signature: Tab.view : (Tab.Msg -> a) -> Tab.Model -> List (Html a) -> Html a And your Main.view will then look like this: view model =

Re: [elm-discuss] Howto filter on Sub

2016-05-17 Thread Janis Voigtländer
You are aware that the functions from Html.Lazy use reference equality? So two models are only considered equal if they are the same JS object (at the the same pointer address). The zipper data structures I know don’t give that degree of equality after moving down and up again. ​ 2016-05-17 15:43

Re: [elm-discuss] Howto filter on Sub

2016-05-17 Thread Steve Schafer
No, I have a couple of ports that handle things like monitoring text selection in input fields, but that's about it. I think what's happening is that the differ is getting confused because of my use of a zipper data structure; when I traverse down the structure and then back up, it *should *be

Re: [elm-discuss] Re: Is Elm for us? Non-developers building small applets

2016-05-17 Thread Salomon Turgman Cohen
Thank you all for the comments. John, Can you point out what are the currently existing charting/graphing features in elm? I am going to implement a simple simulation without any graphics (just displaying numbers and controls perhaps) first. It seems that when I need to start with graphics

Re: [elm-discuss] How to render at a lower fps in 0.17?

2016-05-17 Thread Peter Damoc
Oh well, you can always use an accumulator like `timeSinceLastFrame` and check it against some timePerFrame that you want. If the time is greater than timePerFrame, reset to (timeSinceLastFrame-timePerFrame) and update the module state. If not, just add the delta to timeSinceLastFrame. You won't

[elm-discuss] Re: How to implement wrapping components in elm

2016-05-17 Thread Wil C
Daniel, I think normally, you don't. I think the constraint here is that you need to explicitly set the types of each of the sub-components for every component that you make for a page. In the example that you give, you'd actually need to create 4 types of components: TopLevel, Counter,

[elm-discuss] How to implement wrapping components in elm

2016-05-17 Thread Daniel Kwiecinski
Hi Elmers, Here is my scenario. Say I have Main.elm which defines main view form my application. I also have bunch of other components (with their corresponding model and message types) say Counter and Gif. (https://github.com/evancz/elm-architecture-tutorial/blob/master/nesting/Gif.elm)

[elm-discuss] Problem with Subscriptions in 0.17

2016-05-17 Thread Zachary Kessin
The final part of moving my code base over to 0.17... I have a port/subscription which is used to authenticate from an OAuth btn and it is getting the wrong type. In main i have this *subscriptions = Instagram.subscriptions* and in the Instagram module I have this code *port instagramAuth :

[elm-discuss] Json decoding an event target

2016-05-17 Thread Simon
I'm trying to get the text of the selected `option` in a `select` dom element. temp1 is the event object from a change in the select and you can see what values it exhibits in devtools

[elm-discuss] How to map multi-level nesting components in 0.17

2016-05-17 Thread Luis Fei
Hi, I was trying to upgrade from 0.16 to 0.17, and meet this problem I have a Main.view which contains a Tab.view, and Tab.view contains a LogList.view, so i change the Signal.forwardTo part like this: -- This is Main module type alias Model = { tabModel : Tab.Model , logsModel :

[elm-discuss] Mouse-Behaviour with Element and Collage

2016-05-17 Thread MJ
Hi, i'm working on a simple 2D Level-Editor. Is there a way to disable unwanted mouse-Behaviour, like highlighting with double-click (canvas turns blue), or dragging forms, when using a Collage-Element? -- You received this message because you are subscribed to the Google Groups "Elm

[elm-discuss] Re: Would appreciate some code review and comments on extracting a component

2016-05-17 Thread Joaquín Oltra
I've changed my previous attempt so that instead of App knowing about and acting on the Msg types from the child SearchForm component, now I'm making the SearchForm return an event as suggested in the docs (making the update function return extra info for parent). I'm liking it better than the

Re: [elm-discuss] Decode fails on empty string

2016-05-17 Thread Janis Voigtländer
Add this as a comment on the GitHub issue, then? ​ 2016-05-17 10:54 GMT+02:00 Fedor Nezhivoi : > Empty string isn't valid JSON. Try open Chrome DevTools and write > JSON.parse(""). > > 2016-05-17 14:51 GMT+06:00 Janis Voigtländer >: > >> See

Re: [elm-discuss] Decode fails on empty string

2016-05-17 Thread Fedor Nezhivoi
Empty string isn't valid JSON. Try open Chrome DevTools and write JSON.parse(""). 2016-05-17 14:51 GMT+06:00 Janis Voigtländer : > See https://github.com/elm-lang/core/issues/585. Considered a bug. > ​ > > 2016-05-17 10:45 GMT+02:00 Richard Osafo

Re: [elm-discuss] Decode fails on empty string

2016-05-17 Thread Janis Voigtländer
See https://github.com/elm-lang/core/issues/585. Considered a bug. ​ 2016-05-17 10:45 GMT+02:00 Richard Osafo : > Hi, > I was decoding an http response (body can be blank) and realized that > Decode fails on empty string. Gives the error "Given an invalid JSON: > Syntax

Re: [elm-discuss] How to render at a lower fps in 0.17?

2016-05-17 Thread Max Goldstein
You can use Time.every to get deltas if you store the old one in the model. The best use, other than the actual time, is things you want to happen periodically but the exact millisecond doesn't matter. If you're doing animation, I'll echo Peter: what's wrong with animating on the browser's