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:
@@ -214,6 +214,17 @@ class NotePageViewTest(TestCase):
|
||||
self.assertContains(response, 'class="note-item__description"')
|
||||
self.assertContains(response, 'class="note-item__image-box"')
|
||||
|
||||
def test_palette_modal_renders_swatch_labels(self):
|
||||
"""Each palette option in the swatch modal should display its human-readable
|
||||
label next to the swatch body so the user knows what they are choosing."""
|
||||
Note.objects.create(
|
||||
user=self.user, slug="stargazer", earned_at=timezone.now()
|
||||
)
|
||||
response = self.client.get("/billboard/my-notes/")
|
||||
self.assertContains(response, 'class="note-swatch-label"')
|
||||
self.assertContains(response, "Bardo")
|
||||
self.assertContains(response, "Sheol")
|
||||
|
||||
|
||||
class NoteSetPaletteViewTest(TestCase):
|
||||
def setUp(self):
|
||||
|
||||
Reference in New Issue
Block a user