Skip to content

feat(TeamParticipants): add image/imagedark override for team cards#7295

Merged
Rathoz merged 1 commit intomainfrom
claude/clever-bhabha
Mar 25, 2026
Merged

feat(TeamParticipants): add image/imagedark override for team cards#7295
Rathoz merged 1 commit intomainfrom
claude/clever-bhabha

Conversation

@Rathoz
Copy link
Collaborator

@Rathoz Rathoz commented Mar 23, 2026

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

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>
@Rathoz Rathoz requested a review from a team as a code owner March 23, 2026 12:30
Copilot AI review requested due to automatic review settings March 23, 2026 12:30
@Rathoz Rathoz requested a review from a team as a code owner March 23, 2026 12:30
Copy link
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.

okay if only temporary
we def need to remove this afterwards again

@Rathoz Rathoz requested review from Copilot and removed request for Copilot March 23, 2026 12:59
Copy link
Collaborator

@ElectricalBoy ElectricalBoy left a comment

Choose a reason for hiding this comment

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

definitely excited for see silver plus

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

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 TeamParticipant parsing to capture image / imagedark from wiki input.
  • Pass participant.image / participant.imagedark into 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 BlockOpponentBlockTeamContainerBlockTeam.
Comments suppressed due to low confidence (1)

lua/wikis/commons/Widget/TeamDisplay/Block.lua:78

  • legacy is still derived solely from the team template (teamTemplate.image/legacyimage). With the new image/imagedark overrides, a page can supply a non-legacy icon while legacy remains true, which applies legacy-specific CSS sizing and can distort the overridden logo. Consider computing legacy based on the chosen image source (e.g., only true when no override is provided and the selected image comes from legacyimage).
	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.

@Rathoz Rathoz merged commit f4c1f5a into main Mar 25, 2026
12 checks passed
@Rathoz Rathoz deleted the claude/clever-bhabha branch March 25, 2026 16:11
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.

5 participants