Skip to content

fix(header): complete atom review#166

Merged
egdev6 merged 3 commits into
mainfrom
fix/header-review-complete
May 17, 2026
Merged

fix(header): complete atom review#166
egdev6 merged 3 commits into
mainfrom
fix/header-review-complete

Conversation

@egdev6
Copy link
Copy Markdown
Member

@egdev6 egdev6 commented May 17, 2026

Summary

Completes the Header atom review checklist.

Closes #128

Type of change

  • 🧩 New component
  • 🐛 Bug fix
  • 🎨 Design tokens
  • ♿ Accessibility
  • 🏗️ Infrastructure
  • 📚 Documentation

Component checklist (skip if not applicable)

  • Follows the 5-file structure (types.ts, use*.ts, Component.tsx, index.ts, *.stories.tsx)
  • CVA variants defined in types.ts, not inline
  • No hardcoded colors — uses tokens from theme.css
  • No any types — TypeScript strict
  • ARIA attributes present and correct
  • Keyboard navigable (Tab, Enter, Escape where applicable)
  • Dark mode works correctly
  • Storybook stories cover: default, variants, states (hover, focus, disabled)
  • Tests added or updated

How to test

  1. pnpm test -- src/components/atoms/header/Header.test.tsx
  2. pnpm exec biome check src/components/atoms/header
  3. pnpm exec tsc --noEmit
  4. pnpm run storybook-build
  5. Open Storybook and verify Header stories for semantic tags, visual sizes, sr-only, id, and custom tone.

Screenshots / recordings (if applicable)

Not included.

Notes for reviewer

  • Fixes the previous class composition bug where a requested heading size could also receive the default fs-h1 class.
  • tag controls semantic heading level. size controls visual scale. fontSize remains supported as a backwards-compatible alias for size.
  • Header is non-interactive, so keyboard behavior is native/not applicable beyond standard heading semantics.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Completes the Header atom review by moving it to named exports, separating semantic heading level from visual size, and adding tests/stories for the updated API.

Changes:

  • Adds size as the visual heading scale while keeping fontSize as a compatibility alias.
  • Updates Header exports, hook logic, variants, Storybook stories, and tests.
  • Expands Header props to include native heading attributes.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/components/atoms/header/types.ts Updates CVA variants, Header prop types, and size/font aliases.
src/components/atoms/header/useHeader.ts Resolves semantic tag and visual size into rendered props/classes.
src/components/atoms/header/Header.tsx Converts Header to a named export and renders the resolved tag.
src/components/atoms/header/index.ts Updates the barrel export to use the named Header export.
src/components/atoms/header/Header.test.tsx Adds unit tests for default semantics, sizing, alias behavior, IDs, and sr-only headings.
src/components/atoms/header/Header.stories.tsx Refreshes stories to document semantic tags, visual sizes, fonts, sr-only, IDs, and custom tone.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/components/atoms/header/types.ts Outdated
Comment thread src/components/atoms/header/useHeader.ts Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.

@egdev6 egdev6 merged commit de65390 into main May 17, 2026
10 checks passed
@egdev6 egdev6 deleted the fix/header-review-complete branch May 17, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

atom: Header — review and complete

2 participants