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

Allow adjusting templates' header height and hiding it #6125

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

ahuang11
Copy link
Contributor

@ahuang11 ahuang11 commented Dec 26, 2023

Allows adjusting header height, and if header_height='0', the header is hidden.

Use case is for nesting templates within one another (e.g. Creating a Lumen dashboard within an app's template and hiding the Lumen's template's header)

FastListTemplate 250px
image

FastListTemplate 0
image

MaterialTemplate 250px
image

MaterialTemplate 0
image

import panel as pn

pn.extension()

template = pn.template.FastListTemplate(
    header=[
        pn.Column(
            pn.widgets.TextInput(placeholder="Header", width=250),
            pn.widgets.IntInput(placeholder="Header", width=250),
            pn.widgets.FloatInput(placeholder="Header", width=250),
        ),
        pn.widgets.TextAreaInput(placeholder="Header", width=250),
    ],
    main=["Hello", "Yolo"],
    sidebar=["Sidebar", "Testing"],
    header_height="250px",
)
template.servable()

Copy link

codecov bot commented Dec 26, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (6a4d7f3) 84.67% compared to head (39ca703) 84.55%.
Report is 27 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #6125      +/-   ##
==========================================
- Coverage   84.67%   84.55%   -0.12%     
==========================================
  Files         296      296              
  Lines       44096    44322     +226     
==========================================
+ Hits        37338    37477     +139     
- Misses       6758     6845      +87     
Flag Coverage Δ
ui-tests 40.70% <50.00%> (+0.02%) ⬆️
unitexamples-tests 72.42% <100.00%> (-0.26%) ⬇️

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.

Co-authored-by: Philipp Rudiger <prudiger@anaconda.com>
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.

None yet

2 participants