Module:Format TemplateData/doc: Difference between revisions

Content deleted Content added
Remove broken markup
 
(5 intermediate revisions by 4 users not shown)
Line 1:
{{Lua|Module:Format TemplateData/config|Module:Multilingual | Module:Text| Module:WLink}}
''<code>Format TemplateData</code>''' – Module with auxilary functions for template documentation, especially by TemplateData.
 
Core functionality is improved presentation on documentation pages.
Line 52:
Two aspects were found to be particularly disturbing in 2013–2017:
# Even if no parameters at all were defined, a table head is always displayed for a table without content. Even more, this is sortable.
#* A reduction was rejected with {{Phab|Task=126150}}. A sortable table of the parameters would be always necessary, even if the table has no rows at all and consists only of the header row.
#* This ridiculous statement led to the development of this module in 2016.
# Even if the context does not permit that default values or even AutoValue specifications will be defined ever, a content-free six-line definition list is output for each individual parameter value.
#* {{Phab|Task=T125333}} / {{Phab|Task=T137443}} / {{Phab|Task=T160254}} / {{Phab|Task=T52512}}<section end="JSONenhanced" />
#* MediaWiki did not even deign to answer the disastrous documentation page situation.
The general comments show that MediaWiki only regards the presentation of TemplateData specifications in the VisualEditor as important. However, someone has to program and maintain the templates and someone needs to generate the template description and make it manageable beside the functionality in the VisualEditor form, but that is beyond ken.
* Two years later the relatively easy task {{Phab|Task=T125333}} has been solved by a community originated patch.
 
== General workflow ==
Line 118:
Some functions described above can be used by other modules:
<syntaxhighlight lang="lua">
local lucky, TemplateData = pcall( require, "ModulModule:Format TemplateData" )
if type( TemplateData ) == "table" then
TemplateData = TemplateData.TemplateData()
Line 143:
Currently focussing on one template only:
* [[Template:Format TemplateData]]
 
== Dependencies ==
* [[Module:Multilingual|Multilingual]]
* [[Module:Text|Text]]
* [[Module:WLink|WLink]]
 
== {{Anker|config}} Configuration ==
Line 212 ⟶ 207:
::; deprecated
::: ''table'' with CSS for <code>deprecated</code>
<noinclude>
[[Category:Module documentation pages]]
</noinclude>