From bd07454c02b07398b25bd26445d5240cc63d45d8 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Mon, 11 May 2026 14:44:17 +0900 Subject: [PATCH 01/13] use assert --- lua/wikis/commons/LeagueIcon.lua | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index c577c240791..330ef7d52ed 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -193,15 +193,11 @@ end ---@return string function LeagueIcon.generate(args) local link = args.link or args.series - if String.isEmpty(link) then - error('No series/link specified') - end + assert(String.isNotEmpty(link), 'No series/link specified') local name = args.name or link local icon = args.icon - if String.isEmpty(icon) then - error('No icon file specified') - end + assert(String.isNotEmpty(icon), 'No icon file specified') local iconDark = args.iconDark or icon local imageOptions = '|link={{{1|{{{link|' .. link .. '}}}}}}|{{{name|{{{1|{{{link|' .. name .. '}}}}}}}}}|50x50px]]' From b662877afb01d8e142f5a5896b114732f97fe12a Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Mon, 11 May 2026 15:28:05 +0900 Subject: [PATCH 02/13] clean up lis code generator --- lua/spec/league_icon_spec.lua | 2 +- lua/wikis/commons/LeagueIcon.lua | 100 +++++++++++++++++++++---------- 2 files changed, 69 insertions(+), 33 deletions(-) diff --git a/lua/spec/league_icon_spec.lua b/lua/spec/league_icon_spec.lua index 455700d019a..ae5d996560c 100644 --- a/lua/spec/league_icon_spec.lua +++ b/lua/spec/league_icon_spec.lua @@ -109,7 +109,7 @@ end) insulate('LeagueIcon.generate', function() it('should generate code with valid arguments', function() local args = {icon = 'Icon.png', link = 'link', name = 'name', series = 'series'} - GoldenTest('LeagueIcon.generate_copy_paste_gen', LeagueIcon.generate(args)) + GoldenTest('LeagueIcon.generate_copy_paste_gen', tostring(LeagueIcon.generate(args))) end) it('should throw error when no link or series is provided', function() diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index 330ef7d52ed..aa82c3a2e7a 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -8,11 +8,16 @@ local Lua = require('Module:Lua') local LeagueIcon = {} +local Array = Lua.import('Module:Array') local Class = Lua.import('Module:Class') local Template = Lua.import('Module:Template') local Logic = Lua.import('Module:Logic') local String = Lua.import('Module:StringUtils') +local Html = Lua.import('Module:Widget/Html') +local Link = Lua.import('Module:Widget/Basic/Link') +local WidgetUtil = Lua.import('Module:Widget/Util') + local FILLER = '[[File:Logo filler event.png|link=]]' local NO_ICON_BUT_ICONDARK_TRACKING_CATEGORY = '[[Category:Pages with only icondark]]' @@ -79,6 +84,7 @@ function LeagueIcon.display(args) return LeagueIcon._make(icon, iconDark, link, args.name, size) .. trackingCategory end +---@private ---@param icon string ---@param iconDark string ---@param link string @@ -91,23 +97,38 @@ function LeagueIcon._make(icon, iconDark, link, name, size) icon = string.gsub(icon, '^File:', '') iconDark = string.gsub(iconDark, '^File:', '') - local imageOptions = '|link=' .. link .. '|' .. (name or link) .. '|' .. size .. 'x' .. size .. 'px]]' - if icon == iconDark then - return tostring(mw.html.create('span') - :addClass('league-icon-small-image') - :wikitext('[[File:' .. icon .. imageOptions)) + return tostring(LeagueIcon._generateWikiCode(icon, link, name, size)) end - local lightSpan = mw.html.create('span') - :addClass('league-icon-small-image lightmode') - :wikitext('[[File:' .. icon .. imageOptions) - local darkSpan = mw.html.create('span') - :addClass('league-icon-small-image darkmode') - :wikitext('[[File:' .. iconDark .. imageOptions) + local lightSpan = LeagueIcon._generateWikiCode(icon, link, name, size, 'lightmode') + local darkSpan = LeagueIcon._generateWikiCode(icon, link, name, size, 'darkmode') return tostring(lightSpan) .. tostring(darkSpan) end +---@private +---@param icon string +---@param link string +---@param name string +---@param size number +---@param additionalClasses string|string[]? +---@return HtmlNode +function LeagueIcon._generateWikiCode(icon, link, name, size, additionalClasses) + return Html.Span{ + classes = Array.extend('league-icon-small-image', additionalClasses), + children = { + '[[', + table.concat({ + 'File:' .. icon, + 'link=' .. link, + name or link, + size .. 'x' .. size .. 'px' + }, '|') + ']]' + } + } +end + ---Retrieve icon and iconDark from LeagueIconSmall templates ---@param args {icon: string?, iconDark: string?, stringOfExpandedTemplate: string?} ---@return string, string, string @@ -190,33 +211,44 @@ end --generate copy paste code for new LeagueIconSmall templates --to be used with a form ---@param args LeagueIconGenerateArgs ----@return string +---@return Renderable function LeagueIcon.generate(args) local link = args.link or args.series assert(String.isNotEmpty(link), 'No series/link specified') + ---@cast link -nil local name = args.name or link local icon = args.icon assert(String.isNotEmpty(icon), 'No icon file specified') - local iconDark = args.iconDark or icon - local imageOptions = '|link={{{1|{{{link|' .. link .. '}}}}}}|{{{name|{{{1|{{{link|' .. name .. '}}}}}}}}}|50x50px]]' + return Html.Fragment{children = WidgetUtil.collect( + Html.Pre{ + classes = {'selectall'}, + css = {width = '50%'}, + children = {mw.text.nowiki(LeagueIcon._generateTemplateCode(icon, args.iconDark, link, name))} + }, + LeagueIcon._buildLinkToTemplate(args) + )} +end - if icon == iconDark then - return '
' .. mw.text.nowiki(
-			'' ..
-			'[[File:' .. icon .. imageOptions .. '[[Category:Small League Icon Templates]]') .. '
' - .. LeagueIcon._buildLinkToTemplate(args) +---@private +---@param icon string +---@param iconDark string? +---@param link string +---@param name string +---@return string +function LeagueIcon._generateTemplateCode(icon, iconDark, link, name) + local linkOption = '{{{1|{{{link|' .. link .. '}}}}}}' + local nameOption = '{{{name|{{{1|{{{link|' .. name .. '}}}}}}}}}' + if String.isEmpty(iconDark) or icon == iconDark then + return tostring(LeagueIcon._generateWikiCode(icon, linkOption, nameOption, 50)) + .. '[[Category:Small League Icon Templates]]' end - - return '
' .. mw.text.nowiki(
-		'' ..
-		'[[File:' .. icon .. imageOptions .. '' ..
-		'[[File:' .. iconDark .. imageOptions .. '[[Category:Small League Icon Templates]]') .. '
' - .. LeagueIcon._buildLinkToTemplate(args) + ---@cast iconDark -nil + return tostring(LeagueIcon._generateWikiCode(icon, linkOption, nameOption, 50, 'lightmode')) + .. '' + .. tostring(LeagueIcon._generateWikiCode(iconDark, linkOption, nameOption, 50, 'darkmode')) + .. '[[Category:Small League Icon Templates]]' end --generate copy paste code for new historical LeagueIconSmall templates @@ -274,14 +306,18 @@ function LeagueIcon.generateHistorical(args) end ---@param args {templateName: string?, wiki: string?} ----@return string +---@return Renderable[]? function LeagueIcon._buildLinkToTemplate(args) if String.isEmpty(args.templateName) or String.isEmpty(args.wiki) then - return '' + return end - return '
Link to the template page: [[' .. args.wiki .. - ':Template:LeagueIconSmall/' .. args.templateName:lower() .. ']]' + return { + Html.Br{}, + Html.B{children = {'Link to the template page:'}}, + ' ', + Link{link = args.wiki .. ':Template:LeagueIconSmall/' .. args.templateName:lower()} + } end return Class.export(LeagueIcon, {frameOnly = true, exports = { From 3b8c8cebcab6cf7d6930898179183aad0c07eb63 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Mon, 11 May 2026 15:31:22 +0900 Subject: [PATCH 03/13] use add_category --- lua/spec/league_icon_spec.lua | 16 +++++++++++++++- lua/wikis/commons/LeagueIcon.lua | 7 +++++-- 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/lua/spec/league_icon_spec.lua b/lua/spec/league_icon_spec.lua index ae5d996560c..cec502e1e41 100644 --- a/lua/spec/league_icon_spec.lua +++ b/lua/spec/league_icon_spec.lua @@ -13,6 +13,16 @@ local ICON_WITH_LINK_BOTH_EXPECT = '[[File:DarkIcon.png|link=link|name|50x50px]]' insulate('LeagueIcon.display', function() + local AddCategorySpy + + before_each(function() + AddCategorySpy = spy.on(mw.ext.TeamLiquidIntegration, 'add_category') + end) + + after_each(function() + AddCategorySpy:revert() + end) + it('should return filler icon when no icons are provided', function() local args = {} local result = LeagueIcon.display(args) @@ -22,25 +32,29 @@ insulate('LeagueIcon.display', function() it('should return iconDark when only iconDark is provided', function() local args = {iconDark = 'DarkIcon.png'} local result = LeagueIcon.display(args) - assert.are.equal(ICON_DARK_EXPECT .. '[[Category:Pages with only icondark]]', result) + assert.are.equal(ICON_DARK_EXPECT, result) + assert.stub(AddCategorySpy).was.called_with('Pages with only icondark') end) it('should return both icons when both icon and iconDark are provided', function() local args = {icon = 'LightIcon.png', iconDark = 'DarkIcon.png'} local result = LeagueIcon.display(args) assert.are.equal(ICON_BOTH_EXPECT, result) + assert.stub(AddCategorySpy).was.called_at_most(0) end) it('should not use template when noTemplate option is true', function() local args = {options = {noTemplate = true}} local result = LeagueIcon.display(args) assert.are.equal(FILLER_EXPECT, result) + assert.stub(AddCategorySpy).was.called_at_most(0) end) it('should not include link when noLink option is true', function() local args = {icon = 'LightIcon.png', iconDark = 'DarkIcon.png', options = {noLink = true}} local result = LeagueIcon.display(args) assert.are.equal(ICON_BOTH_EXPECT, result) + assert.stub(AddCategorySpy).was.called_at_most(0) end) end) diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index aa82c3a2e7a..6970523ae3d 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -19,7 +19,7 @@ local Link = Lua.import('Module:Widget/Basic/Link') local WidgetUtil = Lua.import('Module:Widget/Util') local FILLER = '[[File:Logo filler event.png|link=]]' -local NO_ICON_BUT_ICONDARK_TRACKING_CATEGORY = '[[Category:Pages with only icondark]]' +local NO_ICON_BUT_ICONDARK_TRACKING_CATEGORY = 'Pages with only icondark' ---@class LeagueIconDisplayArgs ---@field icon string? @@ -81,7 +81,10 @@ function LeagueIcon.display(args) else link = args.link or args.series or args.abbreviation or args.name or '' end - return LeagueIcon._make(icon, iconDark, link, args.name, size) .. trackingCategory + if String.isNotEmpty(trackingCategory) then + mw.ext.TeamLiquidIntegration.add_category(trackingCategory) + end + return LeagueIcon._make(icon, iconDark, link, args.name, size) end ---@private From 83a922a3611282d344bc0a29febbd56fde2c7fd2 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Mon, 11 May 2026 15:36:58 +0900 Subject: [PATCH 04/13] clean up rest --- lua/wikis/commons/LeagueIcon.lua | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index 6970523ae3d..0bc36e1b580 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -257,7 +257,7 @@ end --generate copy paste code for new historical LeagueIconSmall templates --to be used with a form ---@param args table ----@return string +---@return HtmlNode function LeagueIcon.generateHistorical(args) local title = args.title or args.series if String.isEmpty(title) then @@ -303,11 +303,19 @@ function LeagueIcon.generateHistorical(args) end comparisons = '-->{{#ifexpr:' .. comparisons - return '
' .. mw.text.nowiki(
-			defineTime .. comparisons .. '-->[[Category:Historical Small League Icon template]]'
-		) .. '
' .. LeagueIcon._buildLinkToTemplate(args) + return Html.Fragment{children = WidgetUtil.collect( + Html.Pre{ + classes = {'selectall'}, + css = {width = '50%'}, + children = {mw.text.nowiki( + defineTime .. comparisons .. '-->[[Category:Historical Small League Icon template]]' + )} + }, + LeagueIcon._buildLinkToTemplate(args) + )} end +---@private ---@param args {templateName: string?, wiki: string?} ---@return Renderable[]? function LeagueIcon._buildLinkToTemplate(args) From f27b1525e215ad4010a3590076d3f55131fde890 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Fri, 15 May 2026 14:07:00 +0900 Subject: [PATCH 05/13] use helper function --- lua/wikis/commons/LeagueIcon.lua | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index 0bc36e1b580..311f80b4ac4 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -18,7 +18,7 @@ local Html = Lua.import('Module:Widget/Html') local Link = Lua.import('Module:Widget/Basic/Link') local WidgetUtil = Lua.import('Module:Widget/Util') -local FILLER = '[[File:Logo filler event.png|link=]]' +local FILLER_IMAGE = 'Logo filler event.png' local NO_ICON_BUT_ICONDARK_TRACKING_CATEGORY = 'Pages with only icondark' ---@class LeagueIconDisplayArgs @@ -61,7 +61,7 @@ function LeagueIcon.display(args) --if icon and iconDark are not given and can not be retrieved return filler icon if String.isEmpty(icon) and String.isEmpty(iconDark) then - return FILLER + return LeagueIcon._generateWikiCode(FILLER_IMAGE, '') end if String.isEmpty(icon) then @@ -112,8 +112,8 @@ end ---@private ---@param icon string ---@param link string ----@param name string ----@param size number +---@param name string? +---@param size number? ---@param additionalClasses string|string[]? ---@return HtmlNode function LeagueIcon._generateWikiCode(icon, link, name, size, additionalClasses) @@ -121,12 +121,12 @@ function LeagueIcon._generateWikiCode(icon, link, name, size, additionalClasses) classes = Array.extend('league-icon-small-image', additionalClasses), children = { '[[', - table.concat({ + table.concat(Array.extend( 'File:' .. icon, 'link=' .. link, - name or link, - size .. 'x' .. size .. 'px' - }, '|') + Logic.emptyOr(name, link), + size and (size .. 'x' .. size .. 'px') or nil + ), '|') ']]' } } From 650c0fc63652fc3f3b7e5dd20a0b06be50f0222a Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Fri, 15 May 2026 14:10:07 +0900 Subject: [PATCH 06/13] use assert --- lua/wikis/commons/LeagueIcon.lua | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index 311f80b4ac4..b20ff792705 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -260,9 +260,7 @@ end ---@return HtmlNode function LeagueIcon.generateHistorical(args) local title = args.title or args.series - if String.isEmpty(title) then - error('No template title specified') - end + assert(String.isNotEmpty(title), 'No template title specified') local link = args.link or title local name = args.name or link local timeName = title:lower() .. 'time' From 2944b6b553ccf9224848c372ca5dac01b8647843 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Fri, 15 May 2026 14:11:24 +0900 Subject: [PATCH 07/13] use shorthand --- lua/wikis/commons/LeagueIcon.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index b20ff792705..d7b28ca3459 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -47,16 +47,16 @@ function LeagueIcon.display(args) local icon = args.icon local trackingCategory = '' if not Logic.readBool(options.noTemplate) and String.isEmpty(icon) and String.isEmpty(iconDark) then - local stringOfExpandedTemplate = LeagueIcon.getTemplate({ + local stringOfExpandedTemplate = LeagueIcon.getTemplate{ series = args.series, abbreviation = args.abbreviation, date = args.date - }) - icon, iconDark, trackingCategory = LeagueIcon.getIconFromTemplate({ + } + icon, iconDark, trackingCategory = LeagueIcon.getIconFromTemplate{ icon = icon, iconDark = iconDark, stringOfExpandedTemplate = stringOfExpandedTemplate - }) + } end --if icon and iconDark are not given and can not be retrieved return filler icon From 5385397e9e3102843a24275e7403dc864299413b Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Mon, 18 May 2026 11:10:16 +0900 Subject: [PATCH 08/13] syntax --- lua/wikis/commons/LeagueIcon.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index d7b28ca3459..aa35efba20b 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -126,7 +126,7 @@ function LeagueIcon._generateWikiCode(icon, link, name, size, additionalClasses) 'link=' .. link, Logic.emptyOr(name, link), size and (size .. 'x' .. size .. 'px') or nil - ), '|') + ), '|'), ']]' } } From 327a07a49968d0ecdc3508216dd163f25bc50940 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Mon, 18 May 2026 11:12:03 +0900 Subject: [PATCH 09/13] tostring --- lua/wikis/commons/LeagueIcon.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index aa35efba20b..cc66dec6189 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -61,7 +61,7 @@ function LeagueIcon.display(args) --if icon and iconDark are not given and can not be retrieved return filler icon if String.isEmpty(icon) and String.isEmpty(iconDark) then - return LeagueIcon._generateWikiCode(FILLER_IMAGE, '') + return tostring(LeagueIcon._generateWikiCode(FILLER_IMAGE, '')) end if String.isEmpty(icon) then From 06e1ba87f61a6bc705074764f51ac99a3fbc312a Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Mon, 18 May 2026 11:13:11 +0900 Subject: [PATCH 10/13] adjust test --- lua/spec/league_icon_spec.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/spec/league_icon_spec.lua b/lua/spec/league_icon_spec.lua index cec502e1e41..90678b075ea 100644 --- a/lua/spec/league_icon_spec.lua +++ b/lua/spec/league_icon_spec.lua @@ -2,7 +2,7 @@ local LeagueIcon = require('Module:LeagueIcon') local FILLER_EXPECT = '[[File:Logo filler event.png|link=]]' -local ICON_DARK_EXPECT = '[[File:DarkIcon.png|link=||50x50px]]' +local ICON_DARK_EXPECT = '[[File:DarkIcon.png|link=|50x50px]]' local ICON_BOTH_EXPECT = '[[File:LightIcon.png|link=||50x50px]]' .. From 15557634244b7b3294a93edfe1fdd0519d59852d Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Mon, 18 May 2026 11:14:37 +0900 Subject: [PATCH 11/13] adjust test --- lua/spec/league_icon_spec.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/spec/league_icon_spec.lua b/lua/spec/league_icon_spec.lua index 90678b075ea..e733b1c9c69 100644 --- a/lua/spec/league_icon_spec.lua +++ b/lua/spec/league_icon_spec.lua @@ -5,8 +5,8 @@ local FILLER_EXPECT = '[[File:Logo filler local ICON_DARK_EXPECT = '[[File:DarkIcon.png|link=|50x50px]]' local ICON_BOTH_EXPECT = - '[[File:LightIcon.png|link=||50x50px]]' .. - '[[File:DarkIcon.png|link=||50x50px]]' + '[[File:LightIcon.png|link=|50x50px]]' .. + '[[File:DarkIcon.png|link=|50x50px]]' local ICON_WITH_LINK_EXPECT = '[[File:Icon.png|link=link|name|50x50px]]' local ICON_WITH_LINK_BOTH_EXPECT = '[[File:LightIcon.png|link=link|name|50x50px]]' .. From 542765b45127a2f932abf9440ed8bf808ef1f9b9 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Mon, 18 May 2026 11:17:40 +0900 Subject: [PATCH 12/13] correctly pass iconDark --- lua/wikis/commons/LeagueIcon.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index cc66dec6189..eb8bc61a871 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -105,7 +105,7 @@ function LeagueIcon._make(icon, iconDark, link, name, size) end local lightSpan = LeagueIcon._generateWikiCode(icon, link, name, size, 'lightmode') - local darkSpan = LeagueIcon._generateWikiCode(icon, link, name, size, 'darkmode') + local darkSpan = LeagueIcon._generateWikiCode(iconDark, link, name, size, 'darkmode') return tostring(lightSpan) .. tostring(darkSpan) end From 072ea49a674506d74d939e4f6f3bc310796c0f47 Mon Sep 17 00:00:00 2001 From: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com> Date: Mon, 18 May 2026 11:26:49 +0900 Subject: [PATCH 13/13] kick redundant width param --- lua/wikis/commons/LeagueIcon.lua | 2 -- 1 file changed, 2 deletions(-) diff --git a/lua/wikis/commons/LeagueIcon.lua b/lua/wikis/commons/LeagueIcon.lua index eb8bc61a871..751a5812701 100644 --- a/lua/wikis/commons/LeagueIcon.lua +++ b/lua/wikis/commons/LeagueIcon.lua @@ -227,7 +227,6 @@ function LeagueIcon.generate(args) return Html.Fragment{children = WidgetUtil.collect( Html.Pre{ classes = {'selectall'}, - css = {width = '50%'}, children = {mw.text.nowiki(LeagueIcon._generateTemplateCode(icon, args.iconDark, link, name))} }, LeagueIcon._buildLinkToTemplate(args) @@ -304,7 +303,6 @@ function LeagueIcon.generateHistorical(args) return Html.Fragment{children = WidgetUtil.collect( Html.Pre{ classes = {'selectall'}, - css = {width = '50%'}, children = {mw.text.nowiki( defineTime .. comparisons .. '-->[[Category:Historical Small League Icon template]]' )}