Conversation
| if not Namespace.isMain() then | ||
| tpArgs.store = 'false' | ||
| end | ||
|
|
||
| local parsedData = TeamParticipantsWikiParser.parseWikiInput(tpArgs) | ||
| TeamParticipantsController.importParticipants(parsedData) | ||
| TeamParticipantsController.fillIncompleteRosters(parsedData) | ||
| TeamParticipantsController.enrichPlayerDates(parsedData) | ||
|
|
||
| local shouldStore = Logic.readBoolOrNil(tpArgs.store) ~= false | ||
| and Lpdb.isStorageEnabled() | ||
| if shouldStore then | ||
| Array.forEach(parsedData.participants, TeamParticipantsRepository.save) | ||
| end | ||
| Array.forEach(parsedData.participants, TeamParticipantsRepository.setPageVars) | ||
|
|
||
| local showControls = not teamParticipantsVars:get('externalControlsRendered') | ||
|
|
||
| local display = TeamParticipantsDisplay{ | ||
| participants = parsedData.participants, | ||
| showPlayerInfo = toggleFolded.showPlayerInfo, | ||
| showControls = showControls, | ||
| } | ||
|
|
||
| teamParticipantsVars:set('externalControlsRendered', 'true') | ||
|
|
||
| local notesWidget | ||
| if #toggleFolded.notes > 0 then | ||
| notesWidget = HtmlWidgets.Div{ | ||
| classes = {'team-participant__notes'}, | ||
| children = Array.interleave(toggleFolded.notes, HtmlWidgets.Br{}), | ||
| } | ||
| end | ||
|
|
||
| return HtmlWidgets.Fragment{children = WidgetUtil.collect(notesWidget, display)} |
There was a problem hiding this comment.
Use TeamParticipantsController.fromTemplate
There was a problem hiding this comment.
This should work to reduce duplication right? I don't think I can use fromTemplate as is
There was a problem hiding this comment.
why not
you can just pass the (mapped) args table into it instead of frame
example in the sc/sc2/sg wrapper:
https://github.com/Liquipedia/Lua-Modules/pull/7481/changes#diff-69890b5b17af6198276758a2a5d06f952a126a2175cc9d5ff401c26f9d25510dR64
https://github.com/Liquipedia/Lua-Modules/pull/7481/changes#diff-69890b5b17af6198276758a2a5d06f952a126a2175cc9d5ff401c26f9d25510dR73
There was a problem hiding this comment.
Oh I guess, the anno needs updating then. Like this? 4299244
| played = false | ||
| elseif sourceGroup == 'f' and Logic.readBool(tcArgs.formerdnpdefault) then | ||
| played = false | ||
| elseif sourceGroup ~= nil and Logic.readBool(tcArgs.noVarDefault) then |
There was a problem hiding this comment.
Not sure this is the correct logic. But I'm always confused about noVarDefault
There was a problem hiding this comment.
Missing the LegacyCustom for the wiki?
There was a problem hiding this comment.
By design at the moment. We only need LegacyCustom file for wikis that need Lua-level arg rewriting (e.g. RocketLeague's sub1..3 → p1..3 aliasing). ArenaFPS uses standard TC args, so Template:TeamCard columns end invokes Module:TeamCard/Legacy|fn=run directly. We create them on-demand per wiki.
|
blocked by #7492 for smash & fighters |
Summary
Module:TeamCard/Legacythat parses legacy team-card wikitext (qualifier, notes, players, coaches, toggle/stash entries) and renders through the TeamParticipants controller pipelinetNplayer tabs with dedup, foldable toggle entries, and stash partitioning with malformed-structure surfacingLogic.isEmptyfor key normalizationHow did you test this change?
dev