Talk:Tech/News/2024/42
Add topicUpdate for Earwig's Copyvio Detector
[edit]Hi, Tech News writers!
I wanted to add in a recent update we deployed for Earwig's Copyvio Detector which now requires users to log in for search engine checks. Since the tool is used on a multitude of wikis, it would probably a good idea to announce the change on Tech News. I did come across two issues, though, which I can't address myself since I'm not familiar to writing here:
- There was no Phabricator task for this, since we don't use Phabricator for tracking tool issues. Where should the reference at the end of the entry link to?
- The tool does not have a documentation page on-wiki; its index page acts as its own documentation. Should this be linked to or should it remain unlinked?
I've come up with the following draft wording, in case it still needs revision:
[[toolforge:copyvios|Earwig's Copyvio Detector]] will now require users to log in with their Wikimedia account before running copyright violation checks using the "search engine" option.
Let me know your thoughts! Chlod (say hi!) 00:33, 5 October 2024 (UTC)
- Hi @Chlod! Thank you for the suggestion, and for the draft, and for posting it early! All appreciated.
- Re: Tech News links - We primarily place/format Phabricator links after each entry, and as bare external numbered links ("[1]"), because Phab links are (mostly) English-only, and we don't want to send all readers in all languages to an English-only page. I.e. they're often only there for reference in case they're needed (by anyone), such as for making related technical comments or filing new related tasks. Ideally, each Tech News entry should be understandable by any reader based entirely on the entry itself, with additional details via any inline links it contains.
- For the suggested entry, I'd suggest adding some very brief context for editors who are completely unaware of the tool. It looks like the tool doesn't have a translatable interface, so it's essentially restricted to bilingual editors, but it might still be of interest to those who can manually-translate/remember the UI strings. Hence I'd suggest expanding the tool's formal name to use the full (more translatable) words, e.g. something like...
- (where "[1]" = the Enwiki talkpage link).
Editors who use the Toolforge tool [[toolforge:copyvios|Earwig's Copyright Violation Detector]] will now be required to log in with their Wikimedia account before running checks using the "search engine" option. This change is needed to help prevent external bots from misusing the system. [1]
- Does that seem good, or improvable in any way?
- P.s. It's a great tool! Thank you for co-maintaining it. Quiddity (WMF) (talk) 19:17, 7 October 2024 (UTC)
- Hi, @Quiddity (WMF)! This is perfect, thank you! :D Chlod (say hi!) 05:28, 8 October 2024 (UTC)
Bdi
[edit]Hi, Quiddity. I think we're talking about completely different things. The link you gave about "Guidelines for consumers to avoid reliance on HTML structure" has nothing to do with my gadget and many others. When I'm talking about page structure changes, it's, for example, finding some atribute of some MediaWiki code and using it in gadget's purposes. In my gadget I find "diff" link in each Watchlist entry, get from the URL "diff" and "oldid" revision numbers in parameters and use them in calculations. And if the HTML structure of the page changes, there is another path to this MediaWiki provided URL. How can I get this URL without navigating on HTML? IKhitron (talk) 23:01, 9 October 2024 (UTC)
- Hi @IKhitron. That policy explicitly applies to your case and other gadgets as well. For an example of avoiding on HTML structure. You said for watchlist entries you needed the diff and oldid. This can be done in many better ways that wouldn't break easily and wouldn't rely on the HTML structure much:
:$('.mw-changeslist-line .mw-changeslist-diff').attr('href'); :or much better: :$('.mw-changeslist-line').attr('data-mw-revid'); :
- The first one, does a recursive search so if the diff gets wrapped under another element, it wouldn't break. The second one uses stable HTML identifiers (such as the ones starting with mw-) and its data.
- Also a lot of the information are available through javascript stable interfaces, such as mw:ResourceLoader/Core_modules#mediaWiki.config.
- HTH ASarabadani (WMF) (talk) 23:24, 9 October 2024 (UTC)
- Thank for your answer. But I don't need all the lines, only the current line. So my way is
$this.closest('...').find('...')
, which does depend on the HTML structure. As yours, actually, a change in a class name will break the code. So we are both relying on the HTML structure. Maybe there should be "not to rely on exact HTML structure" there in the text, which is definitely a good thing to do, but something very different from not relying at all, in my opinion. This way I need to fix some navigation in my code, but not all of it. And either way, they are not related to the given "Guidelines for consumers to avoid reliance on HTML structure" link, I think. IKhitron (talk) 23:39, 9 October 2024 (UTC)- I updated the link to make it clear where it says it's not recommended. Regarding relying on the class name, It explicitly says classes starting with
mw-
are safer to rely on and their class name won't change without prior communication (see the linked policy).$this.closest('...').find('...')
is fragile and will break. I suggested going to parent and then get a precise selector from the parent such as using the class name. ASarabadani (WMF) (talk) 23:54, 9 October 2024 (UTC)- 1) I still do not see anything connected even in the new link. 2) I do not understand why it will break, if I use
$this.closest('.mw-changeslist-line-watched').find('a[href*="diff"]')
, when you say it's OK to use "mw-" classes. 3) Using the parent is exactly the today's problem, because now, after adding of bdi, it is not in the parent any more, it is in parent of parent, so this way needed to add one more ".parent()" call. To me it looks worse. IKhitron (talk) 00:05, 10 October 2024 (UTC)
- 1) I still do not see anything connected even in the new link. 2) I do not understand why it will break, if I use
- I updated the link to make it clear where it says it's not recommended. Regarding relying on the class name, It explicitly says classes starting with
- Thank for your answer. But I don't need all the lines, only the current line. So my way is
A manual
[edit]Hi again, @Quiddity (WMF). There is a problem with the timef entry. There is no manual for the both new functions, one of them even not mentioned anywhere at all. I've asked at Phabricator to write something towards the Tech News distribution, but there was no answer on the last four days. I even wrote a possible draft for them. The link in the news entry goes nowhere. You think there is a way to have their attention to this problem in time before Monday? Otherwise we publish a new functionality without any clue how to use it. IKhitron (talk) 01:13, 11 October 2024 (UTC)
- Yes, that is why I unmarked it for translation. If there aren't more details today, then I'll bump it to next week. Quiddity (WMF) (talk) 16:36, 11 October 2024 (UTC)
- Thanks. IKhitron (talk) 16:56, 12 October 2024 (UTC)