Skip to content

Ensure configured Design overrides Template default - #8388

Merged
philippjfr merged 2 commits into
mainfrom
template_design_init
Jan 26, 2026
Merged

Ensure configured Design overrides Template default#8388
philippjfr merged 2 commits into
mainfrom
template_design_init

Conversation

@philippjfr

Copy link
Copy Markdown
Member

Fixes #8379

Copilot AI review requested due to automatic review settings January 26, 2026 09:51

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.design when 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.

Comment thread panel/template/base.py Outdated
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov

codecov Bot commented Jan 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 86.10%. Comparing base (0317607) to head (c2f7eb3).
⚠️ Report is 2 commits behind head on main.

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.
📢 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@philippjfr
philippjfr merged commit 7668ce8 into main Jan 26, 2026
34 of 39 checks passed
@philippjfr
philippjfr deleted the template_design_init branch January 26, 2026 12:33
@philippjfr philippjfr mentioned this pull request Jan 26, 2026
@github-actions

Copy link
Copy Markdown

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.

@github-actions github-actions Bot locked as resolved and limited conversation to collaborators May 12, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Font and icons material in golden template does not seems to be loaded in panel 1.8

2 participants