Skip to content

v0.1.1

Choose a tag to compare

@PlugFox PlugFox released this 04 Oct 00:42
· 11 commits to master since this release
b7200d2

What a screen reader is told and can do:

  • GlassSwitch and GlassSlider take a semanticLabel. A screen reader steps
    GlassSlider with increase and decrease, by semanticStep (a tenth by
    default), through onChangeStart, onChanged and onChangeEnd, and never
    past either end.
  • GlassButton takes a semanticLabel that is read in place of its child,
    for a button that is only an icon.
  • showGlassSheet takes a barrierLabel, as showGlassDialog already did.
    GlassMenuAnchor and GlassPopoverAnchor take one too. Their barrier used
    to be a tap target with no label, so a screen reader had no way to close a
    popover.

On a page:

  • showGlassSheet takes constraints, as showModalBottomSheet does. A
    maxWidth keeps the sheet at its content's width, centred, on a window
    wider than that. Null, it spans the window as before.
  • The labels of GlassButton, GlassSegmentedControl and GlassTabBar are
    not text to select. Under a SelectionArea, a drag across the page used to
    take them along with the prose around them.

Fixed:

  • Glass draws on CanvasKit, which is every Safari and every browser without
    WasmGC. CanvasKit keeps a fragment shader's uniforms by reference until the
    picture is rasterized, and the glass released its shaders straight after
    the draw. So it drew from freed memory: a shape in the wrong place, a solid
    grey or green slab, a different one each frame. On the web a shader now
    lives as long as the picture drawn with it.
  • Glass standing on glass no longer moves what is under the glass it stands
    on. When a level was captured, the walk painted the levels below it, and a
    CompositedTransformTarget among them wrote the walk's offset into its own
    live LeaderLayer. A SelectionArea creates one. So with a popover open
    over a bar, the bar's text jumped right and down, and it stayed there until
    the bar repainted. The walk now puts back every live offset it touches.
  • A GlassGroup drawn in tiles no longer loses members on the web. Skwasm's
    fragment shader keeps its uniforms by reference rather than copying them on
    each draw, so every tile drew the last tile's members, and blobs flickered
    in and out. On the web each tile now gets its own shader.
  • A platform view or a Texture is a hole in the capture of an upper level,
    as it already was in the base level. It used to be a grey stub. On the web
    every SelectionArea lays a transparent platform view under what it holds,
    so a bar over a selectable page showed grey.

Documented:

  • The README says what the glass costs on the web outside Chromium — Safari,
    Firefox and every browser on iOS, Chrome for iOS included, get CanvasKit,
    where each capture is a synchronous GPU readback — and what to do about it:
    allow Skwasm on WebKit, or declare a cheaper rung where CanvasKit remains.

https://pub.dev/packages/g1455/versions/0.1.1