fix(ui): mobile pop-out for the advice, and tables that fit a phone

The brewing advice is several hundred characters.  In a table cell it
pushed the table past the width of a phone, so the column was clipped
off the right edge and the advice could not be read without sideways
scrolling.

The advice is now a compact trigger in the cell and the text is in a
floating panel that opens on hover (desktop) or on tap (phone).

The panel is position:fixed and anchored by the script.  Absolutely
positioned inside the cell it was clipped by the table's own scroll
container, and the advice was sliced in half by the card's edge.  It
flips above the trigger when there is no room below.

The tables now reflow into stacked cards on a narrow screen, with each
value labelled by its column name.  A seven column table does not fit a
phone, and it used to scroll sideways inside its wrapper, so the
columns on the right were off the screen.

Also: the header wraps onto two rows so the nav tabs are not clipped,
the point scale says 'points' rather than 'pts', and the reading count
on the beer card does not orphan its word.
This commit is contained in:
2026-11-09 20:56:56 +10:00
parent 8de3d011db
commit 59d751d9dd
5 changed files with 460 additions and 22 deletions
+3 -1
View File
@@ -1008,7 +1008,9 @@ def test_a_failed_advice_is_marked_as_such(client, repo):
response = client.get("/brews")
body = response.get_data(as_text=True)
assert "advice--failed" in body
# A failed generation is marked differently from real advice.
assert "advice-trigger--failed" in body
assert "Advice failed" in body
def test_advice_is_not_generated_in_tests(client, repo):