elm-ui icon indicating copy to clipboard operation
elm-ui copied to clipboard

Possible regression between 1.1.7 and 1.1.8

Open lucamug opened this issue 5 years ago • 3 comments

We found a possible regression between version 1.1.7 and version 1.1.8, in Chrome and Firefox (and maybe IE11/Edge). Safari is ok:

https://lucamug.github.io/test/button-elm-ui-1.1.7.html Screen Shot 2020-09-25 at 10 33 43

https://lucamug.github.io/test/button-elm-ui-1.1.8.html Screen Shot 2020-09-25 at 10 41 44

This is the source code, compiled with 1.1.8: https://ellie-app.com/b4S2NHcvy6Ha1

A regression is also happening in IE11 and we pin-pointed it to the commit 42d0dae, maybe related to the change from "flex-basis: auto" to "flex-basis: 0px".

We don't have example for IE11 but they seems related.

lucamug avatar Sep 25 '20 01:09 lucamug

This is a smaller example: https://ellie-app.com/b4VS3nd8ZRJa1

module Main exposing (main)

import Element exposing (..)
import Element.Background as Background
import Html

main : Html.Html msg
main =
    layout
        []
    <|
        column [ spacing 20 ]
            [ el
                [ Background.color <| rgb 1 0.5 1
                , padding 20
                , clip
                ]
              <|
                text "This is a test"
            ]

lucamug avatar Sep 25 '20 05:09 lucamug

Adding .s.c > .s {flex-basis: auto} seems reverting the regression.

Examples:

Without the fix:

https://ellie-app.com/b4VS3nd8ZRJa1

With the fix:

https://ellie-app.com/f2vxN4rG9sPa1

lucamug avatar Aug 16 '21 00:08 lucamug

@lucamug This "fix" actually introduces an regression as well.

Currently, height fill will be constrained to the actual window height, but with this "fix", the element will inherit the full height of all the children element and the height fill element will stretch past the window viewport and cause scrolling.

This is relevant when making an app-like experience where the layout and UI elements are constrained to the window height and width with a scrollable element within (like a chat app where you can scroll through the messages, but every other UI element is static).

peteygao avatar Nov 10 '23 23:11 peteygao