pycord icon indicating copy to clipboard operation
pycord copied to clipboard

feat(ext.pages): Add `use_styled_buttons`

Open Nzii3 opened this issue 2 years ago • 11 comments

Summary

Adds use_styled_buttons in ext.pages.Paginator which essentially styles buttons with emojis by using a single parameter. Overwrites use_default_buttons when used in the Paginator __init__.

Information

  • [ ] This PR fixes an issue.
  • [x] This PR adds something new (e.g. new method or parameters).
  • [ ] This PR is a breaking change (e.g. methods or parameters removed/renamed).
  • [ ] This PR is not a code change (e.g. documentation, README, typehinting, examples, ...).

Checklist

  • [x] I have searched the open pull requests for duplicates.
  • [x] If code changes were made then they have been tested.
    • [x] I have updated the documentation to reflect the changes.
  • [x] If type: ignore comments were used, a comment is also left explaining why.

Nzii3 avatar Nov 30 '22 00:11 Nzii3

Example code:

from discord.ext.pages import Paginator
pages = ['1', '2', '3']
paginator = Paginator(pages=pages, use_styled_buttons=True)
await paginator.respond(ctx)

Output: image

Nzii3 avatar Nov 30 '22 00:11 Nzii3

I like how the ci fails again

Lulalaby avatar Nov 30 '22 00:11 Lulalaby

I like how the ci fails again

@Lulalaby it doesn’t like me :/

Nzii3 avatar Nov 30 '22 00:11 Nzii3

No worries. Is fixed. Please address the requested changes.

Lulalaby avatar Nov 30 '22 00:11 Lulalaby

Added changes 👍

Nzii3 avatar Nov 30 '22 01:11 Nzii3

I don't even question anymore how you've managed to let the ci fail two more times just by applying the string changes

Lulalaby avatar Nov 30 '22 01:11 Lulalaby

I don't even question anymore how you've managed to let the ci fail two more times just by applying the string changes

CI sometimes fails when a new build is triggered while the previous isn't finished

BobDotCom avatar Nov 30 '22 04:11 BobDotCom

In addition to the other comments, please add a changelog entry for both the new params and new method.

Done.

Nzii3 avatar Dec 01 '22 05:12 Nzii3

Should I add #1818 into this pr for v2.4?

Nzii3 avatar Dec 06 '22 01:12 Nzii3

Should I add #1818 into this pr for v2.4?

Personally I would prefer this

Lulalaby avatar Dec 06 '22 01:12 Lulalaby

Please add a changelog entry

pullapprove4[bot] avatar Jul 27 '23 15:07 pullapprove4[bot]

@Nzii3 trash?

Lulalaby avatar Aug 10 '24 11:08 Lulalaby

@Nzii3 trash?

@Lulalaby yes

Nzii3 avatar Aug 11 '24 17:08 Nzii3