Compare commits

...

2 Commits

Author SHA1 Message Date
Disco DeDisco
9eb1c1523e natus wheel: element tooltips — Space/Air-Capacitor subtitle; score badge under square
Some checks failed
ci/woodpecker/push/pyswiss Pipeline was successful
ci/woodpecker/push/main Pipeline failed
- Add .tt-element-type italic subtitle below element title (classical name + "-Capacitor")
- Wrap element square in .tt-el-badge-col (float right, flex col) w. score beneath
- Remove inline .tt-el-body-line score from all three element branches (classic/Time/Space)
- .tt-element-type shares .tt-sign-type / .tt-house-type italic dim style

Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 12:01:36 -04:00
Disco DeDisco
c399afa26d role select channels FTs: get_or_create DeckVariant in _equip_earthman_deck — fixes CI flush wipe
TransactionTestCase.flush() wipes all rows (incl. migration-seeded DeckVariants)
after every test. Landscape runs first (alphabetically), consumes the seeded deck,
then flush removes it. Subsequent tests called filter().first() → None → silently
skipped → data-equipped-deck="" → JS no-deck warning instead of opening fan.

Code architected by Disco DeDisco <discodedisco@outlook.com>
Git commit message Co-Authored-By:
Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-28 11:46:47 -04:00
3 changed files with 29 additions and 12 deletions

View File

@@ -706,8 +706,7 @@ const NatusWheel = (() => {
if (CLASSIC_ELEMENTS.has(item.key)) { if (CLASSIC_ELEMENTS.has(item.key)) {
const contribs = elData.contributors || []; const contribs = elData.contributors || [];
bodyHtml = `<div class="tt-el-body-line">${vecImg} +${count} (${pct}%)</div>`; bodyHtml = `<div class="tt-el-formation-header"><span class="tt-el-formation-label">Planets</span> +${contribs.length}</div>`;
bodyHtml += `<div class="tt-el-formation-header"><span class="tt-el-formation-label">Planets</span> +${contribs.length}</div>`;
if (contribs.length) { if (contribs.length) {
bodyHtml += '<div class="tt-el-contribs">'; bodyHtml += '<div class="tt-el-contribs">';
contribs.forEach(c => { contribs.forEach(c => {
@@ -720,7 +719,6 @@ const NatusWheel = (() => {
} else if (item.key === 'Time') { } else if (item.key === 'Time') {
const stellia = elData.stellia || []; const stellia = elData.stellia || [];
bodyHtml = `<div class="tt-el-body-line">${vecImg} +${count} (${pct}%)</div>`;
if (stellia.length) { if (stellia.length) {
const isTie = stellia.length > 1; const isTie = stellia.length > 1;
bodyHtml += '<div class="tt-el-contribs">'; bodyHtml += '<div class="tt-el-contribs">';
@@ -745,7 +743,6 @@ const NatusWheel = (() => {
} else if (item.key === 'Space') { } else if (item.key === 'Space') {
const parades = elData.parades || []; const parades = elData.parades || [];
bodyHtml = `<div class="tt-el-body-line">${vecImg} +${count} (${pct}%)</div>`;
if (parades.length) { if (parades.length) {
bodyHtml += '<div class="tt-el-contribs">'; bodyHtml += '<div class="tt-el-contribs">';
parades.forEach(pd => { parades.forEach(pd => {
@@ -778,9 +775,13 @@ const NatusWheel = (() => {
if (_ttBody) { if (_ttBody) {
_ttBody.innerHTML = _ttBody.innerHTML =
`<div class="tt-el-header">` + `<div class="tt-el-header">` +
squareImg + `<div class="tt-el-badge-col">` +
squareImg +
`<div class="tt-el-score">+${count} (${pct}%)</div>` +
`</div>` +
`<span class="tt-title tt-title--el-${elKey}">${info.name}</span>` + `<span class="tt-title tt-title--el-${elKey}">${info.name}</span>` +
`</div>` + `</div>` +
`<span class="tt-element-type">${item.key}-Capacitor</span>` +
bodyHtml; bodyHtml;
} }
_positionTooltipAtItem('elements', idx); _positionTooltipAtItem('elements', idx);

View File

@@ -14,11 +14,14 @@ from apps.lyric.models import User
def _equip_earthman_deck(user): def _equip_earthman_deck(user):
"""Equip the Earthman DeckVariant so the role-select no-deck guard passes.""" # get_or_create: TransactionTestCase.flush() wipes migration-seeded DeckVariants
deck = DeckVariant.objects.filter(name__icontains="Earthman").first() # between tests, so subsequent tests in the same run can't find it via filter().
if deck: deck, _ = DeckVariant.objects.get_or_create(
user.equipped_deck = deck slug="earthman",
user.save(update_fields=["equipped_deck"]) defaults={"name": "Earthman", "card_count": 106, "is_default": True},
)
user.equipped_deck = deck
user.save(update_fields=["equipped_deck"])
def _fill_room_via_orm(room, emails): def _fill_room_via_orm(room, emails):

View File

@@ -619,6 +619,7 @@ body[class*="-light"] {
opacity: 1; opacity: 1;
flex-shrink: 0; flex-shrink: 0;
} }
.tt-element-type,
.tt-house-type, .tt-house-type,
.tt-sign-type { .tt-sign-type {
display: block; display: block;
@@ -710,12 +711,24 @@ body[class*="-light"] {
margin-bottom: 0.3rem; margin-bottom: 0.3rem;
} }
.tt-el-square { .tt-el-badge-col {
float: right; float: right;
display: block; display: flex;
flex-direction: column;
align-items: center;
gap: 0.2rem;
margin-left: 0.5rem; margin-left: 0.5rem;
} }
.tt-el-square {
display: block;
}
.tt-el-score {
font-size: 0.7rem;
text-align: center;
}
.tt-el-vec { .tt-el-vec {
display: inline; display: inline;
vertical-align: middle; vertical-align: middle;