Skip to content

[002-checkbox-card] Create BpkCheckboxCard specification#4218

Draft
Gert-Jan Vercauteren (gert-janvercauteren) wants to merge 4 commits intomainfrom
002-checkbox-card
Draft

[002-checkbox-card] Create BpkCheckboxCard specification#4218
Gert-Jan Vercauteren (gert-janvercauteren) wants to merge 4 commits intomainfrom
002-checkbox-card

Conversation

@gert-janvercauteren

Summary

Create comprehensive specification for BpkCheckboxCard component - a composable checkbox card with flexible content composition, multiple visual variants, and full state management.

Key Features Specified

  • Composable subcomponents (Root, Control, Content, Label, Description, Indicator, HiddenInput, Addon)
  • 3 visual variants: default, contrast, surface-contrast
  • 2 radius options: square and rounded (8px)
  • Indicator placement control: start or end
  • Full checkbox state support: checked, unchecked, disabled, invalid (ARIA-only), readonly
  • maxW/maxH props for sizing constraints
  • BpkText-based Label/Description with context-aware styling
    • Default: bpk-heading-5 (label), bpk-footnote (description)
    • On checked: text-on-dark-day for contrast on colored backgrounds

Clarifications Resolved (6 total)

  1. Invalid state: ARIA-only (no visual styling)
  2. Sizing: maxW/maxH props for max constraints
  3. Focus styling: Uses Backpack focus ring utility
  4. Label defaults: bpk-heading-5 + text-primary-day
  5. Description defaults: bpk-footnote + text-secondary-day
  6. Checked state text color: text-on-dark-day for accessibility

Testing & Success Criteria

  • 13 functional requirements fully specified
  • WCAG 2.1 Level AA accessibility compliance
  • RTL language support
  • 12+ success criteria for measurable validation
  • Keyboard navigation and screen reader support

Files

  • specs/002-checkbox-card/spec.md: Complete specification
  • specs/002-checkbox-card/checklists/requirements.md: Quality checklist

Remember to include the following changes:

  • Ensure the PR title includes the name of the component you are changing so it's clear in the release notes for consumers of the changes in the version e.g [Clover-123][BpkButton] Updating the colour
  • README.md (If you have created a new component)
  • Component README.md
  • Tests
  • Accessibility tests
    • The following checks were performed:
      • Ability to navigate using a keyboard only
      • Zoom functionality (Deque University explanation):
        • The page SHOULD be functional AND readable when only the text is magnified to 200% of its initial size
        • Pages must reflow as zoom increases up to 400% so that content continues to be presented in only one column i.e. Content MUST NOT require scrolling in two directions (both vertically and horizontally)
      • Ability to navigate using a screen reader only
  • Storybook examples created/updated
  • For breaking changes or deprecating components/properties, migration guides added to the description of the PR. If the guide has large changes, consider creating a new Markdown page inside the component's docs folder and link it here

## Summary

Create comprehensive specification for BpkCheckboxCard component - a composable
checkbox card with flexible content composition, multiple visual variants, and
full state management.

## Key Features Specified

- Composable subcomponents (Root, Control, Content, Label, Description, Indicator, HiddenInput, Addon)
- 3 visual variants: default, contrast, surface-contrast
- 2 radius options: square and rounded (8px)
- Indicator placement control: start or end
- Full checkbox state support: checked, unchecked, disabled, invalid (ARIA-only), readonly
- maxW/maxH props for sizing constraints
- BpkText-based Label/Description with context-aware styling
  - Default: bpk-heading-5 (label), bpk-footnote (description)
  - On checked: text-on-dark-day for contrast on colored backgrounds

## Clarifications Resolved (6 total)

1. Invalid state: ARIA-only (no visual styling)
2. Sizing: maxW/maxH props for max constraints
3. Focus styling: Uses Backpack focus ring utility
4. Label defaults: bpk-heading-5 + text-primary-day
5. Description defaults: bpk-footnote + text-secondary-day
6. Checked state text color: text-on-dark-day for accessibility

## Testing & Success Criteria

- 13 functional requirements fully specified
- WCAG 2.1 Level AA accessibility compliance
- RTL language support
- 12+ success criteria for measurable validation
- Keyboard navigation and screen reader support

## Files

- specs/002-checkbox-card/spec.md: Complete specification
- specs/002-checkbox-card/checklists/requirements.md: Quality checklist

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/4218 to see this build running in a browser.

## Summary

Clarify that @ark-ui/react will be added as a shared peer dependency
in the root package.json for centralized version management across
the Backpack monorepo.

## Decision

- Dependency: @ark-ui/react (unstyled checkbox primitive)
- Location: Root package.json (peer dependency)
- Rationale: Centralized version management; shared across components;
  easier updates and reduced duplication

## Files Updated

- specs/002-checkbox-card/spec.md: Added Q7 clarification

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
## Summary

Create comprehensive task list for BpkCheckboxCard implementation organized by:
- 6 User Stories (P1, P2)
- 12 Implementation Phases
- 70 Specific, actionable tasks with file paths
- Parallel execution opportunities
- Constitution compliance checkpoints

## Task Organization

**Phases 1-2**: Setup and foundational types
**Phases 3-8**: User stories in priority order (P1: US1-US2, P2: US3-US6)
**Phases 9-12**: Accessibility, testing, documentation, polish

## Key Features

- MVP scope identified (Phases 1-4 + Phase 10)
- Parallel execution tracks after Phase 4
- Dependencies clearly mapped
- All 70 tasks follow strict format: [ ] [ID] [P?] [Story] Description
- Constitution compliance verified per phase
- Verification checkpoints at each phase boundary

## Files Created

- specs/002-checkbox-card/tasks.md: 70 executable tasks

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…guidance

Add comprehensive implementation guidance across all specification artifacts:

**spec.md improvements**:
- Design token validation table with 12 tokens, Scss usage patterns, and availability status
- Corrected token import syntax: tokens.$bpk-token-name from @use '../../bpk-mixins/tokens'

**plan.md improvements**:
- Type definitions: Complete BpkCheckboxCardProps, BpkCheckboxCardContextValue interfaces, and all subcomponent props
- Ark UI integration pattern: ASCII diagram, responsibility separation, no-conflicts guarantee
- Dynamic color behavior rules: Label/Description/custom content/Addon color handling per state
- Themeable properties: 5 tokens mapped to CSS variables with implementation examples
- Performance constraints: Bundle size, render performance, and accessibility overhead targets

**tasks.md improvements**:
- T022b: New task for implementing themeable properties with proper @use statements
- T015: Detailed Storybook story requirements for basic label rendering
- T022: Enhanced with four story scenarios (Description, Addon, Full, asChild)
- T031: Explicit variant story matrix (default/contrast/surface-contrast)
- T050: Detailed state stories (Disabled, Readonly, Invalid, Sizing)
- T051-T055: Expanded accessibility test coverage with 23 specific test scenarios

Readiness score: 9.5/10 → 9.8/10 (implementation-ready specifications)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@skyscanner-backpack-bot
Copy link

Visit https://backpack.github.io/storybook-prs/4218 to see this build running in a browser.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

minor Non breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant