Skip to content

Extensible display_hook#212

Open
th-jyu wants to merge 3 commits intoshotgunsoftware:masterfrom
Treehouse-Digital:display-hook
Open

Extensible display_hook#212
th-jyu wants to merge 3 commits intoshotgunsoftware:masterfrom
Treehouse-Digital:display-hook

Conversation

@th-jyu
Copy link
Contributor

@th-jyu th-jyu commented Feb 6, 2026

Add ability to customise the button text, menu and action names/properties using a hook instead.

Current implementation imitates existing behaviour without changes to any currently authored configs or settings

Added

  • display config dict with hook and optional settings
  • MultiPublish2.display_hook get-only property to expose display:hook instance

Changed

  • Migrated menu name and properties setup in MultiPublish2 (app.py) into display:hook.menu_name and display:hook.menu_properties and switched to call them
  • Migrated AppDialog._display_action_name logic into display:hook.action_name and switched to call it
  • Switched text used for AppDialog.ui.publish to use display:hook.button_name
    • which continues to use display:hook.action_name

@codecov
Copy link

codecov bot commented Feb 6, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.42%. Comparing base (4ef9e61) to head (f6c36a8).

Files with missing lines Patch % Lines
hooks/display_hook.py 92.59% 2 Missing ⚠️
python/tk_multi_publish2/dialog.py 0.00% 2 Missing ⚠️
python/tk_multi_publish2/__init__.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #212      +/-   ##
==========================================
+ Coverage   40.19%   40.42%   +0.23%     
==========================================
  Files          61       62       +1     
  Lines        5026     5049      +23     
==========================================
+ Hits         2020     2041      +21     
- Misses       3006     3008       +2     
Flag Coverage Δ
Linux 40.42% <85.71%> (+0.23%) ⬆️
Python-3.10 40.42% <85.71%> (+0.23%) ⬆️
Python-3.11 40.42% <85.71%> (+0.23%) ⬆️
Python-3.13 40.42% <85.71%> (+0.23%) ⬆️
Python-3.9 40.43% <85.71%> (+0.23%) ⬆️
Windows 40.42% <85.71%> (+0.23%) ⬆️
macOS 40.42% <85.71%> (+0.23%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@th-jyu th-jyu mentioned this pull request Feb 9, 2026
th-jyu added a commit to Treehouse-Digital/tk-multi-publish2 that referenced this pull request Feb 9, 2026
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

Comments