Skip to content

Conversation

poteminr
Copy link

I created a new type of Paginator: InlineKeyboardSimplePaginator. It can be used for turning pages in a circle.

Basic InlineKeyboardPaginator is too complex for creating a small app where we need to go through pages and not think about other pages, their numbers. (for example, a list of university assignments for Tuesday).

Format of keyboard (three buttons) :
‹‹ {current_page}/{page_count} ››
e.g.
‹‹ 11/15 ››

Later I can extend the functionality of InlineKeyboardSimplePaginator.

So I customised InlineKeyboardPaginator for my project and decided to make a PR. It can be useful for other users.

@ksinn
Copy link
Owner

ksinn commented May 6, 2022

Thank you for sharing your pagination. I'll gladly accept your pull request if you make a few changes.

  1. I noticed that the InlineKeyboardSimplePaginator is made as a copy of the InlineKeyboardPaginator with the necessary methods changed. It would be better to fix on inheritance with overriding;
  2. Please, for the convenience of other users, in addition to an example, add a description and screenshots for InlineKeyboardSimplePaginator to README.md.

@poteminr
Copy link
Author

poteminr commented May 6, 2022

Sounds reasonable. I'm going to do it :)

@poteminr
Copy link
Author

poteminr commented May 7, 2022

@ksinn New images from README.md will be available after uploading on examples/media folder.

@poteminr
Copy link
Author

@ksinn What about Pull Request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants