TACC / tup-ui

React client for TACC User Portal
2 stars 0 forks source link

fix: tup-571 mfa ui not responsive #315

Closed wesleyboar closed 1 year ago

wesleyboar commented 1 year ago

Overview

Repair MFA responsive layout CSS so that narrow-screen layout is used.

Related

Changes

Testing

  1. Open MFA pairing (or unpairing) view.
  2. Make message appear (e.g. click button to generate QR code).
  3. On wide screen (992px or wider), layout should be "good".
    (click for details)
    1. Verify panels are **horizontal**. 1. Verify message is **outside** first panel. 1. Verify message is **centered** (line between panels is at center of message). 1. Verify message can **not** exceed width of container. To do so, live-edit message text to be long enough to wrap. 1. Verify **all** content can be seen when scrolling _vertically_. To do so, make window so short that scrollbar appears.
  4. On narrow screen (991px or narrower), layout should be "good".
    (click for details)
    1. Verify panels are **vertical**. 1. Verify message is **within** first panel. 1. Verify message is **left-aligned**. 1. Verify message can **not** exceed width of container. To do so, live-edit message text to be long enough to wrap. 1. Verify **all** content can be seen when scrolling _vertically_. To do so, make window so short that scrollbar appears.

If you notice the horizontal scrollbar, then know that it is fixed in #315.

UI

Wide

normal long message* vertical scroll
wide - normal wide - long message wide - vert  scroll

Narrow

normal* long message* vertical scroll*
normal - normal narrow - long message narrow - vert  scroll
* About the <TextFieldCopy> stretch… _The `` will try to stretch to fill available space._ To avoid (subjectively) worst case scenario, wide-screen sets `width: max-content` on `.mfa-message` to prevent that, assuming normal-length message text, but with caveats: 1. A long message text stretches the message, thus giving `` opportunity to stretch on wide screen. 2. `` is allowed to stretch on a narrow screen, because were a narrow screen to use `width: max-content` on `.mfa-message`, long message text would stretch to fill entire width of screen (which just looked weird to me). If this solution looks weird to anyone else, tell me and we can let designers decide what they want, which might change the challenge for the better. _Another solution may be to change `` to **not** stretch. (That change can be performed independent of this PR.)_
wesleyboar commented 1 year ago

Moot, because #312 is merged.