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

Fix and improve polls #147

Merged
merged 17 commits into from
Mar 29, 2024
Merged

Fix and improve polls #147

merged 17 commits into from
Mar 29, 2024

Conversation

AiroPi
Copy link
Member

@AiroPi AiroPi commented Mar 23, 2024

Refactor a little the whole view and menu system, allowing awaitable __init__().

Also added 3 new colors, to allow up to 10 choices.
Fixed a bug when we tried to add more choices than possible.
Added some icons to improve the UI of poll creation.
Fixed an i18n bug when an empty tring is passed to the i18n function.

But, I noticed that I don't use any asynchrone in my Menu constructors. So async init are not necessary anymore.
Maybe synchrone constructors will be used at term.
and fix a bug when we tried to add more than 7 choices
commit 3559f2b
Author: Pıεяяε <[email protected]>
Date:   Sun Mar 24 00:30:12 2024 +0100

    Add toml type info for the config file (#145)

    Co-authored-by: Nicolas Paul <[email protected]>

commit f5b2eb5
Author: Pıεяяε <[email protected]>
Date:   Sun Mar 24 00:17:53 2024 +0100

    Improve the debbugging (#146)

    - use init to run the bot on PID 1. This make the bot stop in less than a second, while it stop within 10s otherwise.
    - update the debug config files for vscode, because I figured out why it wasn't working this way before (added a wait instruction)
@nc0fr can you review this docstring ?
There is still an issue with timeout superpositions.
SubMenu is now a "base class". ModalSubMenu inherit from SubMenu. If buttons are needed, classes must also inherit from SubMenuDefaultButtonsMixin.
@AiroPi AiroPi merged commit be4fd92 into master Mar 29, 2024
2 checks passed
@AiroPi AiroPi deleted the fix/poll branch March 29, 2024 00:27
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.

1 participant