I discovered this while adding my AddBlock into the Panels system. Take the following example:
p := makePanel("x", "X", 20, borderFull, []PanelRow{
{
ShortLabel: "A:",
FullLabel: "Alpha: ",
Value: "Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since 1966, when designers at Letraset and James Mosley, the librarian at St Bride Printing Library in London, took a 1914 Cicero translation and scrambled it to make dummy text for Letraset's Body Type sheets.",
WrapWidth: 60,
},
})
This will produce output that looks like:
┌─ X ──────────────┐
│ A: Lorem Ipsum is simply dummy text of the printing and │
│ typesetting industry. Lorem Ipsum has been the industry's│
│ standard dummy text ever since 1966, when designers at│
│ Letraset and James Mosley, the librarian at St Bride│
│ Printing Library in London, took a 1914 Cicero translation│
│ and scrambled it to make dummy text for Letraset's Body│
│ Type sheets. │
└──────────────────┘
The reason is that the panels system never checks to see if effectiveWrap fits within the panel width.
I discovered this while adding my AddBlock into the Panels system. Take the following example:
This will produce output that looks like:
The reason is that the panels system never checks to see if effectiveWrap fits within the panel width.