Skip to content

Use terminal width for top-level constraints #719

Open
@mattprecious

Description

@mattprecious

Unless something in the tree applies a width modifier or adjusts constraints in a custom Layout, the maxWidth will default to Infinity.

I think it would be a quality-of-life improvement to default this to the terminal width if available. Rendering beyond the terminal width will usually result in an unintentional wrap which breaks mosaic's render/reset loop.

Note: Text will currently throw an exception if measured at a width smaller than its intrinsic width, so I don't know if this change can be made without also doing something about text overflow.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions