Widen the webhook page by half so an entrypoint URL fits on one line (closes #350)
check / check (push) Successful in 3m18s
check / check (push) Successful in 3m18s
The webhook page's container was capped at max-w-6xl, 72rem (1152 px), which made a typical entrypoint URL wrap even in a 1440-pixel window. It is now capped at 108rem (1728 px). The width is an inline style because the committed tailwind.css has no class that wide, and regenerating it needs the unpinned tool. The other pages, the navbar and the footer keep 72rem. Model: opus-5-5
This commit is contained in:
@@ -241,3 +241,31 @@ func TestHandleSourceDetail_RendersNamedTargetFields(
|
||||
assert.Contains(t, body, "(unavailable)")
|
||||
assert.NotContains(t, body, "beak")
|
||||
}
|
||||
|
||||
// TestHandleSourceDetail_IsWiderThanOtherPages pins the webhook
|
||||
// page's maximum width at 108rem (1728 px), half again the 72rem of
|
||||
// max-w-6xl that the other pages use, so an entrypoint URL fits on
|
||||
// one line in a 1920-pixel window.
|
||||
func TestHandleSourceDetail_IsWiderThanOtherPages(t *testing.T) {
|
||||
t.Parallel()
|
||||
|
||||
var (
|
||||
h *handlers.Handlers
|
||||
sess *session.Session
|
||||
db *database.Database
|
||||
)
|
||||
|
||||
app := newTestApp(t, &h, &sess, &db)
|
||||
app.RequireStart()
|
||||
|
||||
t.Cleanup(app.RequireStop)
|
||||
|
||||
wh := seedWebhook(t, db)
|
||||
|
||||
body := renderSourceDetailPage(t, h, sess, wh.ID)
|
||||
|
||||
assert.Contains(
|
||||
t, body,
|
||||
`<div class="mx-auto px-6 py-8" style="max-width: 108rem"`,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -3,7 +3,10 @@
|
||||
{{define "title"}}{{.Webhook.Name}} - Webhooker{{end}}
|
||||
|
||||
{{define "content"}}
|
||||
<div class="max-w-6xl mx-auto px-6 py-8" x-data="{ showAddEntrypoint: false, showAddTarget: false }">
|
||||
<!-- Half again as wide as the other pages (max-w-6xl, 72rem), so an
|
||||
entrypoint URL fits on one line. An inline style, because the
|
||||
committed tailwind.css has no class this wide. -->
|
||||
<div class="mx-auto px-6 py-8" style="max-width: 108rem" x-data="{ showAddEntrypoint: false, showAddTarget: false }">
|
||||
<div class="mb-6">
|
||||
<a href="/hooks" class="text-sm text-primary-600 hover:text-primary-700">← Back to webhooks</a>
|
||||
<div class="flex justify-between items-center mt-2">
|
||||
|
||||
Reference in New Issue
Block a user