Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First start at a central paginator system #29

Closed

Conversation

Andre601
Copy link

@Andre601 Andre601 commented Oct 4, 2021

Pull Request

Pull Request Information

Check and fill in the blanks for all that apply:

My PR is for the Menu module of the JDA-Utilities library.

Description

This is my initial PR on a Button-based Paginator system.
It puts the entire pagination handling into a new class called the PaginationHandler which will be the new main place for pagination to be handled.

The plan is, that the menus will call new PaginationHandler(<values>).displayWithButtons(MessageChannel) to display a new paginable menu.. Either with buttons or the old-school reaction.

To-do

  • Add support for Reactions
  • Maybe: Find a way for a more generic event handling. Essentially have one method for both ButtonClickEvent and MessageRactionAddEvent.... They seem to be incompatible tho and simple instanceof checks won't do it....
  • Deprecate stuff like all the Strings for Unicode in the different menu classes and mention to switch to the new central strings to use...
  • Something else I completely forgot....

@Chew Chew linked an issue Oct 4, 2021 that may be closed by this pull request
6 tasks
@Chew Chew added the enhancement New feature or request label Nov 2, 2021
@Andre601
Copy link
Author

Andre601 commented Nov 8, 2021

Did some more work on the entire pagination stuff...
The main thing I did was adding a PaginationButton sub-class in the Handler to have a more easy way of handling both reactions and buttons in terms of Emotes/Emojis.

I think the stuff should be in a usable state now, but it would require to move the handling of the different menus to the main paginator, make sure there isn't any conflicts and then test it....

@Andre601 Andre601 closed this Nov 11, 2021
@Andre601 Andre601 deleted the feature/central-paginator-system branch November 11, 2021 16:36
@Andre601
Copy link
Author

I decided to start this one again from scratch with a different aproach.

@Andre601 Andre601 mentioned this pull request Nov 11, 2021
12 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Suggestion] Include support for Discord's buttons for pagination
2 participants