feat: Add a local, CI-enforced public API compatibility check for pocketpay-sdk exports#281
Merged
Conversation
…ketpay-sdk exports
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
DataTable<T>component (src/components/DataTable.tsx) with a typed column API, a visible<caption>, andscope="col"/scope="row"attributes on header cells.aria-sort("ascending","descending", or"none"on other sortable columns). Sorting is stable and never mutates the inputdata.DataTableon 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.docs/components.mdwith prop tables and a usage example.Related Issue
Closes #189
Screenshot
Why
List rendering was hand-rolled and inconsistent across
src/app/services/page.tsx,src/app/events/page.tsx, andsrc/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 lintnpm test(810 passed, 2 skipped, including 16 new tests insrc/components/__tests__/DataTable.test.tsxcovering caption rendering,scopeattributes, row-header vs.tdcells, non-sortable columns (no button, noaria-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 wrapperclassName)npm run buildsrc/app/api-keys/page.test.tsxsuite passes unchanged against the new table markup