Skip to content

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#95
TheBjoRedCraft wants to merge 7 commits intoSLNE-Development:version/1.21from
TheBjoRedCraft:feat/add-pageable-message-builder

Conversation

@TheBjoRedCraft
Copy link
Member

This pull request introduces a new DSL-based interface and its implementation for building and sending paginated messages in the surf-api-core module. The changes include defining the SurfPageableMessageBuilder interface and providing a concrete implementation, PageableMessageBuilder, which supports customization of message content, pagination, and navigation.

New DSL Interface for Paginated Messages:

  • SurfPageableMessageBuilder interface: 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 an Audience at 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:

  • PageableMessageBuilder class: Implemented the SurfPageableMessageBuilder interface, 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))

Copilot AI review requested due to automatic review settings May 19, 2025 15:31
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@TheBjoRedCraft TheBjoRedCraft self-assigned this May 19, 2025
@TheBjoRedCraft TheBjoRedCraft requested a review from twisti-dev May 19, 2025 15:33
@TheBjoRedCraft
Copy link
Member Author

@twisti-dev You have to fix the GH Action to accept PRs from forks.

@twisti-dev
Copy link
Contributor

Yes, I know that obviously, but I don’t have time right now.

@twisti-dev twisti-dev added the resolution: superseded A new PR has replaced this one label Jun 30, 2025
@twisti-dev
Copy link
Contributor

This PR has been superseded by #108

@twisti-dev twisti-dev closed this Jun 30, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

resolution: superseded A new PR has replaced this one

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants