buds rename + applet-list shell — Buddies → Buds everywhere (model field, slug, URL, view, DOM, CSS); my_buds.html + my_posts.html share new _applet-list-shell.html partial — vertical-title applet-scroll card; my_posts hosts two side-by-side in landscape, stacked in portrait — TDD
- lyric/0005 RemoveField+AddField (RenameField doesn't rename the implicit M2M through table; field was new in 0004 so no data loss). Lyric.User.buddies → User.buds; related_name added_as_buddy → added_as_bud.
- applets/0007 renames Applet slug my-buddies → my-buds + name 'My Buddies' → 'My Buds'. UI rationale: BILLBUDDIES overflowed the page-header band; in-game term collapses to BILLBUDS.
- billboard/0006 alter Line.Meta.ordering = ('created_at', 'id') — was already in models.py, just generates the corresponding migration (formalizing the ordering decision from the May-8b refactor).
- global rename via sed: buddies → buds, buddy → bud across 16 files (templates, SCSS, JS, ITs, FTs, page object, view code). 4 file renames via git mv: my_buddies.html → my_buds.html, _applet-my-buddies.html → _applet-my-buds.html, _buddy_panel.html → _bud_panel.html, _buddy_add_panel.html → _bud_add_panel.html, _buddy.scss → _bud.scss. Test files renamed too: test_buddies.py → test_buds.py, test_my_buddies.py → test_my_buds.py, test_buddy_btn.py → test_bud_btn.py. core.scss @import 'buddy' → 'bud'.
- new shared partial templates/apps/applets/_partials/_applet-list-shell.html — vertical-rotated <h2> + scrollable <ul> aperture, parameterised via {% include %} so a single page can invoke it more than once. Params: shell_title, shell_items, shell_item_template, shell_list_id, shell_empty.
- my_buds.html: single shell invocation w. add-bud panel below (page_class page-billbuds).
- my_posts.html: two shell invocations (own posts + posts shared with me) inside .applet-list-page--two-up — portrait stacks them; landscape lays side-by-side via @media (orientation: landscape) flex-direction: row (page_class page-billposts).
- SCSS: drop the bottom-anchored .buds-page block; new shared .applet-list-page (extends %billboard-page-base, flex-column + padding) w. .applet-scroll inside (extends %applet-box) and .applet-list inside that (flex: 1, overflow-y: auto). .applet-list-page--two-up flips to row layout in landscape. Body class trio gains page-billposts.
- 841 ITs + 5 my_buds/my_posts FTs green.
Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,7 +13,7 @@ from apps.lyric.models import User
|
||||
def _seed_billboard_applets():
|
||||
for slug, name, cols, rows in [
|
||||
("my-scrolls", "My Scrolls", 4, 3),
|
||||
("my-buddies", "My Buddies", 4, 3),
|
||||
("my-buds", "My Buds", 4, 3),
|
||||
("most-recent-scroll", "Most Recent Scroll", 8, 6),
|
||||
]:
|
||||
Applet.objects.get_or_create(
|
||||
@@ -37,7 +37,7 @@ class BillboardViewTest(TestCase):
|
||||
self.assertIn("applets", response.context)
|
||||
slugs = [e["applet"].slug for e in response.context["applets"]]
|
||||
self.assertIn("my-scrolls", slugs)
|
||||
self.assertIn("my-buddies", slugs)
|
||||
self.assertIn("my-buds", slugs)
|
||||
self.assertIn("most-recent-scroll", slugs)
|
||||
|
||||
def test_passes_my_rooms_context(self):
|
||||
@@ -111,7 +111,7 @@ class ToggleBillboardAppletsTest(TestCase):
|
||||
)
|
||||
self.assertEqual(response.status_code, 302)
|
||||
from apps.applets.models import UserApplet
|
||||
contacts = Applet.objects.get(slug="my-buddies")
|
||||
contacts = Applet.objects.get(slug="my-buds")
|
||||
ua = UserApplet.objects.get(user=self.user, applet=contacts)
|
||||
self.assertFalse(ua.visible)
|
||||
|
||||
@@ -136,7 +136,7 @@ class ToggleBillboardAppletsTest(TestCase):
|
||||
reverse("billboard:toggle_applets"),
|
||||
{"applets": [
|
||||
"my-scrolls",
|
||||
"my-buddies",
|
||||
"my-buds",
|
||||
"most-recent-scroll",
|
||||
]},
|
||||
HTTP_HX_REQUEST="true",
|
||||
@@ -160,7 +160,7 @@ class ToggleBillboardAppletsTest(TestCase):
|
||||
self.assertEqual(body.count('id="id_billboard_applet_menu"'), 1)
|
||||
|
||||
def test_second_toggle_preserves_prior_hidden_state(self):
|
||||
# First toggle: hide My Buddies only.
|
||||
# First toggle: hide My Buds only.
|
||||
self.client.post(
|
||||
reverse("billboard:toggle_applets"),
|
||||
{"applets": [
|
||||
@@ -170,7 +170,7 @@ class ToggleBillboardAppletsTest(TestCase):
|
||||
]},
|
||||
HTTP_HX_REQUEST="true",
|
||||
)
|
||||
# Second toggle: hide Most Recent Scroll additionally — My Buddies must stay hidden.
|
||||
# Second toggle: hide Most Recent Scroll additionally — My Buds must stay hidden.
|
||||
self.client.post(
|
||||
reverse("billboard:toggle_applets"),
|
||||
{"applets": [
|
||||
@@ -180,7 +180,7 @@ class ToggleBillboardAppletsTest(TestCase):
|
||||
HTTP_HX_REQUEST="true",
|
||||
)
|
||||
from apps.applets.models import UserApplet
|
||||
contacts = Applet.objects.get(slug="my-buddies")
|
||||
contacts = Applet.objects.get(slug="my-buds")
|
||||
most_recent_scroll = Applet.objects.get(slug="most-recent-scroll")
|
||||
self.assertFalse(
|
||||
UserApplet.objects.get(user=self.user, applet=contacts).visible
|
||||
|
||||
Reference in New Issue
Block a user