upsiflu / less-ui

Write your views across several screen regions, and hide all Ui state in the Url.
https://package.elm-lang.org/packages/upsiflu/less-ui/latest
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

Re-considering `Header` #49

Open upsiflu opened 11 months ago

upsiflu commented 11 months ago

Adressing a recurring pain point in the current Api

As it stands (v1.0.0),

Original motivation for this design:

  1. It enforces (or at least, reflects) the convention of web and app design to place essential top-level affordances and controls (Logo, top-level nav, "global" menu, avatar) in a header bar.
  2. The original reason was simply that if you don't put your Ui inRegion at all, you end up with regionless Ui in layout.arrange. So I replaced Maybe region with the equivalent but more expressive OrHeader region.

Shortcomings/Friction:

Alternatives solutions

  1. An elm-review rule could definitely enforce this invariant, to any degree desirable (i.e. restrictions on the use of atRegion Header!