feat: Tryouts page + Kings/Queens toggle foundation (#92) #41
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "92-tryouts-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
tryouts.html(new): Tryouts page with KQ toggle, upcoming tryouts (empty state), past tryouts for both programs with real data, next-season contact boxshared/app.js: AddedinitKQToggle()function with localStorage persistence, body class toggling, and content section show/hide. Called in DOMContentLoaded block.shared/style.css: Added.queens-activecolor mode (swaps--color-redto Queens pink),.kq-toggle/.kq-toggle-btnbutton styles,.tryout-history-cardand.next-season-boxcomponent stylesindex.html,staff.html,sponsors.html,schedule.html,register.html,success.html: Added Tryouts nav link (Home | About | Staff | Tryouts | Sponsors | Schedule)Test Plan
tryouts.html-- toggle between Kings and Queens, verify content switches and color scheme changesReview Checklist
Related Notes
westside-playground-overhaulQA Review
Checked
@route,@auth,@nav,@api)initKQToggle()correctly uses early return when no toggle buttons found (no-op on non-toggle pages)applyProgram()handles body class toggle, content visibility, and button active statedata-program-contentdivs per program value work correctly (JS queries all matching elements).queens-activeCSS override scoped to--color-redand--color-red-hoveronlyNits (non-blocking)
style="margin-top: var(--space-2xl);"-- acceptable for playground, but could be a CSS class if reused on other toggle pages (#93, #95)..next-season-boxgradient: Usesrgba(212, 32, 38, 0.08)instead of a var-based approach. This matches the existing codebase pattern (.bottom-cta,.tryout-hero, etc.) so not a regression, but won't pick up Queens pink in the gradient when toggled. Gradient is subtle enough that this is cosmetic-only.VERDICT: APPROVED
PR #41 Review
DOMAIN REVIEW
Tech stack: Vanilla HTML/CSS/JS playground (static prototypes). No frameworks, no build tools. This is the design source of truth for westside-app SvelteKit routes.
JavaScript (
shared/app.js--initKQToggle()):initKQToggle()is a standalone function called from the DOMContentLoaded block, consistent with all other init functions in the file (initFilterList,initTabs,initRegister,initTeams).if (!toggleBtns.length) return;) is correct -- runs on every page load but exits immediately on pages without a toggle. No performance concern.localStoragepersistence is straightforward: reads on load, writes on click. Key name'program'is simple and collision-free within this domain.applyProgram()inner function handles three concerns correctly: body class toggle, content section visibility, button active state. All useclassList.togglewith the boolean second argument, which is the right API.dataset.programreads from static HTMLdata-programattributes. Values are never injected into innerHTML or eval'd.data-program="kings"/data-program="queens"attributes in the HTML.CSS (
shared/style.css):.queens-activeoverrides--color-redand--color-red-hoverat the body level, which cascades correctly to all elements using those variables. Elegant approach -- the entire site color scheme pivots on two variable overrides..kq-toggle,.kq-toggle-btn) use design tokens (--space-sm,--space-xl,--border-radius,--font-size-base,--transition-fast) appropriately..tryout-history-card,.next-season-box) are well-structured with clear naming.HTML (
tryouts.html):lang="en", viewport meta, charset, OG tags (consistent URL pattern with all other pages), favicons, external stylesheet only.aria-label="Main navigation"on nav,aria-expanded/aria-controlson hamburger toggle -- matches the pattern used on all other public pages.data-program-content="kings"/data-program-content="queens"for toggle targeting -- clean and semantic.BLOCKERS
1. Missing nav update on
about.htmlThe PR body claims "Nav updated on all 7 public pages." Seven pages in the repo have the public nav (
class="nav-links"):index.html,about.html,staff.html,sponsors.html,schedule.html,register.html,success.html. The diff updates 6 of these butabout.htmlwas not updated -- it still has the old 5-item nav without the Tryouts link.This is a functional bug: a user navigating to the About page loses the Tryouts nav link. Since
about.htmlwas added by issue #91 after the original nav was established, it was likely missed during the search for files to update.Files with
nav-linksclass confirmed by grep:about.html,index.html,register.html,schedule.html,sponsors.html,staff.html,success.html(7 files). PR only touches 6.2. Inline CSS in
tryouts.htmlThe ticket context specifies "No inline CSS or JS -- everything in shared files." The PR introduces two inline
styleattributes intryouts.html:<div class="section-header" style="margin-top: var(--space-2xl);">(Past Tryouts header)<p style="margin-top: var(--space-md);">(Next season contact paragraph)While these use CSS custom properties (not raw values), they are still inline styles. The existing codebase has zero inline styles across all HTML files on main. These should be utility classes (e.g.,
.mt-2xl-- note.mt-mdalready exists in the stylesheet at line 153) or component-specific classes inshared/style.css.NITS
Raw
1.5reminstead ofvar(--space-lg)in CSS:.tryout-history-cardand.next-season-boxboth usepadding: 1.5rem. The design system defines--space-lg: 1.5rem. The newer code in this codebase consistently uses tokens (19 instances ofpadding:.*var(--space-...)vs 4 legacy raw values). New code should prefer tokens:padding: var(--space-lg).Forward link to non-existent
teams.html: Both tryout history cards link to<a href="teams.html">View Teams</a>, butteams.htmldoes not exist yet (it is issue #93). This is acceptable for a playground prototype, but the link will 404 until that ticket lands. Consider adding a comment in the HTML noting the dependency, or using a#placeholder until #93 ships.rgba(212, 32, 38, 0.08)hardcoded in.next-season-boxgradient: The Kings red#d42026isrgb(212, 32, 38), so this is correct, but it is hardcoded rather than derived from--color-red. When the.queens-activeclass swaps--color-redto#e91e8c, this gradient background will still show Kings red at 8% opacity. This may be intentional (the gradient is subtle enough to not matter), but it is worth noting that it does not respond to the toggle.SOP COMPLIANCE
92-tryouts-togglereferences issue #92forgejo_admin/westside-app#92, foundation for #93/#94/#95,westside-playground-overhaulfeat: Tryouts page + Kings/Queens toggle foundation (#92))about.htmlmissed (see Blocker #1)PROCESS OBSERVATIONS
initKQToggle,.queens-active,data-program-content) is well-designed for reuse across #93, #94, #95. Good decomposition.<li>per file), and the CSS uses the existing variable system. Theabout.htmlgap is the only regression risk.tryouts.htmlin the route map. No README update needed.VERDICT: NOT APPROVED
Two blockers must be resolved:
about.html(consistency with all other public pages)styleattributes fromtryouts.html-- use utility classes or shared CSS classes per the ticket requirement of no inline CSS32afd1ff28toe389ecaa37QA Fixes Applied
Rebased on main (picked up about.html from PR #40), then fixed all blockers:
Blocker 1: about.html missing Tryouts nav link
<li><a href="tryouts.html">Tryouts</a></li>between Staff and SponsorsBlocker 2: Inline style attributes in tryouts.html
style="margin-top: var(--space-2xl);"on Past Tryouts header with.mt-2xlclass (new utility added to shared/style.css)style="margin-top: var(--space-md);"on contact paragraph with existing.mt-mdclassNit: Hardcoded gradient in .next-season-box
--color-red-rgb: 212, 32, 38to:rootand--color-red-rgb: 233, 30, 140to.queens-active.next-season-boxgradient fromrgba(212, 32, 38, 0.08)torgba(var(--color-red-rgb), 0.08)so it responds to the Queens toggleBonus fix: tryouts.html nav About link pointed to
index.html#aboutinstead ofabout.html— updated to match canonical nav.PR #41 Review (Re-review)
Re-review after fixes for 2 blockers and 1 nit from previous QA pass.
PREVIOUS FINDINGS -- VERIFICATION
All three items from the prior review are confirmed fixed:
about.htmldiff adds the Tryouts<li>at line 45, consistent with all other pages.style=intryouts.htmlreturns zero matches. The JSapplyProgram()function uses DOM manipulation (el.style.display) for show/hide, which is the correct approach.--color-red-rgbCSS variable added at:rootlevel (212, 32, 38) with Queens override (233, 30, 140). Gradient now usesrgba(var(--color-red-rgb), 0.08)which responds to the toggle.DOMAIN REVIEW
Tech stack: Static HTML/CSS/JS playground (vanilla, no framework). Domain checks: accessibility, CSS quality, component architecture, responsive patterns.
HTML (tryouts.html)
lang="en", viewport meta, semantic sections, nav landmark witharia-labelaria-expanded,aria-controls,aria-label-- gooddeferon script tag -- correctCSS (shared/style.css)
.queens-activeoverride cleanly swaps--color-red,--color-red-rgb, and--color-red-hover1.5rempadding on.tryout-history-cardand.next-season-boxmatches existing card components.mt-2xlutility extends the existing spacing utilities -- well placed--border-radius,--transition-fast, etc.)JavaScript (shared/app.js)
initKQToggle()is well-structured: early return if no toggle buttons, localStorage persistence, cleanapplyProgram()inner functionDOMContentLoaded-- safe because of the early return guardvardeclarations are consistent with the existing codebase style (not ES6const/let)dataset.programContentcorrectly maps todata-program-contentHTML attributesNav consistency: Verified all 8 files with
nav-linksclass (index.html,about.html,staff.html,tryouts.html,sponsors.html,schedule.html,register.html,success.html) -- all include the Tryouts link. No pages were missed.BLOCKERS
None.
NITS
Forward-reference to non-existent
teams.html(tryouts.htmllines 100, 112): The "View Teams" links point toteams.htmlwhich does not exist yet. This is explicitly scoped as follow-up work (#93), but the links will 404 until that PR lands. Consider whether a placeholder or disabling the links until #93 merges would be better UX. Non-blocking since #93 is already tracked.KQ toggle buttons lack ARIA semantics: The
.kq-togglediv could benefit fromrole="group"witharia-label="Program selector", and the buttons could usearia-pressed(toggled via JS alongside theactiveclass). Minor since this is a playground prototype, but worth carrying forward to the SvelteKit production implementation.SOP COMPLIANCE
92-tryouts-togglemaps to westside-app#92)westside-playground-overhaul(plan slug) and closes #92PROCESS OBSERVATIONS
--color-red-rgbvariable approach is a thoughtful pattern that will scale well as the Queens toggle is applied to Teams (#93), Gear (#94), and Schedule (#95).initKQToggle()function is properly reusable -- future pages just need.kq-toggle-btnand[data-program-content]attributes with no JS changes.VERDICT: APPROVED