Skip to content

Conversation

@Eetwalt
Copy link
Collaborator

@Eetwalt Eetwalt commented Jan 14, 2026

Summary

Introduces a shop button for team infoboxes that's opt-in.

  • Renders with the flag |shoplink. A truthy value will use the default value, but editors can use any valid links.liquipedia.net url for this flag.
  • Button text is hardcoded
  • Button icon is hardcoded

How did you test this change?

|dev=sbi and flag |shoplink on any team infobox.

image

Copilot AI review requested due to automatic review settings January 14, 2026 10:41
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

This PR adds an opt-in shop button feature to team infoboxes, allowing teams to display merchandise links with customizable styling.

Changes:

  • Introduces a new ShopMerch widget with URL validation restricted to links.liquipedia.net domain
  • Adds customization options for button text, icon, and link URL via infobox parameters
  • Integrates the shop button into the team infobox template with comprehensive test coverage

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
lua/wikis/commons/Widget/Infobox/ShopMerch.lua Core widget implementation with URL validation and rendering logic for the shop button
lua/wikis/commons/Widget/Infobox/All.lua Registers ShopMerch widget in the infobox widget collection
lua/wikis/commons/Widget/All.lua Registers ShopMerch widget in the global widget collection
lua/wikis/commons/Infobox/Team.lua Integrates ShopMerch widget into team infobox structure
lua/wikis/commons/Icon/Data.lua Adds shopping_bag icon definition for the shop button
lua/spec/infobox_shop_merch_spec.lua Comprehensive test suite covering validation, normalization, and customization scenarios

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

@Eetwalt Eetwalt requested a review from ElectricalBoy January 15, 2026 20:04
Co-authored-by: ElectricalBoy <15651807+ElectricalBoy@users.noreply.github.com>
@@ -0,0 +1,114 @@
---
Copy link
Collaborator

Choose a reason for hiding this comment

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

actually, if the intended design is to enforce use of links.liquipedia.net domain only, then why not just do 'https://links.liquipedia.net/' .. args.shoplink?

that should be able to remove all the url checking logic, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hmm yeah at least for now the idea is to only accept links.liquipedia.net links. I think input being the slug makes sense so we can tighten the validation to only the slug part. 045139e

Wdyt?

Copy link
Collaborator

Choose a reason for hiding this comment

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

Intended that you reverted that change again?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

It's wasn't completely reverted, just needed to introduce the mw.uri.new again to construct the url before the length check validation. But otherwise it's simpler now than what it was (as we're enforcing the domain)

@@ -0,0 +1,114 @@
---
Copy link
Collaborator

Choose a reason for hiding this comment

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

Intended that you reverted that change again?


local SHOP_DEFAULT_LINK = 'https://links.liquipedia.net/tlstore'
local SHOP_DEFAULT_ICON = 'shopping_bag'
local SHOP_DEFAULT_TEXT = 'Shop Official Team Liquid Gear'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Could make this a pattern

Suggested change
local SHOP_DEFAULT_TEXT = 'Shop Official Team Liquid Gear'
local SHOP_DEFAULT_TEXT = 'Shop Official ${teamname} Gear'

then later use String.interpolate to fill with the correct team name

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Probably a good idea for later, now we're just testing the clickrate for TL team infoboxes so we can keep it as is

Co-authored-by: SyntacticSalt <mail@mbergen.de>
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.

6 participants