workspace
stringclasses
4 values
channel
stringclasses
4 values
text
stringlengths
1
3.93k
ts
stringlengths
26
26
user
stringlengths
2
11
elmlang
general
It just built! Thanks for your help :slightly_smiling_face:
2019-02-12T10:32:32.175900
Garnett
elmlang
general
I could do something like `#/articles?category=tech`
2019-02-12T10:35:58.176100
Sadie
elmlang
general
And use the queryparser on top of the fragment
2019-02-12T10:36:15.176400
Sadie
elmlang
general
I'll try a quick ellie when I get home
2019-02-12T11:29:56.177100
Bert
elmlang
general
hey everybody, im tr ying to construct an autorasizable textarea like here.: <https://jsfiddle.net/0wnoe5rd/>
2019-02-12T12:17:56.177800
Yang
elmlang
general
<https://jsfiddle.net/0wnoe5rd/1/>
2019-02-12T12:18:56.178100
Yang
elmlang
general
last link is better.
2019-02-12T12:19:04.178500
Yang
elmlang
general
So what im doing .. is that for each onInput event - i grab the scrollHeight with a decoder like tis one:
2019-02-12T12:19:34.179200
Yang
elmlang
general
``` onInput : (ScrollHeight -&gt; String -&gt; Msg) -&gt; Html.Attribute Msg onInput tagger = HtmlEvents.stopPropagationOn "input" (JD.map2 (\scrollHeight value -&gt; ( tagger (ScrollHeight scrollHeight) value, True )) (<http://JD.at|JD.at> [ "target", "scrollHeight" ] <http://JD.int|JD.int>) (<http://JD.at|JD.at> [ "target", "value" ] JD.string) ) ```
2019-02-12T12:19:55.179500
Yang
elmlang
general
but for each onInput key pressed.. the scrollHeight increases by 2
2019-02-12T12:20:27.180000
Yang
elmlang
general
and i endup with this effect:
2019-02-12T12:20:34.180200
Yang
elmlang
general
at some point will you set a max size and then go to scrollbars/
2019-02-12T12:23:23.180600
Lupita
elmlang
general
scrollHeight keeps growing by 2
2019-02-12T12:27:54.180700
Yang
elmlang
general
im not sure i understand.
2019-02-12T12:28:52.181800
Yang
elmlang
general
<@Lupita> i set max height .. then i set height?
2019-02-12T12:29:32.182600
Yang
elmlang
general
i dont want scroll bars.
2019-02-12T12:30:15.183100
Yang
elmlang
general
<@Yang> can you put it in Ellie?
2019-02-12T12:32:10.183400
Florencia
elmlang
general
gonna try. last time i did it crashed my computer since i dont have enough ram.
2019-02-12T12:32:43.183900
Yang
elmlang
general
or gist or anywhere, really
2019-02-12T12:33:33.184100
Florencia
elmlang
general
I tried to whip this up in Elm but seem to not be able to read `scrollHeight` property
2019-02-12T12:33:52.184700
Florencia
elmlang
general
maybe it's Ellie+iframe thing, dunno
2019-02-12T12:34:09.184900
Florencia
elmlang
general
hmm :thinking_face:
2019-02-12T12:34:39.185300
Yang
elmlang
general
i understand you don't want scrollbars but at some point you run out of screen, right? would love to see this in elm
2019-02-12T12:34:59.185700
Lupita
elmlang
general
paddings can cause this effect
2019-02-12T12:35:22.186000
Bonnie
elmlang
general
I tried to do this kind of thing in elm, but it was not a very good experience. Well, if the only requirement is to grow then fine, but you might also want to shink it when you remove code, then you're in trouble
2019-02-12T12:38:30.187600
Bonnie
elmlang
general
ah I think I know where my error is. I was trying to read the scrollHeight thing from the `input` event itself, but in the jQuery example you're reading it from the element
2019-02-12T12:39:39.188400
Florencia
elmlang
general
dang JS :smile:
2019-02-12T12:39:45.188700
Florencia
elmlang
general
hmm
2019-02-12T12:43:21.189100
Lupita
elmlang
general
<https://ellie-app.com/4J7ysW9qD7ya1>
2019-02-12T12:44:01.189300
Yang
elmlang
general
the ellie app indeed has the same effect
2019-02-12T12:44:48.189700
Yang
elmlang
general
im using elm-ui
2019-02-12T12:44:56.190000
Yang
elmlang
general
and Keyed.el
2019-02-12T12:45:02.190400
Yang
elmlang
general
which complicates the issue
2019-02-12T12:45:09.190700
Yang
elmlang
general
but in ellie is simple
2019-02-12T12:45:13.190900
Yang
elmlang
general
i used : `, HtmlAttributes.style "height" "150px"` instead of min-height .. same.
2019-02-12T12:46:05.191200
Yang
elmlang
general
oh, that is getting json from somewhere
2019-02-12T12:46:33.191600
Lupita
elmlang
general
my box is getting bigger with every letter i type
2019-02-12T12:47:24.192000
Lupita
elmlang
general
my try has a similar problem: it's expanding just fine, but shrinking very slowly <https://ellie-app.com/4J7CLfvQ6yDa1>
2019-02-12T12:48:42.193100
Florencia
elmlang
general
yes. so i used the `outerHeight` property like in here: <https://jsfiddle.net/0wnoe5rd/2/> - this is js. this is supposedly the exact same code in elm: <https://ellie-app.com/4J7F823Chsqa1> They dont do the same thing at all.
2019-02-12T12:48:43.193200
Yang
elmlang
general
looks like is growing by 12 px you are adding in teh view
2019-02-12T12:48:43.193300
Pauletta
elmlang
general
BTW `elm-ui` has this built in I think, it worked nicely when I tried
2019-02-12T12:51:12.194100
Pauletta
elmlang
general
<@Pauletta> thanks. im gonna check it out. <@Florencia> thanks, looking at it now.
2019-02-12T12:52:33.195200
Yang
elmlang
general
<https://package.elm-lang.org/packages/mdgriffith/elm-ui/1.1.0/Element-Input#multiline>
2019-02-12T12:57:24.196300
Pauletta
elmlang
general
<@Pauletta> not rely. I removed the 12 px and still has the same growing behaviour. Is rely wired actually. im gona use <@Florencia> solution. Elm-ui has this problem that it doesnt grow.. it brings a vertical scroll bar. Gonna look it up one more time before i switch.
2019-02-12T12:59:35.197500
Yang
elmlang
general
Well, Ellie doesn't want to load for me. But I would make a subscription to `onAnimationFrame` (or delta) and sort of manually interpolate: `interpolateNumber { oldValue = 1234, newValue = 651 } (millisPassed / animationTotalMillis)` <https://package.elm-lang.org/packages/elm/browser/latest/Browser-Events#onAnimationFrame>
2019-02-12T13:03:59.197600
Bert
elmlang
general
The interpolation function could be using one of these: <https://github.com/elm-community/easing-functions>
2019-02-12T13:07:46.197800
Bert
elmlang
general
Try setting 'Element.height Element.shrink' in your multiline
2019-02-12T13:11:05.199100
Pauletta
elmlang
general
Then it should grow. Just checked our prod app
2019-02-12T13:11:59.200300
Pauletta
elmlang
general
oh ok.. so you mean this shrink should be set on the multipline element?
2019-02-12T13:14:33.200800
Yang
elmlang
general
or on its parent?
2019-02-12T13:14:41.201000
Yang
elmlang
general
and thanks :smile: :hugging_face:
2019-02-12T13:15:03.201300
Yang
elmlang
general
<@Pauletta> thats interesting, does the elm-ui multiline grow and shrink? We tried getting this to work a while ago but at that point it required some cumbersome ports
2019-02-12T13:25:49.203300
Daria
elmlang
general
aaaa one thing i forgot to mention. very important. Yes indeed it works like expected if you type enter. But i just tested it and if you keep pressing aaaaaaa.. then it doesnt work.
2019-02-12T13:26:36.204300
Yang
elmlang
general
None
2019-02-12T13:28:10.206500
Yang
elmlang
general
on my setup i mean
2019-02-12T13:28:12.206900
Yang
elmlang
general
here im pressing aaa and it supposed to grow like my js example does.
2019-02-12T13:28:32.207900
Yang
elmlang
general
i also figured out it grows by 4px
2019-02-12T13:28:51.208600
Yang
elmlang
general
Ok I should check that then :smile:. <@Daria> yes it shrinks. If I remember looking at the code it was counting the lines and multiplying for the line size, which may explain the problem <@Yang> was explaining. I guess there is not an easy solution :persevere:
2019-02-12T13:29:19.209600
Pauletta
elmlang
general
on the previous setup i had. not sure why 4px.
2019-02-12T13:29:23.209700
Yang
elmlang
general
None
2019-02-12T13:33:40.209800
Yang
elmlang
general
is it good practice (does it even work?) to publish a package that lives under `me/elm-pkg-name` on github, however would be named as `me/pkg-name` (added to the name field in the elm.json) to me on my github account the `elm-` namespacing makes sense, but on the actual 'elm' package list not really.. ?
2019-02-12T13:58:40.212100
Earnestine
elmlang
general
Could always try and see what elm has to say about it when you go to publish.
2019-02-12T14:02:35.212500
Danika
elmlang
general
I think sometimes the `elm-` makes sense, like `elm-css` says to me that this is an elm way of doing css, or `elm-markup`
2019-02-12T14:03:15.213100
Danika
elmlang
general
`elm-hex` or `elm-round` makes not as much sense, but imo the elm- prefix is fine for everything
2019-02-12T14:04:22.213700
Danika
elmlang
general
<@Yang> it is the `box-sizing` that is missing, check out <https://ellie-app.com/4J9b7kvBgKda1>
2019-02-12T14:31:38.214100
Alicia
elmlang
general
<@Alicia> omg thanks a lot :slightly_smiling_face: :beer::beer::beer:.. freaking grazy .. i was spending hours on this .. auch. completly forgot about box-sizing... hmm..
2019-02-12T14:36:24.215600
Yang
elmlang
general
@Micha i consider `elm-` as beeing the official version of something. Since there are many packages doing the same thing.
2019-02-12T14:43:40.216700
Yang
elmlang
general
No, that won't work, they have to match at the moment :slightly_smiling_face:
2019-02-12T14:59:08.216900
Huong
elmlang
general
what I've done previously to make expanding textareas is to put the textarea as `position: absolute` inside an element with the same padding, font-size etc. and have that element display the same text as the textarea :slightly_smiling_face:
2019-02-13T03:23:23.219700
Nana
elmlang
general
Yeah this is the way to do it
2019-02-13T04:10:33.220100
Danika
elmlang
general
You have to look at the namespace. `elm/something` is official, but calling it `elm-something` isn't. Lots of unofficial packages start with `elm-`, and I don't think any of the official ones do.
2019-02-13T04:40:33.221300
Rochell
elmlang
general
I guess `elm-explorations/something` is official too, right?
2019-02-13T04:42:58.221700
Rochell
elmlang
general
Just more experimental and less likely to be in its final form.
2019-02-13T04:43:33.222700
Rochell
elmlang
general
Those are “blessed” packages made by the community that require native code and are at least considered to become part of Elm some day.
2019-02-13T04:43:37.222900
Timika
elmlang
general
Ah, okay. So semi-official, I guess hehe
2019-02-13T04:43:51.223300
Rochell
elmlang
general
Hey folks, about to start a new project, been using 0.18 so far, does 0.19 have good enough support to use now? I remember trying to use it once and many libraries wouldn’t work.
2019-02-13T13:15:11.225300
Valorie
elmlang
general
shouldn’t be a problem now
2019-02-13T13:16:06.225500
Iona
elmlang
general
I’m gonna try setting it up tonight see how it goes! Thanks!
2019-02-13T13:16:43.226000
Valorie
elmlang
general
As long as you don’t need websockets :joy:
2019-02-13T14:15:27.226700
Agustin
elmlang
general
Wasn't there `Fuzz.lazy`? Can't find it. Need it (or something similar) for my recursive data structure fuzzer
2019-02-13T14:28:25.227400
Florencia
elmlang
general
eg. ``` exprFuzzer : Fuzzer Expr exprFuzzer = let lazyExprFuzzer = ??? in Fuzz.oneOf [ Fuzz.map Int_ <http://Fuzz.int|Fuzz.int> , Fuzz.map Negate lazyExprFuzzer , Fuzz.map2 Plus lazyExprFuzzer lazyExprFuzzer , Fuzz.map List_ (Fuzz.list lazyExprFuzzer) ] ```
2019-02-13T14:29:35.227600
Florencia
elmlang
general
as `Fuzz.andThen` is no longer with us, I don't know how to proceed ``` lazyExprFuzzer : Fuzzer Expr lazyExprFuzzer = Fuzz.succeed () |&gt; Fuzz.andThen (always exprFuzzer) -- :( ```
2019-02-13T14:31:07.228100
Florencia
elmlang
general
Why?
2019-02-13T14:34:12.228200
Valorie
elmlang
general
the websocket library from 0.18 has not been updated for 0.19
2019-02-13T14:34:37.228500
Alleen
elmlang
general
ports are still an option (I'm using them in my Elm SaaS just fine)
2019-02-13T14:36:45.229100
Florencia
elmlang
general
Yes me too, but its probably the most common complaint
2019-02-13T14:37:19.229500
Agustin
elmlang
general
I'll probably have to try `Fuzz.custom`.
2019-02-13T14:38:55.229700
Florencia
elmlang
general
I see
2019-02-13T14:38:59.230000
Valorie
elmlang
general
I really like using the pipe operator in my update function A LOT, so I often find myself having functions of the type ``` Model -&gt; Model ``` But I am beginning to realize that having Model as the output type restricts me a lot occasionally. So now I am considering to have "normal" functions and some called ```pipeSomethingSomething : Model -&gt; Model``` for the update function. Any better suggestions? Is there a way to swap around arguments?
2019-02-13T14:52:33.236200
Renda
elmlang
general
you can have functions working on a subtype - no problem! I'd just create an additional function that wraps it into the `Model -&gt; Model` structure. That way you have both
2019-02-13T14:54:42.237300
Florencia
elmlang
general
of course, depends on the situation and sometimes it might not be the best idea ... :shrug: viewer discretion advised
2019-02-13T14:55:06.237900
Florencia
elmlang
general
You can restrict the fields a function has access to: `modifyLocation : SomeOtherArg -&gt; { a | currentLocation : Location } -&gt; { a | currentLocation : Location }`
2019-02-13T14:55:37.238400
Earnest
elmlang
general
On a subtype? Do you mean ```let something = model.something in ... ```
2019-02-13T14:55:43.238700
Renda
elmlang
general
:open_mouth: never seen that before !
2019-02-13T14:56:21.239300
Renda
elmlang
general
subtype - eg. a field of the model
2019-02-13T14:56:22.239500
Florencia
elmlang
general
where `type alias Model = { currentLocation : Location, ...other fields... }`
2019-02-13T14:56:24.239600
Earnest
elmlang
general
I think I just found the next thing to read about hehe
2019-02-13T14:56:43.240100
Renda
elmlang
general
Im a little worried Ill go wild and my entire codebase is gonna read Model -&gt; Model :joy:
2019-02-13T14:57:04.240700
Renda
elmlang
general
the `update` function will probably read smooth like butter though :thinking_face:
2019-02-13T14:57:32.241300
Florencia
elmlang
general
what I'm trying to say: maybe that's a good thing :smile:
2019-02-13T14:57:47.241700
Florencia