Pagination component#90
Merged
Merged
Conversation
…evious and next page link
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new Pagination feature set to the BitBlazor component library, including the core BitPagination component, its BitPageItem subcomponent, supporting enums/state types, plus Stories and bUnit test coverage.
Changes:
- Added
BitPagination+BitPageItemcomponents with full/simple view modes, optional ellipsis, jump-to-page, templates, and alignment support. - Added supporting types:
PaginationAlignment,PaginationViewMode, andPaginationState. - Added rendering/behavior tests and a Stories page; updated
BitBlazor.csprojto expose internals to the test assembly.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/BitBlazor.Test/Components/Pagination/BitPaginationTest.Rendering.razor | Adds markup-based rendering coverage for default/alignment/disabled/templates/jump-to-page/simple mode. |
| tests/BitBlazor.Test/Components/Pagination/BitPaginationTest.Behaviors.cs | Adds interaction tests for clicking pages/prev/next, ellipsis sequencing, and jump-to-page behavior. |
| stories/BitBlazor.Stories/Components/Stories/Components/BitPagination.stories.razor | Introduces Storybook examples demonstrating the new pagination API and templates. |
| src/BitBlazor/Components/Pagination/PaginationViewMode.cs | Adds view-mode enum (Default vs Simple). |
| src/BitBlazor/Components/Pagination/PaginationState.cs | Adds a small state struct for current/total pages and helper flags. |
| src/BitBlazor/Components/Pagination/PaginationAlignment.cs | Adds alignment enum for left/center/right layout. |
| src/BitBlazor/Components/Pagination/BitPagination.razor.cs | Implements pagination logic, page sequencing, alignment classes, and jump-to-page behavior. |
| src/BitBlazor/Components/Pagination/BitPagination.razor | Implements pagination markup and templating (full/simple mode, jump-to-page, total items). |
| src/BitBlazor/Components/Pagination/BitPageItem.razor.cs | Implements page item behavior, current-page ARIA state, and disabled attributes. |
| src/BitBlazor/Components/Pagination/BitPageItem.razor | Renders the clickable page item anchor used by the pagination component. |
| src/BitBlazor/BitBlazor.csproj | Adds InternalsVisibleTo for BitBlazor.Test. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…documentation file
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.
This pull request introduces a new, fully-featured pagination component to the BitBlazor library, including all supporting types and documentation. The changes add both the main
BitPaginationcomponent and the supportingBitPageItemsubcomponent, as well as enums and state structures to control pagination behavior and appearance. The code is well-documented and includes support for accessibility, custom templates, and advanced features like jump-to-page and different view modes.New Pagination Component Implementation
BitPaginationcomponent (BitPagination.razorand.razor.cs) with support for customizable page navigation, alignment, templates, accessibility features, and advanced options like jump-to-page and simple/full view modes. [1] [2]BitPageItemsubcomponent (BitPageItem.razorand.razor.cs) to represent individual page links, managing accessibility attributes and click handling. [1] [2]Supporting Types and Enums
PaginationAlignmentenum to specify left, center, or right alignment of pagination controls.PaginationViewModeenum to switch between default (full) and simple pagination UI modes.PaginationStaterecord struct to encapsulate current page and total pages, with helpers for first/last page detection.Project Configuration
BitBlazor.csproj) to make internals visible to the test project, enabling better unit testing of internal components.