feat: Kings/Queens toggle on Schedule page (#95) #42
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "95-schedule-toggle"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Changes
schedule.html: Added.kq-togglebutton group after hero. Wrapped Travel Teams (3 cards) and Local Teams (2 cards) indata-program-content="kings". Added Queens placeholder indata-program-content="queens". Practice Info stays shared outside toggle. Added@toggleannotation to component doc comment.Test Plan
Review Checklist
Related Notes
westside-app— the project this work belongs toReview: PASS
Files reviewed:
schedule.html(1 file, +105/-75)Findings: None. Clean implementation.
tryouts.htmlinitKQToggle()inshared/app.jsauto-initializes on DOMContentLoaded -- no JS changes needed@toggleannotationPR #42 Review
DOMAIN REVIEW
Tech stack: Static HTML playground page (vanilla HTML/CSS/JS). The toggle functionality relies on
initKQToggle()inshared/app.js, which auto-initializes on DOMContentLoaded by querying.kq-toggle-btnelements. No JS changes required -- correct.Toggle markup: The
kq-togglebutton group anddata-program-contentattribute pattern exactly match the established pattern from tryouts.html (PR #41). The toggle HTML is identical:Structural choice: In tryouts.html, the toggle and content divs are siblings inside one
<section>container. In schedule.html, the toggle gets its own section and thedata-program-contentwrappers span entire<section>elements (including thesection-darklocal teams block). This is the correct approach here -- wrapping at the section level preserves the alternating light/dark styling that schedule.html uses. TheinitKQToggle()function queries[data-program-content]globally, so placement relative to the toggle element does not matter.Content integrity: All 5 Kings team cards (3 travel, 2 local) are preserved with identical content. Practice Info section and footer remain outside both toggle wrappers -- shared content is correctly scoped.
Queens placeholder: Minimal but present. Contains a section header with "Queens Schedule" and "coming soon" text. Appropriate for a first pass.
@toggleannotation: Added to the component doc comment at the top of the file. Good documentation practice, consistent with how@route,@auth,@nav, and@apiare used.Accessibility: The toggle buttons lack ARIA attributes (
role="tablist",aria-pressed, etc.). This is pre-existing from the tryouts.html pattern, not a regression introduced by this PR. Flagged as a nit for a future accessibility pass.BLOCKERS
None.
This is a static HTML playground page. No user input handling, no auth paths, no secrets, no backend interaction. The generic blocker criteria (unvalidated input, secrets, duplicated auth logic, zero test coverage for new functionality) do not apply to static HTML prototyping pages.
NITS
Accessibility (pre-existing, not a regression): The Kings/Queens toggle buttons across all pages (tryouts, schedule) have no ARIA semantics. Consider adding
role="tablist"on the container,role="tab"+aria-selectedon buttons, androle="tabpanel"on content divs in a future pass. This would be a change toinitKQToggle()in app.js, not to individual pages.Empty
<div class="container">wrapper: The toggle section has<section class="section"><div class="container">wrapping just the toggle div, then closes with an empty line before</div></section>. The extra whitespace is cosmetic only but could be tightened.SOP COMPLIANCE
95-schedule-togglereferences westside-app#95schedule.html), exactly as scopedPROCESS OBSERVATIONS
initKQToggle). Clean scope.initKQToggle()handles all wiring. This is the right pattern for playground prototyping.VERDICT: APPROVED