Page MenuHomePhabricator

Creating wikitext does not allow changing of class names
Open, LowPublicBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

  • Copy the Capiunto example usage
  • Before the return statement include :addWikitext("some test wikitext")
  • Try to add a rowClass (you cannot because the argument is not exposed)

What happens?: Wikitext is created with no row class name or similar

What should have happened instead?: I should have been able to add class names to the wikitext row.

Why should this have happened?: For recreating infoboxes like [[ en.wikipedia.org/wiki/Template:Infobox_country | Template:Infobox country ]], we have to include the mergedrow class, which we currently cannot do

Software version (skip for WMF-hosted wikis like Wikipedia): 1.41

Other information (browser name/version, screenshots, etc.):

image.png (282×566 px, 30 KB)

↑Screenshot of current behavior—take note of the last row which is using a Capiunto-ported version of [[ en.wikipedia.org/wiki/Template:Infobox_country/multirow | Template:Infobox country/multirow ]]. The top border should not be there because the added <tr> does not allow me to set the mergedrow class
image.png (262×564 px, 30 KB)

↑Screenshot after using inspect element to achieve desired results—I have added the mergedrow class to the first <tr> as expected.

How can you/others fix this?: By exposing at least the rowClass attribute similar to :addRow in the :addWikitext method

Event Timeline

I can do this, it's really simple

Change #1015171 had a related patch set uploaded (by Gravy59; author: Gravy59):

[mediawiki/extensions/Capiunto@master] Add support for `rowClass` on `:addWikitext`

https://gerrit.wikimedia.org/r/1015171

Should add this for :addHeader and :addSubheader too

Change #1015362 had a related patch set uploaded (by Gravy59; author: Gravy59):

[mediawiki/extensions/Capiunto@master] Add `rowClass` to `:addHeader` method

https://gerrit.wikimedia.org/r/1015362

Is there anyone who can review and/or approve these changes? Thanks

Anyone in the mediawiki-extensions-Capinuto or mediawiki Gerrit groups has the technical ability to merge these changes. I do not have that ability. Unfortunately it's a well known problem that patches by volunteers often don't get reviewed anywhere near as promptly as they should. I have a patch that's been pending review since January 2023.

Sorry, I know that's not what you hoped for.

Ah, well. I'll just use this branch for my wiki.