Skip to content

UserWarning incorrectly emitted when using negative column widths for ui.layout_columns #1704

@maxime-bodifee

Description

@maxime-bodifee

Minimal reproducible example

from shiny import App, render, ui

app_ui = ui.page_fluid(
    ui.layout_columns(
        ui.output_text("greeting"),
        col_widths=(-1, 1),
    ),
)

def server(inputs, outputs, session):
    @render.text
    def greeting():
        return "Hello, world!"

app = App(app_ui, server)

Output
UserWarning: More column widths than children at breakpoint 'sm', extra widths will be ignored.

Expected output
No warning, as negative widths shouldn't be counted when comparing the number of widths vs. the number of children

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions