Page MenuHomePhabricator

Add context field to Special:MathWikibase
Open, Needs TriagePublicBUG REPORT

Description

User https://en.wikipedia.org/wiki/User_talk:PhilMINT used the qid attribute to link formulae in Wikipedia and Wikidatam. In this context user @Constant314 noted that in Force, the representation $F=dp/dt$ is not always the same as $F=ma$.
While I asked myself

How on earth would one be able to fly to the moon, otherwise?

the different representation is certainly confusing and not precise enough for a popup. Therefore we need to pass the context from which the formula was called to the special page and select the best matching defining formula property rather than using the one ranked first.
I suggest adding another parameter to the special case that is the hash of the latex string, as one can, in general not pass the latex code of the formula in plaintext as those can become quite long (and even exceed the maximum URL length). Then one can fetch the latex string from restbase and select the best matching formula from wikidata. If no match is found the special page should display a warning. I think this feature is especially important as preparation for the popup thing (T208758). Here it would be even more confusing to display

  • impulse $p$ and
  • time $t$ for the context
  • derivative $\frac{\mathrm{d}}{\mathrm{d}\NVar{t}}$
  • formula $F=ma$.