Bug: Wrapping can fail in panels because effectiveWrap can be greater than panel width
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 68/100
Research direction
Search the Panels system for the effectiveWrap calculation and inspect how it is used when rendering a PanelRow with a larger WrapWidth. Reproduce the example with the 20-wide panel, then verify that wrapped lines stay within the panel width and that existing panel rendering still works.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Go
- Stars
- 234
- Forks
- 52
- PR merge metrics
- No merged PRs in 30d
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from GoMudEngine/GoMud
-
Difficulty 3/5 1-2 days Newbie friendliness 42/100
GoMudEngine/GoMud#644 ·
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
GoMudEngine/GoMud#641 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
GoMudEngine/GoMud#631 · 4 comments ·
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
GoMudEngine/GoMud#624 ·
-
enhancement
Difficulty 5/5 Over a week Newbie friendliness 35/100
GoMudEngine/GoMud#408 ·
All issues in GoMudEngine/GoMud
Similar issues
-
Difficulty 1/5 Under an hour Newbie friendliness 84/100
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
-
kind/cleanup
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
kubernetes-sigs/kueue#15947 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
sympozium-ai/sympozium#627 ·
-
priority: p3
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
googleapis/librarian#7636 ·