-
Notifications
You must be signed in to change notification settings - Fork 1
[Task] Tab Bar + Tab Pane Components #16
Copy link
Copy link
Open
Labels
P2Core features, ship after P1Core features, ship after P1ai-shippableDelegatable to AI agents — clarity:4+ and risk:2 or lowerDelegatable to AI agents — clarity:4+ and risk:2 or lowerblast:2Single domain — 2-5 files within one feature folderSingle domain — 2-5 files within one feature folderclarity:4Clear spec, minor ambiguities — AI-shippable with light reviewClear spec, minor ambiguities — AI-shippable with light reviewparallel:2Lane 2 work streamLane 2 work streamrisk:2Small surface area, existing patterns, minor regression chanceSmall surface area, existing patterns, minor regression chanceseq:03Sequence step 3Sequence step 3size:MModerate scope, some design neededModerate scope, some design neededtype:featureNew functionality or capabilityNew functionality or capability
Description
Activity
Metadata
Metadata
Assignees
Labels
P2Core features, ship after P1Core features, ship after P1ai-shippableDelegatable to AI agents — clarity:4+ and risk:2 or lowerDelegatable to AI agents — clarity:4+ and risk:2 or lowerblast:2Single domain — 2-5 files within one feature folderSingle domain — 2-5 files within one feature folderclarity:4Clear spec, minor ambiguities — AI-shippable with light reviewClear spec, minor ambiguities — AI-shippable with light reviewparallel:2Lane 2 work streamLane 2 work streamrisk:2Small surface area, existing patterns, minor regression chanceSmall surface area, existing patterns, minor regression chanceseq:03Sequence step 3Sequence step 3size:MModerate scope, some design neededModerate scope, some design neededtype:featureNew functionality or capabilityNew functionality or capability
Context
Part of #8 (Web Components Migration).
Category navigation — 7 tabs plus a "Saved" tab. Each tab has a badge showing count of active flags in its categories. Tab panes show/hide based on active selection.
Scope
Create:
src/components/tb-tab-bar.js—<tb-tab-bar>horizontal tab buttons with badgessrc/components/tb-tab-pane.js—<tb-tab-pane>visibility wrapper for tab contentRead (reference only):
index.htmllines 2060-2108 (renderTabBar())index.htmllines 2232-2249 (tab pane active toggling)index.htmlCSS for.tab-bar,.tab-btn,.tab-badge,.tab-paneCurrent State
renderTabBar()creates buttons fromTAB_GROUPSarray once, then updates active state + badge counts on each render. Badges show count of flags with active overrides per category. "Saved" tab is disabled when no custom presets exist. Tab panes are divs toggled via.activeclass.Target State
<tb-tab-bar>: Shadow DOM. Acceptstabs(TAB_GROUPS array),activeTab(string),badgeCounts(object: tabId → count),savedCount(number),hidden(boolean, for when search is active). Renders tab buttons with badges. Dispatchestb:tab-changewith{ detail: { tabId } }on click. "Saved" tab disabled whensavedCount === 0.<tb-tab-pane>: Light DOM. AcceptstabId(string),active(boolean). Shows/hides content. Children (flag groups) are rendered by parent.Implementation Hints
<tb-app>from resolved flags — tab bar is pure display<tb-tab-pane>is deliberately Light DOM — it's just a visibility wrapper, and its children (flag groups) need to be in the document flow.activeclass or useCustomStateSet:state(active)hiddenproperty is true (search active), the whole bar hidesDependencies
TAB_GROUPS) + style sheetsDefinition of Done
<tb-tab-bar>renders buttons fromtabspropertysavedCount === 0tb:tab-changewith{ tabId }hiddenproperty hides the bar (for search mode)<tb-tab-pane>shows/hides based onactivepropertyVerification
<tb-tab-bar>with TAB_GROUPS datatb:tab-changeevent with correct tabIdbadgeCounts = { 'cost-effort': 3 }— verify badge shows "3"savedCount = 0— verify "Saved" tab is disabledhidden = true— verify bar disappears