Skip to content

Consider making page_fillable() the default for shiny.express #846

@cpsievert

Description

@cpsievert

This way, top-level fill items like plots, cards, or widgets, will fill the page how you might expect them to, for example:

from shiny import render, ui
from shiny.express import input, layout

# This could go away
# layout.set_page(layout.page_fillable())

@render.plot
def hist():
    import matplotlib.pyplot as plt
    import seaborn as sns
    df = sns.load_dataset("penguins")
    fig, ax = plt.subplots()
    sns.histplot(df, x="bill_length_mm", hue="species", ax=ax)
    return fig

Another benefit of doing this is that we might not have to change the page layout for a top-level with layout.sidebar():

Screenshot 2023-12-05 at 3 35 26 PM

BTW, @wch, the last line in that screenshot should be layout.set_page(layout.page_fixed())

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions