Re: [elm-discuss] Re: State of CSS in Elm

2017-07-11 Thread Matthew Griffith
ototyping some new cases. > > A skim suggests that the only way to use laziness is to drop in and out of > HTML. Is that a correct read or did I miss something? > > Mark > > On Wed, Jul 5, 2017 at 10:38 AM, Matthew Griffith <mdg.gr...@gmail.com > > wrote: > &

[elm-discuss] Re: more than 1d?

2017-07-05 Thread Matthew Griffith
I'd recommend getting on the elm slack, there are a bunch of helpful people there! For multi-dimensional lists you can use `List.map` twice :) ``` data = [ [1,2,3], [4,5,6]] result = List.map (List.map ((+) 5)) data ``` On Wednesday, July 5, 2017 at 1:19:18 PM UTC-4, Raoul Duke wrote:

[elm-discuss] Re: State of CSS in Elm

2017-07-05 Thread Matthew Griffith
one off ID. So here I am putting styles in my markup "breaking the > rule". To some degree, your library is taking that to an absolutely extreme > w/ some incredible promises of reliable layout. I look forward to following > the progress and would love to help if there's an

[elm-discuss] Re: State of CSS in Elm

2017-07-05 Thread Matthew Griffith
aint based layout are a natural fit. What is your > opinion on this? > > Thanks and I will start using your library. > > Berry > > Op dinsdag 4 juli 2017 15:17:09 UTC+2 schreef Matthew Griffith: >> >> Excited to see what you come up with :) >> >> The ki

[elm-discuss] Re: State of CSS in Elm

2017-07-04 Thread Matthew Griffith
Excited to see what you come up with :) The killer feature for style-elements is the layout engine. Making layout really easy to use and having a much simpler vocabulary than css is a huge win in my book. The ultimate result of that is that your

[elm-discuss] Re: What about partial public exposition of private types?

2017-03-10 Thread Matthew Griffith
Yeah, that was something I realized recently, though changing it requires a major version bump. Should be changed in the next version though! (Along with a bunch of other goodies that will come along with it.) On Friday, March 10, 2017 at 1:02:41 PM UTC-5, Matthieu Pizenberg wrote: > > Did

[elm-discuss] Re: Dealing with invalid state transitions

2017-01-17 Thread Matthew Griffith
You could invert your cases. update msg state = case state of Loading -> case msg of (all your messages that apply when loading) Displaying stuff -> case msg of (all your messages that

[elm-discuss] Re: My Argument for "Why Elm" please review before I present to my company

2017-01-11 Thread Matthew Griffith
Nice! A few notes if you want them:) Tests are VASTLY easier to write in elm because we have a guarantee of same-arguments-same-result, which means each piece can be tested independently. And, like you said, you'll need fewer tests because of the type system. You can have higher confidence

[elm-discuss] Re: The Style Elements Library: a different approach to styling

2017-01-02 Thread Matthew Griffith
a manner of `rtfeldman/elm-css`'s `Mixin`s. > What is the dominant benefits of making another library rather than > providing set of `rtfeldman/elm-css` `Mixin`s? > > > On Thursday, October 27, 2016 at 10:20:14 PM UTC+9, Matthew Griffith wrote: >> >> >> It's ea

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-12-31 Thread Matthew Griffith
tps://stackoverflow.com/questions/826782/how-to-disable-text-selection- > highlighting-using-css > Any chance of this feature in Style-elements-lib? > > Thx > Lawrence > > Op maandag 31 oktober 2016 16:04:24 UTC+1 schreef Matthew Griffith: > >> Yeah, this library is mor

[elm-discuss] Re: How to Modularize Big Files?

2016-12-02 Thread Matthew Griffith
UTC-5, Rex van der Spuy wrote: > > > > On Friday, December 2, 2016 at 11:46:49 AM UTC-5, Matthew Griffith wrote >> >> >> First, (and this is kinda unrelated to organization) but I'd recommend >> using elm-format and having type signatures. >> > > ...

[elm-discuss] Re: How to Modularize Big Files?

2016-12-02 Thread Matthew Griffith
Hello! Here are a few things I'd think about. First, (and this is kinda unrelated to organization) but I'd recommend using elm-format and having type signatures. Some quick thoughts: You could break your styles into their own file, either using elm-css, or raw elm styles. You could break

[elm-discuss] Re: Advantages of the module - exposing syntax

2016-11-30 Thread Matthew Griffith
I find exposing functions/types at the top gives a nice summary of what is exposed when reading a new module. I can usually get a good idea of how the module works by seeing the names of the things that are exposed next to each other. That would be harder to do if the exposed annotation is

[elm-discuss] Re: ANN: style-elements v2 published

2016-11-29 Thread Matthew Griffith
Thanks everyone! Hey Max! I appreciate the feedback, I've updated the readme with your suggestions ++ some additional notes. And some additional descriptions for the elm-package documentation will be there later today :) You make a good point about renaming `Style.Model`, though I'm going to

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Matthew Griffith
; yeah, but to use polymer elements, native css mixins are required :( > > Il giorno lun 31 ott 2016 alle ore 14:51 Matthew Griffith < > mdg.gr...@gmail.com > ha scritto: > >> No, it won't render as a native css mixin, it just gives you the >> functionality of a mixin in

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-31 Thread Matthew Griffith
tainer-underline: { > display: none; > } > --paper-dropdown-menu-icon: { > color: white; > } > --paper-input-container-focus-color: white; > } > ``` > how to do the same using style-elements library? > > Il giorno ven 28

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-28 Thread Matthew Griffith
gt; from the performance point of view? Or I have to add Bool parameter to > element which contols color and text weight? What is the best practice? > 2. What about Keyed and Lazy elements? Is it ok to use them with this lib? > > Il giorno ven 28 ott 2016 alle ore 14:58 Matthew Gri

Re: [elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-28 Thread Matthew Griffith
om > > ha scritto: > >> Is it possible to blend it together with Richard Feldman's work elm-css >> where all properties are type checked? >> >> Il giorno gio 27 ott 2016 alle ore 23:54 Matthew Griffith < >> mdg.gr...@gmail.com > ha scritto: >> >>>

[elm-discuss] Re: The Style Elements Library: a different approach to styling

2016-10-27 Thread Matthew Griffith
Thanks! Feedback would be fantastic. Yes, the compiler should help quite a bit here, however styling is tough because it has quite a few "gotchas", so its hard to know 100%. Also, this library is mostly concerned with a small set of css properties(~15-20) that cause the most trouble.

[elm-discuss] The Style Elements Library: a different approach to styling

2016-10-27 Thread Matthew Griffith
It's easy to write valid CSS that is still broken and frustrating. What if we could make frustrating CSS styles not expressible? I've been working on an experimental style library for making styles that are harder to break and easier to use. There is also support for flow/flexbox style

[elm-discuss] Re: Getting functions out of the model

2016-10-13 Thread Matthew Griffith
So it's not necessarily not having interruptible animations, it's more all the code that you'll need to manage them. In elm-style-animation you can just start a new animation and interruptions are handled automatically. When you have description and state split, you have to juggle switching

[elm-discuss] Re: Getting functions out of the model

2016-10-13 Thread Matthew Griffith
That's interesting as well. Though I think you'd run into challenges when trying to handle interruptible animations. Specifically you'd have to do all the interruptions manually. This would be even more challenging in the context of interruptions that have a delay before they're supposed to

[elm-discuss] Re: using js library inside elm?

2016-10-13 Thread Matthew Griffith
You still have to use ports. Check out the SpellCheck part of this https://guide.elm-lang.org/interop/javascript.html On Thursday, October 13, 2016 at 5:00:47 AM UTC-4, António Ramos wrote: > > hello i know that i have to use ports to pass data from elm to javascript > but if i want to call an

[elm-discuss] Re: Getting functions out of the model

2016-10-13 Thread Matthew Griffith
That's an interesting approach, though I'm not sure it would work for elm-style-animation, at least in its current form. In elm-style-animation you compose an animation under one Msg, and send animation updates(basically tick the animation forward) via a separate Msg. The `apply` and

[elm-discuss] Re: Simple Fade In/Out effect?

2016-10-04 Thread Matthew Griffith
gist.github.com/kittykatattack/f05b42efc6ecf09ddf244bbafd18edb3 > > > On Monday, October 3, 2016 at 5:24:43 PM UTC-4, Matthew Griffith wrote: >> >> In your `Animate animMsg` area, you're not returning the cmds, which is >> how the msg is fired :). >> >> Change your code to th

[elm-discuss] Re: Simple Fade In/Out effect?

2016-10-03 Thread Matthew Griffith
In your `Animate animMsg` area, you're not returning the cmds, which is how the msg is fired :). Change your code to this: Animate animMsg -> let (newStyle, cmds) = Animation.Messenger.update animMsg model.storyTextStyle in ( { model

[elm-discuss] Re: Simple Fade In/Out effect?

2016-09-30 Thread Matthew Griffith
That's a pretty reasonable way to do it. Another option could be could be to use one div and use `Animation.send`. Basically you could do something like this. ``` Animation.interrupt [ Animation.to [Animation.opacity 0] , Animation.send

[elm-discuss] Re: Moving Color to evancz/graphics

2016-09-29 Thread Matthew Griffith
elm-style-animation accepts the Color types from core as arguments for color property animations. So does my color mixing library (though who knows how many people use that :) I'm working on another library that utilizes it as well. Having a centralized idea of color seems like a pretty

Re: [elm-discuss] ANN: elm-style-animation v3.0.0

2016-09-21 Thread Matthew Griffith
Awesome! So, `Animation.speed` was made to handle the specific case of getting a reasonable default for rotating things. It's not really intended to be used widely...but Im still open to hearing use cases :) First, heres why `Animation.speed` is present in the library at all and why its

[elm-discuss] ANN: elm-style-animation v3.0.0

2016-09-19 Thread Matthew Griffith
v3.0.0 of the elm-style-animation library has been released! https://github.com/mdgriffith/elm-style-animation This version was a major rethink and rewrite of the API. Things are now list based instead of pipe based which simplifies animation creation quite a bit. Beyond the new api, here

[elm-discuss] Re: Elm Package Skimmer

2016-08-28 Thread Matthew Griffith
Thanks! Good catch. It should be updated now :) (it was only looking at the github summary but not the elm-package description) On Sunday, August 28, 2016 at 1:32:35 PM UTC-4, Max Goldstein wrote: > > Wow, this is amazing! > > Quick bug report: elm-check says that it's deprecated but isn't

[elm-discuss] Re: Server Side Rendering with Node

2016-08-28 Thread Matthew Griffith
Hi Robert, Check out: https://github.com/eeue56/elm-static-site Also, it looks like server side rendering is on the docket for the next major revision of elm, 0.18 - https://groups.google.com/forum/#!topic/elm-dev/u66_K3AbqIM On Sunday, August 28, 2016 at 1:09:46 PM UTC-4, Robert S wrote:

Re: [elm-discuss] Re: Impressions from a new user

2016-06-23 Thread Matthew Griffith
Hi Matthieu, Welcome to elm! I too have a background in Python and here are some things I've learned as I've written projects in elm. You're right it is more verbose in a lot of cases. What you get in a lot of cases is that it's very clear what's going on while in python there can be a

[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