feat(pagination): add molecule component#251
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a new Pagination molecule (compound component API) to the design system and wires it into the package exports, along with a small Select prop-doc default hygiene update needed to satisfy the repo’s prop-default docs gate.
Changes:
- Added a new
Paginationmolecule with compound exports (PaginationContent,PaginationItem,PaginationLink,PaginationPrevious,PaginationNext,PaginationEllipsis,PaginationSummary) supporting anchor and button modes, disabled semantics, sizing via root context, and current-page semantics. - Added unit tests and Storybook stories covering the supported states and modes.
- Added missing
@defaultJSDoc for existingSelectprops with runtime defaults (clearAriaLabel,loadingLabel).
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/index.ts | Exports the new Pagination molecule from the package entrypoint. |
| src/components/molecules/pagination/usePagination.ts | Implements sizing context + container-layer logic for Pagination subcomponents. |
| src/components/molecules/pagination/types.ts | Defines public props, CVA variants, and JSDoc controls/defaults for Pagination. |
| src/components/molecules/pagination/Pagination.tsx | Presentational compound components for the Pagination molecule. |
| src/components/molecules/pagination/Pagination.test.tsx | Adds hook + component behavior tests for accessibility and interaction semantics. |
| src/components/molecules/pagination/Pagination.stories.tsx | Adds Storybook docs/examples for variants, modes, and states. |
| src/components/molecules/pagination/index.ts | Barrel re-exports for the Pagination molecule and types. |
| src/components/atoms/select/types.ts | Adds missing @default JSDoc for existing runtime defaults (prop-doc gate hygiene). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
egdev6
left a comment
There was a problem hiding this comment.
Está muy bien encaminado. Dejo un pedido chico antes de aprobar: sumemos cobertura explícita de activación por teclado para PaginationLink.
El PR declara keyboard-only verification, y el componente soporta modo button y modo anchor, así que estaría bueno dejar evidencia local de:
Enter/Spaceactivando el modo button.Enteractivando el modo anchor.
El resto lo veo bien: scope claro, CI verde, stories completas y la excepción de tamaño está justificada.
Summary
Closes #25
Paginationmolecule with compound named exports for root, content, item, link, previous, next, ellipsis, and summary.Review scope
src/components/molecules/pagination/*src/index.tssrc/components/atoms/select/types.tsdefault-doc hygiene onlyType of change
Workflow gates
Closes #NNNor maintainer approved an exception.status:approvedbefore implementation starts.In progress, branch/worktree recorded.<type>(<optional scope>): <description>..playwright-mcp,page-*.png,page-*.jpeg,*.md.playwright-output.Component evidence (required for component changes)
types.ts,use*.ts,Component.tsx,Component.test.tsx,Component.stories.tsx,index.ts.types.ts; JSX component has no state, CVA calls, or business logic.@defaultJSDoc intypes.ts(node scripts/verify-prop-default-docs.mjs).theme.css; no hardcoded colors or arbitrary color utilities.Accessibility evidence
Validation evidence
pnpm exec tsc --noEmitpassed.pnpm testpassed, 30 files / 536 tests.pnpm run buildpassed.aria-labelon a plainspan; current-page contrast uses darker brand token in both themes.Additional review evidence:
Screenshots or recordings
Notes for reviewer
PaginationLinkintentionally remains interactive when current;isCurrentonly addsaria-current="page"and selected styling, per approved spec.src/components/atoms/select/types.tsonly adds missing@defaultdocs for existing runtime defaults so the repository prop-doc gate passes.