MediaWiki talk:Gadget-site-deploycal.js

Rendered with Parsoid
From Wikitech
Latest comment: 2 months ago by Gergő Tisza in topic Local time display broken in Chrome on Linux

TypeError

The timezone logic currently breaks VE on Deployments with Uncaught TypeError: Cannot read property '1' of null, referencing sfTz[1] after evidently not matching the date regexp. -- gwicke (talk) 16:25, 14 July 2015 (UTC)Reply

This bug is still there, almost eight years later: phab:T356687. There's a suggested fix in the phab task. C. Scott Ananian (talk) 20:42, 5 February 2024 (UTC)Reply
Maybe @Krinkle or @Reedy have the appropriate permissions to fix this? C. Scott Ananian (talk) 20:43, 5 February 2024 (UTC)Reply
Fixed in Edit. Krinkle (talk) 12:01, 6 February 2024 (UTC)Reply

Hide prefix in category

(@Krinkle:) Hello, please add this snippet to use it on Category:Toolforge. --Dvorapa (talk) 15:54, 22 March 2019 (UTC) (@BryanDavis:) --Dvorapa (talk) 15:56, 22 March 2019 (UTC)Reply

@Dvorapa: I think using JavaScript for this should be avoided if possible, as it causes the page to change after the user first sees it without the change. It also means that all other pages on Wikitech become slower. Instead of linking a user to the category page, perhaps we can provide a direct solution by using {{Special:PrefixIndex}}. You can place this on any page where you want to show a nice overview without prefixes. As example, I have added it to Category:Toolforge#Help_pages. Does that help? --Krinkle (talk) 21:29, 23 March 2019 (UTC)Reply
I don't think this can help as many Toolforge help pages are not having this prefix. Also there are some different prefixes (like Project:Toolforge) and maybe there will be some other in the future as well. Also I don't like duplicating the category content twice on the same page. I don't mind not having this feature, but it can make the category pages cleaner (I have good experience with these from MetaWiki).
The change of the page when the user first loads the page is just a minor issue in comparison to cluttered category page. Also the scripts like this can always be run only in category namespace or only on certain pages (like category templates with some special template). It loads after page loads, so it slows down only other similar gadget scripts. Or it can be a default gadget, which I think is run even after Common.js. --Dvorapa (talk) 21:46, 23 March 2019 (UTC)Reply

“Jump to current event” button style

The “Jump to current event” button on Deployments currently looks like an unstyled default OS button. Please add mw.loader.using('mediawiki.ui.button'); or similar to the gadget (perhaps at the beginning of handleCalendarPage()), so that the necessary MWUI styles to show it are loaded.

Alternatively, we could change Template:Navigation MediaWiki deployment to make the button a Codex CSS-only button (<span class="cdx-button cdx-button-progressive cdx-button--fake-button cdx-button--fake-button--enabled">), but then we’d still have to load a ResourceLoader module (codex-styles instead of mediawiki.ui.button). Lucas Werkmeister (WMDE) (talk) 18:03, 18 December 2023 (UTC)Reply

Yes Done reedy (talk) 19:04, 18 December 2023 (UTC)Reply
Apparently there’s some more discussion of the general issue at T346469, by the way. Lucas Werkmeister (WMDE) (talk) 12:04, 22 December 2023 (UTC)Reply

Local time display broken in Chrome on Linux

Apparently Date.getTimezoneOffset is broken in Chrome on Linux (always returns 0, leading to the script not displaying a local timestamp). support.google.com report here, bug report here. I don't think much can be done about it, just noting to save time for the next person looking into it. tgr (talk) 14:50, 19 February 2024 (UTC)Reply