Skip to content

0.42.0

Choose a tag to compare

@timmo001 timmo001 released this 14 Nov 22:39
55777d8

Touch targets: every control reaches --gw-target-min on a touch screen, and no two hit areas overlap, table headings and fields included.

Breaking

  • On a touch screen, gw-table's headings are 44px tall rather than 40px, and a sortable column's heading at least 44px wide. --gw-table-header-height still sets the height.
  • On a touch screen, gw-row's gap is at least 12px (--gw-target-min less 2rem), so two 32px buttons' hit areas meet without overlapping. --gw-row-target-gap: 0px turns it off; with a mouse nothing changes.
  • On a touch screen, every gw-segmented option is at least 44px across, not only with overflow.
  • On a touch screen, gw-calendar's days (and gw-date-picker's) are 44px rather than 40px, still shrinking so seven fit across a phone.
  • On a touch screen, gw-checkbox and gw-switch are at least 44px tall, so ones stacked in a list don't overlap each other's hit areas.

Added

  • --gw-row-target-gap on gw-row: the least gap on a touch screen.

Fixed

  • gw-table's sort buttons were their text's height, about 17px, with nothing past their edges. The whole heading cell is now the button's hit area, so it reaches the target without reaching into the heading beside it or the first row.
  • Fields had no hit area past their edges, so the table's search field and other short fields were under 44px on a touch screen. gw-input, gw-select and gw-date-picker now take a press just above or below them, keeping their look, and a press there focuses the input. The password reveal button and the (i) button get hit areas too, the (i) one never reaching over the field.
  • gw-option-list's search row (in a searchable select) focuses its field from anywhere in the row.
  • gw-app-bar's menu button and gw-section's collapse toggle had no hit area past their edges.
  • gw-code's toolbar buttons overlapped each other's hit areas, and gw-banner cut its buttons' hit areas off; both make room on a touch screen now.
  • gw-control-group's sections reached into their neighbors; each is now at least --gw-target-min wide.

Docs

  • Spacing: Touch targets lists what grows on a touch screen (fields, toggle options, calendar days, control group sections, table headings and row gaps) and how to turn each off.
  • The groundwork-interfaces skill's touch target item says how a tight toolbar keeps hit areas apart: max(gap, --gw-target-min less the controls' height).