Skip to content

refactor: remove direct calls to mw.ext.teamtemplate#6624

Merged
Rathoz merged 15 commits into
mainfrom
clean-up-teamtemplate-call
Jul 6, 2026
Merged

refactor: remove direct calls to mw.ext.teamtemplate#6624
Rathoz merged 15 commits into
mainfrom
clean-up-teamtemplate-call

Conversation

@ElectricalBoy

@ElectricalBoy ElectricalBoy commented Oct 4, 2025

Copy link
Copy Markdown
Collaborator

Summary

Resolves #6496

How did you test this change?

preview with dev

Comment thread lua/wikis/ageofempires/MatchGroup/Input/Custom.lua Outdated
Comment thread lua/wikis/pubg/Infobox/Person/Player/Custom.lua Outdated
@ElectricalBoy ElectricalBoy force-pushed the clean-up-teamtemplate-call branch from 95bdcad to 06dba9d Compare December 8, 2025 00:11
@ElectricalBoy ElectricalBoy force-pushed the clean-up-teamtemplate-call branch 2 times, most recently from 5191630 to 34ef3d9 Compare December 27, 2025 08:13
@Rathoz

Rathoz commented Mar 5, 2026

Copy link
Copy Markdown
Collaborator

Status?

@ElectricalBoy

ElectricalBoy commented Mar 6, 2026

Copy link
Copy Markdown
Collaborator Author

iirc technically finished but remains untested
meaning time to start tests after a rebase

@ElectricalBoy ElectricalBoy force-pushed the clean-up-teamtemplate-call branch from 6f391b3 to dd2d809 Compare March 6, 2026 00:43
@ElectricalBoy ElectricalBoy marked this pull request as ready for review March 6, 2026 00:59
@ElectricalBoy ElectricalBoy requested review from a team as code owners March 6, 2026 00:59
Comment thread lua/wikis/commons/Ratings.lua Outdated
Comment thread lua/wikis/commons/Infobox/Person.lua Outdated
@Rathoz

Rathoz commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

merge conflict

@ElectricalBoy ElectricalBoy force-pushed the clean-up-teamtemplate-call branch from 4782b4a to 33e5e6b Compare July 6, 2026 02:52

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR addresses issue #6496 by refactoring Lua modules to avoid direct calls to mw.ext.TeamTemplate APIs, routing team lookups/display through Module:TeamTemplate and Module:OpponentDisplay/Custom instead.

Changes:

  • Replaced mw.ext.TeamTemplate.* calls (e.g., teampage, raw, teamexists, team, teamicon) with TeamTemplate.* wrappers and OpponentDisplay.InlineTeamContainer.
  • Adjusted infobox “favorite teams” rendering to return/render VNode arrays instead of concatenated wikitext strings.
  • Updated Module:TeamTemplate helpers (e.g., getPageName signature, getRawOrNil empty-input handling) to support the new call patterns.

Reviewed changes

Copilot reviewed 51 out of 51 changed files in this pull request and generated 18 comments.

Show a summary per file
File Description
lua/wikis/zula/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/wildrift/Infobox/Person/Player/Custom.lua Use TeamTemplate.getPageName for LPDB team2.
lua/wikis/trackmania/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/squadrons/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/splatoon/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/sideswipe/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/runeterra/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/rocketleague/Ratings/Display/List.lua Replace team display with OpponentDisplay.InlineTeamContainer.
lua/wikis/rocketleague/Ratings/Display.lua Use TeamTemplate existence/raw access for short names.
lua/wikis/rocketleague/Infobox/Person/Player/Custom.lua Use TeamTemplate.exists for invalid-team categorization.
lua/wikis/rainbowsix/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/pubgmobile/Infobox/Person/Player/Custom.lua Use TeamTemplate.getPageName for LPDB team2.
lua/wikis/pubg/Infobox/Person/Player/Custom.lua Use TeamTemplate.getPageName for LPDB team2.
lua/wikis/overwatch/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/overwatch/Infobox/Person/User/Custom.lua Align favorite-team widget children shape with new return type.
lua/wikis/overwatch/Infobox/Person/Player/Custom.lua Use TeamTemplate.getPageName for LPDB team2.
lua/wikis/leagueoflegends/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/halo/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/freefire/Infobox/Person/Player/Custom.lua Use TeamTemplate.getPageName (with fallback) for LPDB team2.
lua/wikis/formula1/PortalPlayers/Custom.lua Use TeamTemplate.exists for team widget display gating.
lua/wikis/esports/Widget/EwcTeamsOverview.lua Replace team wikitext with OpponentDisplay.InlineTeamContainer.
lua/wikis/easportsfc/PortalPlayers/Custom.lua Use TeamTemplate.exists for team widget display gating.
lua/wikis/dota2/Infobox/Person/User/Custom.lua Align favorite-team widget children shape with new return type.
lua/wikis/crossfire/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/criticalops/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/counterstrike/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/commons/TransferRow.lua Use TeamTemplate.getRawOrNil for transfer team lookup by date.
lua/wikis/commons/TransferList.lua Use TeamTemplate.exists/noTeamMessage/queryHistoricalNames for team sets.
lua/wikis/commons/TeamTemplate.lua Adjust TeamTemplate helpers used by refactor (page name lookup + empty guard).
lua/wikis/commons/TeamLogoGallery.lua Use TeamTemplate.exists/getRaw and centralized missing-team messaging.
lua/wikis/commons/Standings/Storage.lua Use TeamTemplate.exists/getRaw for standings team resolution.
lua/wikis/commons/Service/Team.lua Use TeamTemplate.getRawOrNil instead of extension checks.
lua/wikis/commons/SeriesMedalStats/ParticipantTeam.lua Use OpponentDisplay and TeamTemplate.getRawOrNil for team resolution/display.
lua/wikis/commons/SeriesMedalStats/Participant.lua Use TeamTemplate.getRawOrNil for team resolution.
lua/wikis/commons/Ratings.lua Refactor team transfer logic away from mw.ext.TeamTemplate.
lua/wikis/commons/PrizePool/Placement.lua Use TeamTemplate.getRawOrNil for logo fields.
lua/wikis/commons/PrizePool/Award/Placement.lua Use TeamTemplate.getRawOrNil for participant/team fields.
lua/wikis/commons/PortalPlayers.lua Use TeamTemplate.exists for team widget display gating.
lua/wikis/commons/PlayerIntroduction.lua Use TeamTemplate.getRawOrNil for team display by date.
lua/wikis/commons/Infobox/Person/User/Custom.lua Align favorite-team widget children shape with new return type.
lua/wikis/commons/Infobox/Person/User.lua Return favorite teams as VNode list via OpponentDisplay.
lua/wikis/commons/Infobox/Person.lua Use TeamTemplate + OpponentDisplay for team icons/name header rendering.
lua/wikis/commons/AutomaticPointsTable/MinifiedDisplay.lua Replace team wikitext with OpponentDisplay.InlineTeamContainer.
lua/wikis/commons/AutomaticPointsTable/Display.lua Replace team wikitext with OpponentDisplay.InlineTeamContainer.
lua/wikis/callofduty/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/brawlstars/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/battalion/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/arenafps/Match/Legacy.lua Switch match opponent team resolution off mw.ext.TeamTemplate.
lua/wikis/apexlegends/Infobox/Person/Player/Custom.lua Use TeamTemplate.getPageName for LPDB team2.
lua/wikis/ageofempires/MatchGroup/Input/Custom.lua Use TeamTemplate.getRawOrNil for team page lookup.
lua/wikis/ageofempires/Match/Legacy.lua Switch team page extraction off mw.ext.TeamTemplate.raw.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lua/wikis/commons/Ratings.lua
Comment thread lua/wikis/trackmania/Match/Legacy.lua
Comment thread lua/wikis/rainbowsix/Match/Legacy.lua
Comment thread lua/wikis/halo/Match/Legacy.lua
Comment thread lua/wikis/leagueoflegends/Match/Legacy.lua
Comment thread lua/wikis/battalion/Match/Legacy.lua
Comment thread lua/wikis/arenafps/Match/Legacy.lua
Comment thread lua/wikis/zula/Match/Legacy.lua
Comment thread lua/wikis/criticalops/Match/Legacy.lua
Comment thread lua/wikis/counterstrike/Match/Legacy.lua
@ElectricalBoy ElectricalBoy requested a review from Rathoz July 6, 2026 09:59
@Rathoz Rathoz merged commit b9b1f61 into main Jul 6, 2026
8 checks passed
@Rathoz Rathoz deleted the clean-up-teamtemplate-call branch July 6, 2026 10:05
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.

Cleanup: Remove direct calls to mw.ext.teamtemplate

5 participants