Page MenuHomePhabricator

[EPIC] Allow Codex be called from Scribunto Lua, especially components and icons
Open, Needs TriagePublicFeature

Description

Feature summary (what you would like to be able to do and where):

Allow Codex be called from Scribunto Lua, especially components and icons.

Use case(s):

Conecpt:

local codex_component = mw.codex.component
local codex_icon = mw.codex.icon

local warning_message = codex_component.create( 'Message' )
	:prop( 'type', 'warning' )
	:addClass( 'warning-bar' )
	:attr( 'data-foo', 'bar' )
	:wikitext( 'bar' )

local icon_journal = codex_icon.create( 'cdxIconJournal' )
	:prop( 'label', 'Journal' )
	:prop( 'dir', 'rtl' )

Benefits:

This would allow us to directly add Codex components, icons to Lua modules instead of manually build the HTML, upload the SVG files.

Event Timeline

Winston_Sung renamed this task from Allo Codex be called from Scribunto Lua, especially components and icons to Allow Codex be called from Scribunto Lua, especially components and icons.Nov 26 2024, 5:32 AM
Winston_Sung updated the task description. (Show Details)
CCiufo-WMF subscribed.

Thanks for the suggestion @Winston_Sung. To be transparent, this isn't something we're likely to get around to anytime soon. At least not before exploring T313945 and T363607.

CCiufo-WMF renamed this task from Allow Codex be called from Scribunto Lua, especially components and icons to [EPIC] Allow Codex be called from Scribunto Lua, especially components and icons.Nov 29 2024, 4:31 PM
CCiufo-WMF moved this task from Now to Parking Lot on the Design-System-Team (Roadmap) board.