Page MenuHomePhabricator

Create a custom VisualEditor tool for Phonos tags
Open, Needs TriagePublic

Description

Currently Phonos uses the default extension editor, which lets you edit the XML-like tag's attributes but also contents (which Phonos never uses?):

https://en.wikipedia.beta.wmflabs.org/w/index.php?title=Polar_bear&action=edit

Context:

image.png (117×429 px, 5 KB)

Inspector:

image.png (370×436 px, 18 KB)

Toolbar:
None - A custom tool would allow us to add IPA to the "Insert" menu.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Some existing extensions that implement VE tools:

  • Math
  • wikihiero
  • Syntaxhighlight
  • Score
  • Kartographer
  • Graph

Although custom tools could/should still be created for VE, it's worth noting that the contents can be used

Is there a reason there are 2 identical ways to do the same thing? This seems like it will add an unnecessary maintenance burden going forward. For example VE will need to read both, and Parsoid will need to remember which to use to avoid normalising the wikitext. It will also not be immediately obvious to readers/code implementors which one is used if both are present.

In regards to the point above, if we don want to get rid of one of the duplicate ways of setting the label, we should do this ASAP, as the more the extension is used, the more places there will be to fix.

Nardog renamed this task from Create a custom VisualEditor tools for Phonos tags to Create a custom VisualEditor tool for Phonos tags.Jul 5 2023, 5:41 PM
Nardog subscribed.

In regards to the point above, if we don want to get rid of one of the duplicate ways of setting the label, we should do this ASAP, as the more the extension is used, the more places there will be to fix.

Seconded! I don't think this was even by design, rather it's a side effect of the current implementation. Patch incoming.

Change 936320 had a related patch set uploaded (by MusikAnimal; author: MusikAnimal):

[mediawiki/extensions/Phonos@master] Phonos: don't allow the redundant label= attribute

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

Change 936320 merged by jenkins-bot:

[mediawiki/extensions/Phonos@master] Phonos: don't allow the redundant label= attribute

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