my-sea gear NVM: gatekeeper + picker nav-back to table hex instead of ejecting to gameboard — TDD
User-spec'd 2026-05-26: the gear menu's NVM was always nav-backing to /gameboard/ from every my-sea state, which ejects the user one step further than they want when bailing on the gatekeeper or the spread/crucifix picker. Both should nav-back to the my-sea TABLE HEX (the landing) — one step back, not all the way out.
## templates/apps/gameboard/_partials/_my_sea_gear.html
Now takes an optional `nvm_url` context variable; falls back to `{% url 'gameboard' %}` when unset. The onclick handler reads `{{ nvm_url }}` so callers can override per-page.
## templates/apps/gameboard/my_sea.html
```
{% if show_picker %}{% url 'my_sea' as nvm_url %}{% endif %}
{% include "apps/gameboard/_partials/_my_sea_gear.html" %}
```
Picker phase → nvm_url = my_sea landing (table hex). Sign-gate + landing phases fall through to the default (gameboard) — landing's NVM = "back out of my-sea entirely", which is the existing behaviour.
## templates/apps/gameboard/my_sea_gate.html
```
{% url 'my_sea' as nvm_url %}
{% include "apps/gameboard/_partials/_my_sea_gear.html" %}
```
Gatekeeper unconditionally nav-backs to the my-sea landing.
## Tests
`apps/gameboard/tests/integrated/test_views.py`:
- `MySeaViewTest.test_gear_nvm_navs_to_gameboard_on_landing_phase` — landing NVM still goes to /gameboard/ (regression guard).
- `MySeaViewTest.test_gear_nvm_navs_to_my_sea_landing_on_picker_phase` — picker NVM goes to /gameboard/my-sea/ (seeds a non-empty hand to trigger show_picker per views.py:277's `hand_non_empty or (phase_param and show_paid_draw)` logic).
- `MySeaGateViewTest.test_gear_nvm_navs_to_my_sea_landing_not_gameboard` — gatekeeper NVM goes to /gameboard/my-sea/ (and explicitly NOT /gameboard/).
## Verification
All 1364 IT+UT green. No FTs assert the gear-menu NVM target URL (per pre-change grep) so no test fixes required there.
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:
@@ -1,13 +1,15 @@
|
||||
{# Sprint 6 iter 6c — gear-btn on /gameboard/my-sea/ + the gatekeeper. #}
|
||||
{# NVM-only menu (no DEL, no BYE) — gear is the "back out without #}
|
||||
{# committing" affordance; NVM nav-backs to /gameboard/ mirroring the #}
|
||||
{# room's gear-menu convention. Rendered unconditionally (no active- #}
|
||||
{# draw guard) so fresh users + post-DEL states still see it. #}
|
||||
{# `<button>` not `<a class="btn">` — `.btn` doesn't reset font-family, so #}
|
||||
{# the anchor inherits body's serif font (the Brief's NVM uses `<button>` #}
|
||||
{# + reads correctly as sans-serif). Inline `onclick` preserves the nav #}
|
||||
{# semantics the href had. See [[feedback-btn-vs-anchor-font-family]]. #}
|
||||
{# committing" affordance. Caller passes `nvm_url` to control where #}
|
||||
{# NVM nav-backs to: my_sea landing (table hex) from gatekeeper + #}
|
||||
{# picker; falls back to /gameboard/ otherwise. Render unconditionally #}
|
||||
{# (no active-draw guard) so fresh users + post-DEL states still see it.#}
|
||||
{# `<button>` not `<a class='btn'>` — `.btn` doesn't reset font-family, #}
|
||||
{# so the anchor inherits body's serif font (the Brief's NVM uses #}
|
||||
{# `<button>` + reads correctly as sans-serif). #}
|
||||
{# See [[feedback-btn-vs-anchor-font-family]]. #}
|
||||
{% if not nvm_url %}{% url 'gameboard' as nvm_url %}{% endif %}
|
||||
<div id="id_my_sea_menu" style="display:none">
|
||||
<button type="button" class="btn btn-cancel" onclick="location.href='{% url 'gameboard' %}'">NVM</button>
|
||||
<button type="button" class="btn btn-cancel" onclick="location.href='{{ nvm_url }}'">NVM</button>
|
||||
</div>
|
||||
{% include "apps/applets/_partials/_gear.html" with menu_id="id_my_sea_menu" %}
|
||||
|
||||
@@ -1062,8 +1062,11 @@
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{# Sprint 6 iter 6c — gear-btn lives on every my-sea page state #}
|
||||
{# (sign-gate / landing / picker). NVM-only menu mirrors the #}
|
||||
{# gatekeeper's gear; "back out to /gameboard/" affordance. #}
|
||||
{# (sign-gate / landing / picker). NVM-only menu. Picker NVM #}
|
||||
{# nav-backs to the my-sea TABLE HEX (landing), letting the user #}
|
||||
{# leave the spread without committing. Sign-gate + landing NVM #}
|
||||
{# nav-backs to /gameboard/ (the partial's default fallback). #}
|
||||
{% if show_picker %}{% url 'my_sea' as nvm_url %}{% endif %}
|
||||
{% include "apps/gameboard/_partials/_my_sea_gear.html" %}
|
||||
{# Bud + burger persist across every stage too — same affordance #}
|
||||
{# as on the my-sea gatekeeper, so the user can invite + reach #}
|
||||
|
||||
@@ -88,6 +88,10 @@
|
||||
{# bud-btn lives at viewport fixed position (per `_bud.scss`) and #}
|
||||
{# the gear-btn sits atop `#id_kit_btn` in the bottom-right corner. #}
|
||||
{% include "apps/gameboard/_partials/_my_sea_bud_panel.html" %}
|
||||
{# Gatekeeper NVM nav-backs to the my-sea TABLE HEX (landing) so the #}
|
||||
{# user lands one step back from the gatekeeper rather than ejecting #}
|
||||
{# all the way to /gameboard/. #}
|
||||
{% url 'my_sea' as nvm_url %}
|
||||
{% include "apps/gameboard/_partials/_my_sea_gear.html" %}
|
||||
{% include "apps/gameboard/_partials/_burger.html" %}
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user