Skip to content

feat(ui): team switcher — sidebar dropdown, mobile chip, create/join flow - #34

Merged
alexbelij merged 1 commit into
mainfrom
feature/team-switcher-ui
Jul 9, 2026
Merged

feat(ui): team switcher — sidebar dropdown, mobile chip, create/join flow#34
alexbelij merged 1 commit into
mainfrom
feature/team-switcher-ui

Conversation

@alexbelij

Copy link
Copy Markdown
Owner

Replaces the static club card with an interactive multi-team switcher. Sidebar dropdown lists all teams the current user is a member of; a fixed mobile-topbar chip keeps the active team visible when the sidebar is collapsed. Two modals cover onboarding: Create team (become head coach; team keypair generated locally) and Join team (paste invite link; select your role).

Persistence lives in localStorage (mister:teams, mister:active-team). A window.MisterTeams API exposes getActive(), list(), and onChange(fn) so other modules can react to team changes.

Verified via headless jsdom: dropdown open/close, Escape close, create flow, mobile chip, active-flag rendering, re-render after switch, persistence round-trip.

…flow

Replaces the static "FC Metall Nord" card in the sidebar with an
interactive team switcher so a single install can hold multiple team
contexts (head_coach / assistant_coach / analyst / player).

- demo/team-switcher.js: dropdown, mobile chip, create/join modals,
  localStorage persistence (mister:teams, mister:active-team),
  MisterTeams global API for other modules to subscribe to changes
- demo/styles.css: switcher, chip, modal styles matched to the
  existing dark/light tokens
- demo/index.html: script + preload wired; ?v=32 cache-bust
- demo/sw.js: CACHE_VERSION bumped to v32, team-switcher.js precached
@alexbelij
alexbelij merged commit 34310e1 into main Jul 9, 2026
1 check passed
github-actions Bot added a commit that referenced this pull request Jul 9, 2026
Source commit: 34310e1

Message: feat(ui): team switcher — sidebar dropdown, mobile chip, create/join flow (#34)
@alexbelij
alexbelij deleted the feature/team-switcher-ui branch July 9, 2026 10:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant