Page MenuHomePhabricator

Move Cite properties from `data-mw` to `data-mw-cite`
Open, Needs TriagePublic

Description

With the introduction of rich attribute support for extensions, we'd like to deprecate extensions' use of dynamic properties in data-mw for their own data. Instead, they can define their own rich attribute which they have complete control of.

For the cite extension, this will be the data-mw-cite attribute, and we'll move the following properties from data-mw to the new data-mw-cite attribute:

  • data-mw.body.id
  • data-mw.body.html
  • data-mw.mainRef
  • data-mw.mainBody
  • data-mw.mainBodyHtml
  • data-mw.autoGenerated
  • data-mw.isSyntheticMainRef

Event Timeline

Change #1298363 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/Cite@master] Migrate DataMw::$isSyntheticMainRef and ::$autoGenerated to DataMwCite

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

Change #1298368 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/Cite@master] Migrate DataMw::$mainRef and ::$mainBody to DataMwCite

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

Change #1298369 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/Cite@master] Migrate DataMw::$body (html content) to DataMwCite::$body

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

These are all going to be breaking changes wrt our published HTML spec.

Change #1298372 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/Cite@master] Migrate DataMwBody::$id to DataMwCite::$bodyId

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

Change #1298370 had a related patch set uploaded (by C. Scott Ananian; author: C. Scott Ananian):

[mediawiki/extensions/Cite@master] Migrate DataMw::$mainBodyHtml to DataMwCite::$mainBodyFragment

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

These are all going to be breaking changes wrt our published HTML spec.

Probably a good opportunity to exercise the notice agreement we hammered out with Enterprise at the last offsite.

Also worth noting that the portions of data-mw related to the subreferences feature are (apparently) not considered stable and are being changed by WMDE soon anyway (T428232: [Cleanup] Remove code that creates or depends on synthetic main refs) so perhaps it would be best to start by moving the subreferences fields out of data-mw, and move the "ordinary reference" fields later (after an appropriate Enterprise delay).