note palette modal: NVM closes confirm only; confirm visibility via style.display; swatch labels from _PALETTE_DEFS; recognitions block — TDD
- note-page.js: NVM hides confirm (style.display='none') — swatch modal stays open;
_showConfirm/_hideConfirm use style.display to bypass CSS specificity issues;
_doSetPalette reads data-palette-label before modal closes; appends
.note-recognitions__palette-line w. dim+bold markup after OK
- billboard/views.py: import _PALETTE_DEFS; _PALETTE_LABELS dict; _palette_opts()
enriches palette_options w. {name, label}; my_notes adds palette_label to note_items
- _note.scss: confirmed palette swatch uses gradient (palette vars cascade from
palette-* class); hardcoded bardo/sheol bg overrides removed; .note-recognitions block
w. .note-recognitions__header (tt-sign-section-header style) & __dim (tt-dim style);
.note-swatch-label in terUser bold; .note-item__palette gradient; confirm display:none default
- my_notes.html: p.name/p.label replaces slice hack; data-palette-label on swatch rows;
Recognitions block w. dim spans & strong values; removes hidden attr from confirm
- IT: test_palette_modal_renders_swatch_labels; test_also_saves_user_palette
- FT: NVM test corrected — modal stays open, confirm is_displayed() False; T2a URL fix
Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -8,10 +8,13 @@ from django.shortcuts import redirect, render
|
||||
from apps.applets.utils import applet_context, apply_applet_toggle
|
||||
from apps.dashboard.forms import LineForm
|
||||
from apps.dashboard.models import Post
|
||||
from apps.dashboard.views import _PALETTE_DEFS
|
||||
from apps.drama.models import GameEvent, Note, ScrollPosition
|
||||
from apps.epic.models import Room
|
||||
from apps.epic.utils import rooms_for_user
|
||||
|
||||
_PALETTE_LABELS = {p["name"]: p["label"] for p in _PALETTE_DEFS}
|
||||
|
||||
|
||||
def _recent_posts(user, limit=3):
|
||||
return (
|
||||
@@ -88,11 +91,15 @@ def room_scroll(request, room_id):
|
||||
})
|
||||
|
||||
|
||||
def _palette_opts(names):
|
||||
return [{"name": n, "label": _PALETTE_LABELS.get(n, n)} for n in names]
|
||||
|
||||
|
||||
_NOTE_META = {
|
||||
"stargazer": {
|
||||
"title": "Stargazer",
|
||||
"description": "You saved your first personal sky chart.",
|
||||
"palette_options": ["palette-bardo", "palette-sheol"],
|
||||
"palette_options": _palette_opts(["palette-bardo", "palette-sheol"]),
|
||||
},
|
||||
"schizo": {
|
||||
"title": "Schizo",
|
||||
@@ -136,6 +143,7 @@ def my_notes(request):
|
||||
"title": _NOTE_META.get(n.slug, {}).get("title", n.slug),
|
||||
"description": _NOTE_META.get(n.slug, {}).get("description", ""),
|
||||
"palette_options": _NOTE_META.get(n.slug, {}).get("palette_options", []),
|
||||
"palette_label": _PALETTE_LABELS.get(n.palette, "") if n.palette else "",
|
||||
}
|
||||
for n in qs
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user