Add Club.website; rebuild Colours per D9's exact markup; add a mobile app preview
- club.website (URLField, blank) editable from both the club's own Identity
page and the platform control panel's club form.
- Colours card rebuilt from the design canvas's literal D9 markup rather
than the prior in-between version: swatch + mono hex merged into one
bordered row (the swatch input and hex text input are the same real form
field, just laid out together), and a contrast-check row of two colour-
filled boxes instead of a plain text list -- labelled dynamically
("Black"/"White" on primary/secondary) since a club can pick a colour
light enough that black, not white, is the real computed text colour.
- Logo card restyled to D9's dashed drop-zone look.
- Live preview gains a mobile app mock (marked "Coming soon") alongside the
existing sidebar mock, using the same primary/secondary colours, ahead of
that surface actually being built.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ECGMEwrc2k4D8VQuwjstj9
This commit is contained in:
@@ -4472,16 +4472,27 @@ class ClubSettingsPreviewTests(ManagementTestBase):
|
||||
self.assertContains(response, 'id="primary_color_swatch"')
|
||||
self.assertContains(response, 'id="secondary_color_swatch"')
|
||||
|
||||
def test_the_mobile_app_preview_renders(self):
|
||||
response = self.club_get("club_settings")
|
||||
|
||||
self.assertContains(response, "preview-phone")
|
||||
self.assertContains(response, "Coming soon")
|
||||
|
||||
def test_the_website_field_is_editable(self):
|
||||
response = self.club_get("club_settings")
|
||||
self.assertContains(response, 'name="website"')
|
||||
|
||||
def test_saving_still_updates_the_club(self):
|
||||
response = self.club_post(
|
||||
"club_settings",
|
||||
{"name": "Ajax United", "legal_name": "", "contact_email": "", "primary_color": "#123456", "secondary_color": "#654321"},
|
||||
{"name": "Ajax United", "legal_name": "", "contact_email": "", "website": "https://ajax-united.example", "primary_color": "#123456", "secondary_color": "#654321"},
|
||||
)
|
||||
|
||||
self.assertRedirects(response, reverse("management:club_settings"))
|
||||
self.club.refresh_from_db()
|
||||
self.assertEqual(self.club.primary_color, "#123456")
|
||||
self.assertEqual(self.club.secondary_color, "#654321")
|
||||
self.assertEqual(self.club.website, "https://ajax-united.example")
|
||||
|
||||
|
||||
class BillingEndingBannerTests(ManagementTestBase):
|
||||
|
||||
Reference in New Issue
Block a user