Skip to content

Panel not respecting IOverflowable #1940

Description

@phil-scott-78

Given this

var markup = new Markup("[yellow]foo[/] [red]pneumonoultramicroscopicsilicovolcanoconiosis[/] [blue]bar qux[/]")
    .Overflow(Overflow.Ellipsis);
var panel = new Panel(markup)
{
    Width = 20,
};

// When
AnsiConsole.Write(panel);

I'm seeing

┌───────────────────────────────────────────────────────────┐
│ foo pneumonoultramicroscopicsilicovolcanoconiosis bar qux │
└───────────────────────────────────────────────────────────┘

Expected

┌──────────────────┐
│ foo              │
│ pneumonoultrami… │
│ bar qux          │
└──────────────────┘

I have a fix, just want to make sure this is an actual bug or designed behavior with panels

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions