Skip to content

feat: Add a local, CI-enforced public API compatibility check for pocketpay-sdk exports#281

Merged
El-swaggerito merged 1 commit into
Axionvera:mainfrom
simplicityf:feat/compability-check
Jul 23, 2026
Merged

feat: Add a local, CI-enforced public API compatibility check for pocketpay-sdk exports#281
El-swaggerito merged 1 commit into
Axionvera:mainfrom
simplicityf:feat/compability-check

Conversation

@simplicityf

Copy link
Copy Markdown
Contributor

Summary

  • Add a shared DataTable<T> component (src/components/DataTable.tsx) with a typed column API, a visible <caption>, and scope="col"/scope="row" attributes on header cells.
  • Support optional client-side sorting: sortable columns render as a button and toggle ascending/descending, reflecting the active column via aria-sort ("ascending", "descending", or "none" on other sortable columns). Sorting is stable and never mutates the input data.
  • Adopt DataTable on the API keys page (src/app/api-keys/page.tsx) in place of the hand-rolled <ul>/<li> markup, proving the API against sortable label/created-at columns and a non-sortable actions column.
  • Document the component in docs/components.md with prop tables and a usage example.

Related Issue

Closes #189

Screenshot

0

Why

List rendering was hand-rolled and inconsistent across src/app/services/page.tsx, src/app/events/page.tsx, and src/app/api-keys/page.tsx, each with its own markup and header semantics. A shared table primitive makes column behavior (alignment, row/column headers, sorting, aria-sort) consistent and reusable across future list pages.

Test plan

  • npm run lint
  • npm test (810 passed, 2 skipped, including 16 new tests in src/components/__tests__/DataTable.test.tsx covering caption rendering, scope attributes, row-header vs. td cells, non-sortable columns (no button, no aria-sort), ascending/descending toggling, switching sort columns, numeric vs. lexicographic sorting, stable sort on ties, defaultSortKey/defaultSortDirection, empty data, row/index pass-through, alignment classes, and custom wrapper className)
  • npm run build
  • Existing src/app/api-keys/page.test.tsx suite passes unchanged against the new table markup

@El-swaggerito
El-swaggerito merged commit be4b34f into Axionvera:main Jul 23, 2026
2 checks passed
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.

2 participants