Status Update - 10 May 2018

1,036 views
Skip to first unread message

Evan Czaplicki

unread,
May 10, 2018, 6:01:38 AM5/10/18
to elm-dev
LIST ONLY - Please do not share on reddit, discourse, hacker news, twitter, etc.

I think Elm 0.19 is in good enough shape to start an alpha period. I have written all about it here!

Please keep discussions within the elm-dev mailing list or on the #elm-dev slack channel! Not other forums for now!

Evan

Yosuke Torii

unread,
May 26, 2018, 10:53:40 AM5/26/18
to elm-dev
Thanks for all your work Evan!

This is a problem I originally posted on Slack and Evan wanted clearer scenario. (Is this the right place to note it?)
I want a function equivalent to `Window.size : Task x Position` that exists in current `elm-lang/window` package and does not exist in 0.19 packages. I found `Browser onWindow "resizes"` can do the same as `Window.resizes` but it does not give the initial window size.

Two projects are currently using it.

1. jinjor/elm-contextmenu
The `Contextmenu` module need to know window width and height to calculate where to show the menu. It should not go outside of the window, so the left position is the smaller of (1) `clicked_position.x` (2) `window.width - menu.width`. As a library, I don't want to say `you must get window size in JS world and pass it via flags` in the document.

2. (company web site)
This site is responsive so content changes when the window size changes. `Window.size` is used in `init` function.

Both of them are possibly solved using CSS. But thinking about another solution just costs. (Both are in a maintenance mode.)

Is this enough information for you?


2018年5月10日木曜日 19時01分38秒 UTC+9 Evan Czaplicki:
Reply all
Reply to author
Forward
0 new messages