Page MenuHomePhabricator

[Refactor] Extract reference re-use panel and re-use in VE Citoid and VE Cite
Closed, DeclinedPublic

Description

Both, Citoid and Cite implement an UI to scroll through a list of reference that could be re-used and then add it to the surface when one is selected.

We should be able to create a widget - ideally of type OO.ui.TabPanelLayout - that would help reduce code duplication and could be used in both code bases.

Note:
Cite behaves a bit differently than Citoid when it comes to adding references via re-use. So the handlers executed after selecting an reference from the list are quite different at the moment. In a first iteration we might just want to extract common logic. A follow up then could sync the behavior.

Event Timeline

Change #1038814 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Extract re-use logic into its own widget

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

Change #1039193 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Citoid@master] [WIP] Use reuse panel from Cite to build reuse tab

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

Change #1039719 had a related patch set uploaded (by WMDE-Fisch; author: WMDE-Fisch):

[mediawiki/extensions/Cite@master] Don't use the edit form when reusing a reference

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

Change #1039719 merged by jenkins-bot:

[mediawiki/extensions/Cite@master] Don't use the edit form when reusing a reference

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

thiemowmde subscribed.

Not really worth it, considering that we will most certainly merge the two "reuse as is" and "reuse with different details" tabs into one. The remaining code duplication between the two extensions that re-implement what is then only one tab is minimal.

Change #1039193 abandoned by WMDE-Fisch:

[mediawiki/extensions/Citoid@master] [WIP] Use reuse panel from Cite to build reuse tab

Reason:

Not following the approach atm

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

Change #1038814 abandoned by WMDE-Fisch:

[mediawiki/extensions/Cite@master] Extract re-use logic into its own widget

Reason:

Not following the approach atm

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