User talk:Physikerwelt

From Wikisource
Latest comment: 1 year ago by 95.91.245.247 in topic JS components in Extension:Math?
Jump to navigation Jump to search

Welcome to Wikisource

Hello, Physikerwelt, and welcome to Wikisource! Thank you for joining the project. I hope you like the place and decide to stay. Here are a few good links for newcomers:

You may be interested in participating in

Add the code {{active projects}}, {{PotM}} or {{Collaboration/MC}} to your page for current Wikisource projects.

You can put a brief description of your interests on your user page and contributions to another Wikimedia project, such as Wikipedia and Commons.

Have questions? Then please ask them at either

I hope you enjoy contributing to Wikisource, the library that is free for everyone to use! In discussions, please "sign" your comments using four tildes (~~~~); this will automatically produce your username if you're logged in (or IP address if you are not) and the date. If you need help, ask me on my talk page, or ask your question here (click edit) and place {{helpme}} before your question.

Again, welcome! — billinghurst sDrewth 13:42, 26 December 2015 (UTC)Reply

JS components in Extension:Math?[edit]

Hi Moritz,

I'm grabbing you as "the most likely person to know anything about how Math works". :)

On enWS we (ab)use math markup to display fancy braces (via {{brace2}}). I'm bugging you because recently this has stopped working, in what looks like an interaction with one of our more hacky Gadgets (i.e. JavaScript), and I'm wondering whether Extension:Math has a JavaScript component that we could possibly be clashing with?

Briefly, our MediaWiki:Gadget-PageNumbers.js wraps .mw-parser-output in three div elements and then applies custom styles to them. Now we're observing that braces look fine on page load, but when this gadget runs, at the point where it's wrapping the content in the divs, the braces generated seemingly disappear. Checking in the inspector it looks like maybe what's actually happening is that their width are getting set to ~4px or so (from ~25px on load). We're modifying the DOM and causing a relayout (other stuff on the page will change size), so maybe whatever JS Math is running is trying to dynamically calculate a width and getting confused? I can reproduce it in the debugger with a breakpoint (on line 284), but not isolated in the console, so it seems to be at least partially timing dependent.

So… does Math rely on any client-side javascript with which our gadget could be either conflicting or racing? If so, did it change significantly in the last couple of months?

Any tips or pointers would be very much appreciated; and apologies in advance if you're not the right person to bug about this. Xover (talk) 09:26, 24 July 2022 (UTC)Reply

Oh, actually, let me give you a "live" example (without thereby intending to imply any expectation that you dive in deep and start debugging our local templates and gadgets): 1911 Encyclopædia Britannica/Vol 1/Table of contributors. The above mentioned gadget is on by default and we're seeing it across browsers etc. so I would expect you'd see the effect too. Xover (talk) 09:38, 24 July 2022 (UTC)Reply
No, can you post a screenshot. For me it looks like that https://bafybeie4i3ob7yfwtznc75qtntdltpdnmt7wpa2umuuvdnajr7pbqqpx2i.ipfs.infura-ipfs.io/ 95.91.245.247 13:37, 24 July 2022 (UTC)Reply
Screenshot here. The reporting users (and my own testing) shows the normal display, as per your screenshot, briefly before it changes to as in my screenshot. The reporting user describes it as the brace disappearing, but as you can see it's really that it shrinks to something like 4px width (and what looks like proportional height). What browser were you testing, and do you run NoScript or similar (block JS)? I've tested with Chrome, Safari, and Firefox on macOS (and the reporting user was in Chrome on Windows), and both while logged in and when logged out. Xover (talk) 14:24, 24 July 2022 (UTC)Reply
Allright. I can see it now. I am using the extensions described in https://www.mediawiki.org/wiki/Extension:Math#Viewing_math . So it is basically a problem with the images. Can you try if it works for you with Firefox and native MathML? In the meantime I did move this discussion to phab:T313689, so it can be taken care of... 95.91.245.247 14:45, 24 July 2022 (UTC)Reply