Ensure configured Design overrides Template default - #8388
Conversation
There was a problem hiding this comment.
Pull request overview
This PR fixes an issue where templates with generic designs (like GoldenTemplate) were not respecting the design configured via pn.extension(design="...") in Panel 1.8. The fix ensures that when config.design is set and a template doesn't have a specific design override, the configured design is applied to the template.
Changes:
- Added logic to override template design with
config.designwhen the template uses a generic design (Design, Native, or None) - Added a test to verify that VanillaTemplate inherits the configured Material design from config
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| panel/template/base.py | Added condition in BaseTemplate.__init__ to set template design from config.design when template has generic design default; imported Native design class for the check |
| panel/tests/template/test_base.py | Added test test_template_inherits_configured_design to verify templates inherit configured design; imported Material theme class |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #8388 +/- ##
==========================================
- Coverage 86.11% 86.10% -0.02%
==========================================
Files 349 349
Lines 54833 54841 +8
==========================================
Hits 47222 47222
- Misses 7611 7619 +8 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Fixes #8379