my_sea_visit: share the owner picker styling (--duoUser felt + fill) when showing the draw — TDD
The bud-sea (visitor) VIEW DRAW rendered the cross but kept data-phase=landing, so it sat on the --priUser landing bg instead of the owner's --duoUser picker felt, and its #id_my_sea_visit_draw wrapper wasn't a flex container so the picker didn't fill/centre like the owner's. DRY fix (no new visit-only styling): - VIEW DRAW toggle now flips .my-sea-page data-phase landing<->picker, so the cross reuses the shared .my-sea-page[data-phase=picker] --duoUser felt rule. - .my-sea-visit-draw is display:contents, so its .my-sea-picker child becomes a direct flex item of .my-sea-page and fills/centres via the existing .my-sea-picker sizing. FT asserts the page flips to data-phase=picker on VIEW DRAW. Code architected by Disco DeDisco <discodedisco@outlook.com> Git commit message Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -135,7 +135,11 @@
|
||||
{% endif %}
|
||||
<script>
|
||||
(function () {
|
||||
// VIEW DRAW toggles the read-only draw against the table hex.
|
||||
// VIEW DRAW toggles the read-only draw against the table hex. The
|
||||
// page's data-phase flips landing↔picker so the cross reuses the
|
||||
// owner's `.my-sea-page[data-phase="picker"]` --duoUser felt bg (DRY —
|
||||
// same rule the owner picker rides). The hex view stays "landing".
|
||||
var page = document.querySelector('.my-sea-page');
|
||||
var viewBtn = document.getElementById('id_my_sea_view_draw_btn');
|
||||
var draw = document.getElementById('id_my_sea_visit_draw');
|
||||
var landing = document.querySelector('.my-sea-visit-landing');
|
||||
@@ -144,6 +148,7 @@
|
||||
var showing = draw.style.display !== 'none';
|
||||
draw.style.display = showing ? 'none' : '';
|
||||
if (landing) landing.style.display = showing ? '' : 'none';
|
||||
if (page) page.setAttribute('data-phase', showing ? 'landing' : 'picker');
|
||||
});
|
||||
}
|
||||
// GATE VIEW → visitor gate.
|
||||
|
||||
Reference in New Issue
Block a user