This is a living document to provide a basic overview of v2 features. After a nice end-of-year break, I'm going to work on cleaning up a lot of current code and implementing some features that have been on the table for a while. In addition, I will finally finish the documentation overhaul.
If anyone has any requests, feel free to leave them below and I will ascertain their value and place in the library.
TemplatesAllow users to define a template which acts as the base layer for constructing pages. This reduces code by letting you define colors, footers, etc across the entire menu.
[x] Add field sort options: FIRST / LAST
Add event driven template mapAdd dynamic data fields
Event HooksAllow users to hook into events and run their own functions before or after the menu function runs. Need more testing on the preferred way to implement this. Will update later.
~~Sourced PaginationAllow users to define a source (ie. JSON data) and dynamically construct pages from it based on a template. Users should be able to map JSON keys to Embed attributes. Pages should be aware of discord character limits and handle it gracefully.~~
~~MultipleChoiceMenuNew button menu that simplifies the creation of menus with multiple choices. Takes a lot of the boilerplate out of using a ButtonMenu and dynamically generates the menu behind the scenes..~~
Some thoughts: should take a list of items, can define list styles (ABC, 123, ---, ***), returns a choice value, constructs pages per item, map choices to pages or chained menus.
Misc Features
[x] Implement global config / settings for the module
[x] Rewrite session storage to work with new config
[x] Probably a Session object to store new state to replace the current dictionary model
[x] Global session handling (remove from PaginatedMenu)
[x] Implement session restore: read cache data to return a user to their previous spot in menus; save input data
[x] Menu open can take an instance?
[x] Graceful destination error handling
[x] Allow a menu to be used by any user (user request)
Polls take a template into the results page generator
[x] Fix button menus not updating on reaction remove
[x] Add support for new discord reply feature
Fallback handling for no 'Manage Message' permissionsEasier button overrides for Paginated menusExplore options for page jumps, etcFriendly way to sort / map buttons
[x] Move typevars into separate module
[x] Refactor menus to clean up some difficult-to-follow inheritance
[x] BaseMenu
[x] ButtonMenu
[x] PaginatedMenu
[x] Optional goal: easier to override BaseMenu
[x] Reorganize directories and files
[x] Migrate to Poetry
[x] Add black
[x] Add github actions to auto-blacken
[x] Add built in comprehensive test bot
[x] Add testing library support; pytest?
[x] Refactor functions where possible into more unit testable functions.
This is a living document to provide a basic overview of v2 features. After a nice end-of-year break, I'm going to work on cleaning up a lot of current code and implementing some features that have been on the table for a while. In addition, I will finally finish the documentation overhaul.
If anyone has any requests, feel free to leave them below and I will ascertain their value and place in the library.
Templates Allow users to define a template which acts as the base layer for constructing pages. This reduces code by letting you define colors, footers, etc across the entire menu.
Add event driven template mapAdd dynamic data fieldsEvent Hooks Allow users to hook into events and run their own functions before or after the menu function runs. Need more testing on the preferred way to implement this. Will update later.
Hooks: OPEN, CLOSE, SESSION_ADD, SESSION_REMOVE, UPDATE, FAIL, TIMEOUT, CANCEL API:
@before
,@after
~~Sourced Pagination Allow users to define a source (ie. JSON data) and dynamically construct pages from it based on a template. Users should be able to map JSON keys to Embed attributes. Pages should be aware of discord character limits and handle it gracefully.~~
~~MultipleChoiceMenu New button menu that simplifies the creation of menus with multiple choices. Takes a lot of the boilerplate out of using a ButtonMenu and dynamically generates the menu behind the scenes..~~
Some thoughts: should take a list of items, can define list styles (ABC, 123, ---, ***), returns a choice value, constructs pages per item, map choices to pages or chained menus.Misc Features
Polls take a template into the results page generatorreply
featureFallback handling for no 'Manage Message' permissionsEasier button overrides for Paginated menusExplore options for page jumps, etcFriendly way to sort / map buttonsblack
Documentation
Update the demo .gif