Give the public map the window

ec561a7 · Gabriel Morell · 2026-09-01 15:35

11 files +14 -1
Message
{commit_body(@commit)}

Files changed

modified apps/room_sanctum/lib/room_sanctum_web/live/cfg_pythiae_live/public_map.ex
+5 −1
@@ -21,6 +21,10 @@ defmodule RoomSanctumWeb.PythiaeLive.PublicMap do
21 21 def mount(_params, _session, socket) do
22 22 if connected?(socket), do: Process.send_after(self(), :update, 500)
23 23
24 + # No :live layout. Every other page in this app is wrapped in
25 + # `<main class="container mx-auto">`, and Tailwind's `container` is a
26 + # max-width -- which boxed the map into a centred column with the window
27 + # showing either side of it. A page that is only a map wants the window.
24 28 {:ok,
25 29 socket
26 30 |> assign(:queries, [])
@@ -31,7 +35,7 @@ defmodule RoomSanctumWeb.PythiaeLive.PublicMap do
31 35 |> assign(:vehicle_positions, [])
32 36 |> assign(:queried_station_ids, [])
33 37 |> assign(:query_summaries, %{})
34 − |> assign(:curr_vision, "Pending")}
38 + |> assign(:curr_vision, "Pending"), layout: false}
35 39 end
36 40
37 41 @impl true
modified apps/room_sanctum/test/room_sanctum_web/live/pythiae_public_map_test.exs
+9 −0
@@ -40,6 +40,15 @@ defmodule RoomSanctumWeb.PythiaePublicMapTest do
40 40 refute html =~ "mt-4 relative"
41 41 end
42 42
43 + test "the map gets the window, not a centred column", %{conn: conn, pythiae: pythiae} do
44 + {:ok, _live, html} = live(conn, "/p/m/#{pythiae.name}")
45 +
46 + # The :live layout wraps every other page in `container mx-auto`, which is
47 + # a max-width: the map rendered as a boxed column with the window showing
48 + # either side of it.
49 + refute html =~ "container mx-auto"
50 + end
51 +
43 52 test "it names the pythiae, for a screen someone walks past", %{conn: conn, pythiae: pythiae} do
44 53 {:ok, _live, html} = live(conn, "/p/m/#{pythiae.name}")
45 54

Parents: c065e44