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

Central Pagination System, take 2. #32

Draft
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

Andre601
Copy link

Pull Request

Pull Request Checklist

Please follow the following steps before opening this PR.

PRs that do not complete the checklist will be subject to denial for
missing information.

Pull Request Information

Check and fill in the blanks for all that apply:

  • My PR fixes a bug, error, or other issue with the library's codebase.
  • My PR is for the menu module of the JDA-Utilities library.
  • My PR creates a new module for the JDA-Utilities library: ______.

Description

This PR implements a central PaginationHandler class which as the name suggests will be used to handle the pagination of the various menus in a more general way.

I wasn't too happy with my previous attempt (#29) so I decided to redo it. The main difference is, that this system is now in a completely separate package called pw.chew.jdachewtils.menu. This was the easiest way for me to not have major breaking changes that could frustrate the end user when updating.

I also made a central Builder interface instead of an abstract class... Not to sure about that one tbh, but it feels cleaner than the abstract stuff.

To-Do

  • Copy all menus over that can be supported by the PaginationHandler.
    • ButtonMenu Cannot be supported due to it allowing multiple buttons/reactions
    • EmbedPaginator
    • OrderedMenu Not doable due to its more complex handling of things
    • Paginator
    • SelectionDialog Seems a bit too complicated for the simple PaginationHandler to.. handle
    • Slideshow

@Chew Chew linked an issue Nov 22, 2021 that may be closed by this pull request
6 tasks
@Chew Chew added the module: menu Menu module label Feb 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: menu Menu module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

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