feat: add pageable message builder interface and implementation#95
Closed
TheBjoRedCraft wants to merge 7 commits intoSLNE-Development:version/1.21from
TheBjoRedCraft:feat/add-pageable-message-builder
Closed
feat: add pageable message builder interface and implementation#95TheBjoRedCraft wants to merge 7 commits intoSLNE-Development:version/1.21from TheBjoRedCraft:feat/add-pageable-message-builder
TheBjoRedCraft wants to merge 7 commits intoSLNE-Development:version/1.21from
TheBjoRedCraft:feat/add-pageable-message-builder
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new DSL-based interface for paginated messages along with its concrete implementation.
- Added SurfPageableMessageBuilder interface with DSL methods for title and content lines.
- Implemented PageableMessageBuilder providing functionalities for pagination and navigation.
Reviewed Changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| surf-api-core/surf-api-core-api/src/main/kotlin/dev/slne/surf/surfapi/core/api/messages/builder/SurfPageableMessageImpl.kt | Implements paginated message rendering including a navigation component and error handling for page bounds. |
| surf-api-core/surf-api-core-api/src/main/kotlin/dev/slne/surf/surfapi/core/api/messages/builder/SurfPageableMessageBuilder.kt | Adds DSL interface for building paginated messages with configuration for title, content lines, and page command. |
...i/src/main/kotlin/dev/slne/surf/surfapi/core/api/messages/builder/SurfPageableMessageImpl.kt
Outdated
Show resolved
Hide resolved
…rImpl and add click event handling
Member
Author
|
@twisti-dev You have to fix the GH Action to accept PRs from forks. |
Contributor
|
Yes, I know that obviously, but I don’t have time right now. |
Contributor
|
This PR has been superseded by #108 |
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 DSL-based interface and its implementation for building and sending paginated messages in the
surf-api-coremodule. The changes include defining theSurfPageableMessageBuilderinterface and providing a concrete implementation,PageableMessageBuilder, which supports customization of message content, pagination, and navigation.New DSL Interface for Paginated Messages:
SurfPageableMessageBuilderinterface: Added a DSL interface to define paginated messages, allowing customization of lines per page, page navigation commands, message title, and content lines. It also includes a method to send messages to anAudienceat a specific page. ([surf-api-core/surf-api-core-api/src/main/kotlin/dev/slne/surf/surfapi/core/api/messages/builder/SurfPageableMessageBuilder.ktR1-R60](https://github.com/SLNE-Development/surf-api/pull/95/files#diff-896975cf4975132a2d217513118a4812f77c5baa8fcdab404a5d36d2a39a8d69R1-R60))Implementation of Paginated Messages:
PageableMessageBuilderclass: Implemented theSurfPageableMessageBuilderinterface, providing functionality for managing message content, calculating pagination, and rendering navigation buttons. It includes methods for setting the title, adding content lines, and sending paginated messages with error handling for invalid page numbers. ([surf-api-core/surf-api-core-api/src/main/kotlin/dev/slne/surf/surfapi/core/api/messages/builder/SurfPageableMessageImpl.ktR1-R95](https://github.com/SLNE-Development/surf-api/pull/95/files#diff-81fa4ff54e1e2ff90436e88f527d9372b1bdcc54d41fd7655960ecb225ece01fR1-R95))