Jump to content

Talk:Instant Diffs

Add topic
From mediawiki.org
Latest comment: 1 month ago by NguoiDungKhongDinhDanh in topic Feedback
The logo's colors symbolize added and removed content in revision diffs.
The logo's colors symbolize added and removed content in revision diffs.
Instant Diffs using the light color scheme in Vector 2022
Instant Diffs using the dark color scheme in Vector 2022

Feedback

[edit]

@Serhio Magpie:

  • It seems to me that using 1,000 (or perhaps more than 500?) edits in recent changes (example) and contribution lists renders Instant Diffs unusable (screenshot).
  • Twinkle does not work in Instant Diffs windows.
  • MediaWiki interface defaults to English in Instant Diffs windows (e.g. "talk | contribs | block"). I am not talking about the interface specific to Instant Diffs, but about the MediaWiki interface that also gets displayed in classic diffs.
  • Instant Diffs multiplies GlobalTwinkle rollback links (screenshot). Each Instant Diffs usage adds 1 extra rollback link.

Overall and otherwise, I really like the idea of Instant Diffs and I am looking forward to translating it on Translatewiki. :) --Paloi Sciurala (talkcontribs) 18:20, 3 July 2025 (UTC)Reply

Hi, thank you very much for the feedback and interest in the project. I appreciate contribution in any form. I will try to address all issues that I can.
  • I have tested on pages with more than 5k user-added diff links, but this particular list (due to the filter and nested groups) seems to have a very heavily loaded DOM. On my PC it struggles starting from 2k edits. I have added schedulers in some places, so the popup will now start showing its contents. But opening time may vary depending on how powerful the PC is, because the browser starts to struggle with rendering new nodes on an already heavy page. Please, let me know if it happens again.
  • Twinkle assumes diffs are only shown on diff pages - it doesn't handle dynamic diff loading in other contexts. Some serious rework must be done on their side to unhardcode things. I will see in the future if I can contribute something to fix this situation.
  • For some reason I assumed that I needed to add the current Instant Diffs language to all requests (it's en for fallback). I have changed it to the user language.
  • And again, Twinkle does not expect that someone loads diffs dynamically and triggers all necessary hooks after that. Twinkle should check the context of the fired hooks to properly render or not render its tools. I will notify the authors about that later.
Serhio Magpie (talk) 20:45, 3 July 2025 (UTC)Reply
Instant Diffs multiplies GlobalTwinkle rollback links (screenshot). Each Instant Diffs usage adds 1 extra rollback link.
I have made patches and pull requests for Twinkle and GlobalTwinkle. This not only fixes duplicate links but also enables links in the Instant Diffs windows. Thanks again! Serhio Magpie (talk) 00:31, 4 July 2025 (UTC)Reply
I can confirm that now Instant Diffs works perfectly on the Recent changes page with 1,000 edits. --Paloi Sciurala (talkcontribs) 15:11, 6 July 2025 (UTC)Reply
@Paloi Sciurala, new translations have been deployed, thanks for your help! Serhio Magpie (talk) 13:35, 10 July 2025 (UTC)Reply

Feedback

[edit]

@Serhio Magpie: Instant Diffs seems to load only once and thus won't catch post-Refresh links at m:Special:GlobalWatchlist. It also can't handle diff links within the diff table itself (courtesy of fancy-diffs). NguoiDungKhongDinhDanh 05:30, 11 September 2025 (UTC)Reply

Can you please clarify - does ID not catch new links in 'Live updates' mode or when you click Refresh? Can you check if there are any errors in the browser console when you refresh the list? I will look at what I can do with the links after fancy-diffs adds them, since it seems like it does not fire any hooks after that. Thanks for the feedback!
Serhio Magpie (talk) 06:31, 11 September 2025 (UTC)Reply
@Serhio Magpie: You forgot to ping me. Weird, now it does work after refreshing. I guess that was just a glitch. NguoiDungKhongDinhDanh 10:53, 11 September 2025 (UTC)Reply
@NguoiDungKhongDinhDanh, I think I know what potentially caused this issue. ID has an unload process that executes before you refresh a page or navigate to another page. The unload process stops all observers to prevent potential error flooding. When you navigate back in the browser history, ID stays unloaded because browsers can save history states for some time. I will check if this is still necessary, or will implement a resume process. Serhio Magpie (talk) 19:23, 11 September 2025 (UTC)Reply
@NguoiDungKhongDinhDanh, I have rewritten this behavior to enable the resume process. I think the issue will not occur now. Serhio Magpie (talk) 20:57, 11 September 2025 (UTC)Reply
It also can't handle diff links within the diff table itself (courtesy of fancy-diffs).
@NguoiDungKhongDinhDanh: there is a more modern alternative to fancy-diffs — SmartDiff, Instant Diffs can process local links rendered by that script. Serhio Magpie (talk) 19:09, 9 July 2026 (UTC)Reply
@Serhio Magpie: Thanks. I'm using a fork of that one. Local links work, indeed, though I wish foreign ones (like https://en.wikipedia.org/w/index.php?diff=12345678) did as well. Also, the first issue is not fixed. I still occasionally see unhandled links. Refresh-ing doesn't help; reloading does, but sometimes it takes more than one attempt. NguoiDungKhongDinhDanh 00:08, 10 July 2026 (UTC)Reply
@NguoiDungKhongDinhDanh: full foreign links support in the content is on the way, as I finally have all needed data for it (phab:T401037). It will be helpful if you catch these cases with GlobalWatchlist. Maybe something with the link hrefs, that for some reason occasionally is not formatted in the expected format for ID. Thanks. Serhio Magpie (talk) 10:18, 10 July 2026 (UTC)Reply
@Serhio Magpie: I managed to reproduce the problem consistently by:
  • From a page, open m:Special:GlobalWatchlist in a new tab, but don't immediately switch to it.
  • Wait for a few seconds.
  • Switch to the GlobalWatchlist tab. The changelist is only loaded after this, and the links are not processed.
NguoiDungKhongDinhDanh 10:42, 10 July 2026 (UTC)Reply
@NguoiDungKhongDinhDanh: in Firefox everything works fine, but I have been able to replicate on Chrome. I have migrated extension code from mutation observer to the specialized hook, so now it should be fixed. Thanks! Serhio Magpie (talk) 12:40, 10 July 2026 (UTC)Reply
Thanks. No longer reproducible. NguoiDungKhongDinhDanh 13:01, 10 July 2026 (UTC)Reply

Problem with Minerva skin

[edit]

@Serhio Magpie: Why doesn't this script working when I'm viewing a diff link in the Minerva skin? For example, if you visit [1] on Minerva, there's "previous diff" and "next diff" link, but when clicking it doesn't show Instant Diff dialog, while it's normal in desktop. Nvdtn19 (talk) 09:03, 12 October 2025 (UTC)Reply

@Nvdtn19: Hi, thanks for the report! For optimization purposes (for now), Instant Diffs only processes links from the allowed selectors list. I have added support for both links in the inline diff table and mobile navigation links. Serhio Magpie (talk) 18:24, 12 October 2025 (UTC)Reply