Skip to content

fix(match2): showsinglematch overwrites default width for match summaries#7545

Open
ElectricalBoy wants to merge 4 commits into
mainfrom
fix-showsinglematch-width-overwritten
Open

fix(match2): showsinglematch overwrites default width for match summaries#7545
ElectricalBoy wants to merge 4 commits into
mainfrom
fix-showsinglematch-width-overwritten

Conversation

@ElectricalBoy
Copy link
Copy Markdown
Collaborator

@ElectricalBoy ElectricalBoy commented May 23, 2026

Summary

Reported on discord: https://discord.com/channels/93055209017729024/684060921898860569/1507375882845687851

Regression from #7465

SingleMatch display has a fallback width of 400 hardcoded as shown below:

width = propsConfig.width or 400,

This is problematic for any wiki that defines a default width other than 400 (e.g., VAL using default of 500px) in their Module:MatchSummary as the wiki default gets overwritten by the 400 shown above.

This PR adjusts the width parsing to respect the wiki default, while keeping the fallback of 400.

How did you test this change?

preview with dev

@ElectricalBoy ElectricalBoy requested review from a team as code owners May 23, 2026 04:18
Copy link
Copy Markdown
Collaborator

@hjpalpha hjpalpha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm modulo question in comment

---Display component for a match in a singleMatch. Consists of the match summary.
---@param props {MatchSummaryContainer: function, match: MatchGroupUtilMatch, width: string|integer?}
---@return Widget|Html
function SingleMatchDisplay.Match(props)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did you check this isn't called anywhere?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

definitely not in Git-maintained modules
and non-Git modules should be using entrypoints defined in Module:MatchGroup anyway

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants