Page MenuHomePhabricator

Decide on info box, infobox, or accordion and update the codebase and documentation accordingly [S]
Closed, ResolvedPublic

Description

Background

I (@phuedx) have been writing "infobox" as in en:Template:Infobox. In the codebase, however, there are instances of InfoBox, infoBox, infobox, and accordion (see https://codesearch.wmcloud.org/extensions/?q=(%5BIi%5Dnfo%5BBb%5Dox%7Caccordion)&repos=Extension:IPInfo ).

AC
  • Decide between "info box", infobox, or accordion
  • Update the codebase accordingly
  • Update mw:Extension:IPInfo accordingly

Event Timeline

This will be discussed in Engineering meeting. From our initial review, 'infobox' seems to be the default naming convention. The instances of camelCase are the two files loaded in the ResourceLoader (extension.json & dispatcher.js), infoBox/init.js & infoBox/widget.js. We can discuss if these should be renamed or left alone.

The only 'InfoBox' is 'InfoBoxHandler' which is a class name and is named correctly.

fwiw I've only seen accordion really used when we talk about the features of the infobox (eg. in phab tickets)

the decision is to change to 'infobox' the two file directories noted above and to change 'InfoBoxHandler' to 'InfoboxHandler'

ARamirez_WMF renamed this task from Decide on info box, infobox, or accordion and update the codebase and documentation accordingly to Decide on info box, infobox, or accordion and update the codebase and documentation accordingly [S].Dec 14 2021, 4:54 PM
ARamirez_WMF updated the task description. (Show Details)
wikitrent changed the task status from Open to In Progress.Dec 23 2021, 2:00 PM
wikitrent updated the task description. (Show Details)

Change 749742 had a related patch set uploaded (by Wikitrent; author: Wikitrent):

[mediawiki/extensions/IPInfo@master] Update 'infoBox' to 'infobox' & 'InfoBox' to 'Infobox'

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

Change 749754 had a related patch set uploaded (by Tchanders; author: Tchanders):

[mediawiki/extensions/IPInfo@master] Rename instances of 'accordion' to 'infobox'

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

I've submitted an additional patch for renaming 'accordion' to 'infobox' - separated it out because of the following question:

@phuedx Are we OK to rename 'timing.MediaWiki.ipinfo_accordion_delay' to 'timing.MediaWiki.ipinfo_infobox_delay'?

Change 749742 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Update 'infoBox' to 'infobox' & 'InfoBox' to 'Infobox'

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

@phuedx Are we OK to rename 'timing.MediaWiki.ipinfo_accordion_delay' to 'timing.MediaWiki.ipinfo_infobox_delay'?

Yes. That instrument hasn't run in production/isn't used in any dashboards yet.

Change 749754 merged by jenkins-bot:

[mediawiki/extensions/IPInfo@master] Rename instances of 'accordion' to 'infobox' in Logger

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