feat(TeamParticipants): add image/imagedark override for team cards#7295
Merged
feat(TeamParticipants): add image/imagedark override for team cards#7295
Conversation
Allow manually setting team logos on participant cards via |image= and |imagedark= parameters, overriding the TeamTemplate-fetched logos. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
hjpalpha
approved these changes
Mar 23, 2026
Collaborator
hjpalpha
left a comment
There was a problem hiding this comment.
okay if only temporary
we def need to remove this afterwards again
ElectricalBoy
approved these changes
Mar 23, 2026
Collaborator
ElectricalBoy
left a comment
There was a problem hiding this comment.
definitely excited for see silver plus
Contributor
There was a problem hiding this comment.
Pull request overview
Adds support for manually overriding team logos on TeamParticipants “team cards” by threading image / imagedark from wiki input through participant parsing and into the team block rendering, taking precedence over TeamTemplate-provided images.
Changes:
- Extend
TeamParticipantparsing to captureimage/imagedarkfrom wiki input. - Pass
participant.image/participant.imagedarkinto the opponent/team display used by participant card headers. - Update the team block widget to prefer overridden images over TeamTemplate images.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| lua/wikis/commons/Widget/TeamDisplay/Block.lua | Prefer props.image / props.imagedark over TeamTemplate images when rendering the team icon. |
| lua/wikis/commons/Widget/Participants/Team/Header.lua | Forward per-participant image overrides into OpponentDisplay.BlockOpponent for card headers. |
| lua/wikis/commons/TeamParticipants/Parse/Wiki.lua | Parse image / imagedark from participant input into the TeamParticipant struct. |
| lua/wikis/commons/OpponentDisplay.lua | Plumb image / imagedark through BlockOpponent → BlockTeamContainer → BlockTeam. |
Comments suppressed due to low confidence (1)
lua/wikis/commons/Widget/TeamDisplay/Block.lua:78
legacyis still derived solely from the team template (teamTemplate.image/legacyimage). With the newimage/imagedarkoverrides, a page can supply a non-legacy icon whilelegacyremains true, which applies legacy-specific CSS sizing and can distort the overridden logo. Consider computinglegacybased on the chosen image source (e.g., only true when no override is provided and the selected image comes fromlegacyimage).
local imageLight = Logic.emptyOr(self.props.image, teamTemplate.image, teamTemplate.legacyimage)
local imageDark = Logic.emptyOr(self.props.imagedark, teamTemplate.imagedark, teamTemplate.legacyimagedark)
return Div{
classes = Array.extend('block-team', self.props.additionalClasses, flip and 'flipped' or nil),
children = WidgetUtil.collect(
TeamIcon{
imageLight = imageLight,
imageDark = imageDark,
page = teamTemplate.page,
legacy = Logic.isEmpty(teamTemplate.image) and Logic.isNotEmpty(teamTemplate.legacyimage),
noLink = self.props.noLink,
},
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Eetwalt
approved these changes
Mar 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Allow manually setting team logos on participant cards via |image= and |imagedark= parameters, overriding the TeamTemplate-fetched logos. This is temporary and only for see silverplus thread
How did you test this change?
dev