Skip to content

feat: Backport Team Pokémon Overview feature to stable addon#299

Open
Unlucky-Life wants to merge 2 commits intomainfrom
team_overview_in_deck_overview_feat
Open

feat: Backport Team Pokémon Overview feature to stable addon#299
Unlucky-Life wants to merge 2 commits intomainfrom
team_overview_in_deck_overview_feat

Conversation

@Unlucky-Life
Copy link
Collaborator

  • Introduced a new module overview_team.py to build and inject a Pokémon team grid into the Deck Browser and Deck Overview pages.
  • Added hooks for rendering the team grid in both views, gated by a new user setting gui.team_deck_view.
  • Implemented a settings toggle in the "Styling" group, with defaults set in config.json and settings.py.
  • Enhanced resource management by adding pokeball_path and a utility function png_to_base64 for embedding images.
  • Ensured graceful failure when data files are missing, preventing crashes.
  • Updated language files for internationalization support of the new setting.
  • Created an empty __init__.py to make gui_classes a proper Python package.
  • Comprehensive testing checklist included to verify functionality and stability.
image

Unlucky-Life and others added 2 commits February 6, 2026 03:31
- Introduced a new module `overview_team.py` to build and inject a Pokémon team grid into the Deck Browser and Deck Overview pages.
- Added hooks for rendering the team grid in both views, gated by a new user setting `gui.team_deck_view`.
- Implemented a settings toggle in the "Styling" group, with defaults set in `config.json` and `settings.py`.
- Enhanced resource management by adding `pokeball_path` and a utility function `png_to_base64` for embedding images.
- Ensured graceful failure when data files are missing, preventing crashes.
- Updated language files for internationalization support of the new setting.
- Created an empty `__init__.py` to make `gui_classes` a proper Python package.
- Comprehensive testing checklist included to verify functionality and stability.
Copy link
Owner

@h0tp-ftw h0tp-ftw left a comment

Choose a reason for hiding this comment

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

This is our first time dealing with the Decks overview GUI, which is used by many addons. Would like to know from @thepeacemonk if this kind of implementation suits their or other GUI addons.

:pyobj:`aqt.gui_hooks.overview_will_render_content`.

Args:
overview: The :class:`aqt.overview.Overview` instance.
Copy link
Owner

Choose a reason for hiding this comment

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

needs restart, might be worth it to put a restart for changes to take effect in settings

mw.translator = translator
mw.settings_obj = settings_obj

from .gui_classes.overview_team import *
Copy link
Owner

Choose a reason for hiding this comment

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

axil will get mad at me

effectiveness_chart_file_path = addon_dir / "addon_files" / "eff_chart.json"
table_gen_id_html_path = addon_dir / "addon_files" / "table_gen_id.html"
icon_path = addon_dir / "addon_files" / "pokeball.png"
pokeball_path = addon_dir / "addon_files" / "pokeball.png"
Copy link
Owner

Choose a reason for hiding this comment

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

Suggested change
pokeball_path = addon_dir / "addon_files" / "pokeball.png"

Copy link
Owner

Choose a reason for hiding this comment

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

redundant with icon_path above

Copy link
Owner

Choose a reason for hiding this comment

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

ideally every pokeball_path mention should be changed to icon_path or v.v.

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