Skip to content

Use LinePaginator from bot-core #2879

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

Merged
merged 3 commits into from
Jan 31, 2024
Merged

Use LinePaginator from bot-core #2879

merged 3 commits into from
Jan 31, 2024

Conversation

shtlrs
Copy link
Member

@shtlrs shtlrs commented Jan 4, 2024

This works simply by wrapping pydis_core's LinePaginator.paginate with a method that passes the emojis to the underlying paginate method

This works in conjunction with bot-core#189 and supersedes #2682
This allows us to

  1. (Most importantly) Reuse the botcore paginator
  2. Preserve the same imports
  3. Provide a sane default for the trashcan emoji

Thanks @wookie184 for the idea to simplify the changes.

@shtlrs shtlrs added the review: do not merge The PR can be reviewed but cannot be merged now label Jan 4, 2024
@shtlrs
Copy link
Member Author

shtlrs commented Jan 4, 2024

This will need to wait for the bot-core PR to be merged in order to bump pydis-core's version & allow the tests/lint CI to pass

@shtlrs shtlrs force-pushed the use-botcore-paginator branch 4 times, most recently from d627526 to aa556a7 Compare January 4, 2024 16:02
@shtlrs shtlrs requested a review from wookie184 January 5, 2024 12:37
@shtlrs shtlrs force-pushed the use-botcore-paginator branch 2 times, most recently from fdee0d0 to 47156f4 Compare January 5, 2024 15:02
Copy link
Contributor

@wookie184 wookie184 left a comment

Choose a reason for hiding this comment

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

LGTM

@Xithrius Xithrius added a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) s: stalled Something is blocking further progress p: 3 - low Low Priority t: enhancement Changes or improvements to existing features labels Jan 28, 2024
Copy link
Member

@ChrisLovering ChrisLovering left a comment

Choose a reason for hiding this comment

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

@shtlrs bot-core 10.7.0 has been released now, we can merge this once that's bumped

This version contains the paginator classes
This works simply by wrapping pydis_core's LinePaginator.paginate with a method that passes the emojis to the underlying paginate method

This allows us to
1. (Most importantly) Reuse the botcore paginator
2. Preserve the same imports
3. Provide a sane default for the trashcan emoji
These have been ported to bot-core
@shtlrs shtlrs force-pushed the use-botcore-paginator branch from 3380f24 to 888c4c8 Compare January 31, 2024 13:41
@shtlrs shtlrs removed the review: do not merge The PR can be reviewed but cannot be merged now label Jan 31, 2024
@shtlrs shtlrs merged commit e5bab98 into main Jan 31, 2024
@shtlrs shtlrs deleted the use-botcore-paginator branch January 31, 2024 13:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: backend Related to internal functionality and utilities (error_handler, logging, security, utils and core) p: 3 - low Low Priority s: stalled Something is blocking further progress t: enhancement Changes or improvements to existing features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants