Page MenuHomePhabricator

Math Popup not working in newer version of Popup-Extension
Closed, ResolvedPublicBUG REPORT

Description

Steps to replicate the issue:

What happens?:
Nothing

What should have happened instead?:
Preview should have pop up.

Software version:

Other information:
Not working since commit hash 7a9e8fd6221515b48f45ba29d3f102eb899f1e33 from ticket T380079
Tested in Firefox, Chrome, Edge, Safari.
No errors or warnings in browser console.
Not working in either SVG mode or MathML mode.
The reason is that the newer version of Popup has stricter requirements for the title value. They are now getting the title only from the href argument and not from any other argument anymore. While the html does have an href-attribute, it is somehow missing in the javascript object and we have to add it ourselves.

Event Timeline

Change #1099778 had a related patch set uploaded (by FrederikHennecke1; author: FrederikHennecke1):

[mediawiki/extensions/Math@master] Fix for Math Popup not working in newer version of Popup-Extension

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

Since we are backporting a few changes to REL1_43, we should test if the proposed change would work with the REL1_43 version of popups

Physikerwelt changed the task status from Open to In Progress.Dec 2 2024, 8:39 PM
Physikerwelt triaged this task as Medium priority.

Change #1099778 merged by jenkins-bot:

[mediawiki/extensions/Math@master] Fix for Math Popup not working in newer version of Popup-Extension

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

Change #1105074 had a related patch set uploaded (by Krinkle; author: FrederikHennecke1):

[mediawiki/extensions/Math@REL1_43] Fix for Math Popup not working in newer version of Popup-Extension

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

Change #1105074 merged by jenkins-bot:

[mediawiki/extensions/Math@REL1_43] Fix for Math Popup not working in newer version of Popup-Extension

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

Physikerwelt claimed this task.
Physikerwelt added a subscriber: Jdlrobson.

Formally, yes. Hovering over
$c$

results in

Screenshot 2025-05-21 at 07.03.20.png (1×998 px, 371 KB)

which seems good, but hovering over E does not clearly indicate that the concept is about $E$

Screenshot 2025-05-21 at 07.03.36.png (636×1 px, 623 KB)

Maybe @Jdlrobson has an idea how improve the user experience.

which seems good, but hovering over E does not clearly indicate that the concept is about $E$

I am not sure I understand the question you are asking. E is showing a preview of the energy page as that it what it is linked to and it is reflecting the comment in the lead. This seems like it's working exactly as expected.

That said, I am getting different experiences and a bit confused about what you want here?

In native MathML it renders links for the individual symbols:

Screenshot 2025-05-23 at 2.55.00 PM.png (412×565 px, 227 KB)

With SVGs I see a preview for the whole equation;

Screenshot 2025-05-23 at 2.55.21 PM.png (274×433 px, 57 KB)

Which do you want as the main experience?

Allowing links for individual symbols inside MathML will mean the default experience is used as that's what the feature was designed to do and that won't change (it previews links). If you want both you could perhaps update your output of MathML to perhaps show a link after/below the equation (more information about this equation) and make it show when hovering that.

Please let me know exactly what you are trying to do and I will try my best to help out.

@Jdlrobson-WMF thank you very much

Please let me know exactly what you are trying to do, and I will try my best to help out.

Overall, the goal is to improve the user experience for people who are not familiar with formulae. I agree that technically everything works as expected (that's why I closed the bug). However, I'm unsure if the overall goal is meat.

We will collect user feedback and see what people like, as I have a biased view.