Community Wishlist Survey 2022/Larger suggestions/Cascade-watching
This proposal is a larger suggestion that is out of scope for the Community Tech team. Participants are welcome to vote on it, but please note that regardless of popularity, there is no guarantee this proposal will be implemented. Supporting the idea helps communicate its urgency to the broader movement. |
Cascade-watching
- Problem: Users watching a page are not notified of changes to transcluded pages.
- Proposed solution: Implement "cascade-watching" so that users watching a page are notified of changes to transcluded pages.
- Who would benefit: All watchers.
- More comments: Some use cases:
- Changes to templates used in all kinds of pages. Such changes often affect the content and not just the format of the pages, but users watching them are not notified.
- Changes to excerpts done via en:Template:Excerpt or other methods. Currently, usage of excerpts in featured and important articles is controversial because users watching the articles are not notified of changes to sub-articles (unless they also watch the sub-articles), see en:Module talk:Excerpt#Should featured articles also use excerpts? Having excerpts on more featured and important articles would go a long way in spreading their existence and usefulness (namely to prevent duplicate work, improve content quality and foster collaboration).
- Changes to sub-pages such as are often used in Village Pumps and non-encyclopedic pages. For instance, if I watch Community Wishlist Survey 2022/Watchlists I'm not notified of changes to this sub-page (Community Wishlist Survey 2022/Watchlists/Cascade-watching).
- Phabricator tickets: phab:T55525
- Proposer: Sophivorus (talk) 13:32, 19 January 2022 (UTC)
Discussion
- I can see how this interesting suggestion would be useful. There are a few edge cases to specify, especially when a page is transcluded by multiple watched pages and one becomes unwatched, perhaps by a timed watch expiring. We also need to be clear what happens when the transclusions themselves change, e.g. Portal:Fruit stops transcluding Apple and transcludes Banana instead. Certes (talk) 13:44, 19 January 2022 (UTC)
- @Sophivorus: you only mentioned one template above that could be transcluded (the "excerpt" one) - are you intended dev work on this to be limited to only this specific template - or to the general use case of watching all transclusions, cascaded?The later obviously has a much larger use-case. — xaosflux Talk 13:59, 19 January 2022 (UTC)
- @Xaosflux You're very right, I've updated the proposal to make it more general. Sophivorus (talk) 14:15, 19 January 2022 (UTC)
- @Sophivorus: usage question, so for example if someone were to watch the page w:en:Hoodoo Mountain with this option, then when they view their watchlist they should see changes to that page, and also to:
List of transcluded pages on that page |
---|
|
- Is that what you are envisioning? — xaosflux Talk 14:27, 19 January 2022 (UTC)
- @Xaosflux Hmm I think it may be more sensible to notify of changes to just the "first-level" of transclusions. Sophivorus (talk) 14:31, 19 January 2022 (UTC)
- Discussing with the team, we feel this is probably too large of a project for us. We can offer to move it to our Larger suggestions category for broader attention, or we have a counter-proposal: Offer a way to watch a page and all the templates/pages transcluded on it. The problem of course is unwatching. There's currently no structured relationship between multiple watched items, and introducing that is going to be a massive feat. Additionally, we wouldn't be able to auto-watch anything else that gets transcluded, so watching the Community Wishlist Survey 2022/Watchlists page for instance (which is a great example, thank you) and having it auto-watch all future transcluded pages wouldn't be in scope for us. Sorry! @Sophivorus: Would like us to move this to Larger suggestions, are would the cheap "watch this page + transclusions" feature do it for you? MusikAnimal (WMF) (talk) 22:48, 19 January 2022 (UTC)
- Somewhat related proposal: Community Wishlist Survey 2022/Watchlists/Pattern matching article titles. I envision a Special:BulkWatchPages sort of special page, where you can watch pages with the option of including transclusions, as well as the pattern matching, subpages, etc. MusikAnimal (WMF) (talk) 22:51, 19 January 2022 (UTC)
- @Sophivorus Could you comment on the above? We need an answer before Friday at 18:00 UTC, or we will assume it's okay to move this into our Larger suggestions category. Thanks! MusikAnimal (WMF) (talk) 05:26, 27 January 2022 (UTC)
- Somewhat related proposal: Community Wishlist Survey 2022/Watchlists/Pattern matching article titles. I envision a Special:BulkWatchPages sort of special page, where you can watch pages with the option of including transclusions, as well as the pattern matching, subpages, etc. MusikAnimal (WMF) (talk) 22:51, 19 January 2022 (UTC)
- Special:Recentchangeslinked continues to exist. --Izno (talk) 23:07, 19 January 2022 (UTC)
@User:MusikAnimal (WMF) Hi, sorry for the delay! I wanted to try implement the functionality through an extension to understand the difficulty. Today I did my attempt and I think I understand now. Here's the essence of my little extension:
class CascadeWatching {
static function onPageSaveComplete(
WikiPage $wikiPage,
MediaWiki\User\UserIdentity $user,
string $summary,
int $flags,
MediaWiki\Revision\RevisionRecord $revisionRecord,
MediaWiki\Storage\EditResult $editResult
) {
$Title = $wikiPage->getTitle();
$Parents = $Title->getTemplateLinksTo();
foreach ( $Parents as $Parent ) {
// If $Parent is in user watchlist
// update wl_notificationtimestamp at https://www.mediawiki.org/wiki/Manual:Watchlist_table ?
// or maybe notify the user via Echo ?
// or do we need to do something different and probably new to the watchlist ?
}
}
}
I think the problems are actually two:
- First and foremost, that there seems to be no adequate field or convention in the current watchlist system to notify the user that "there's been a change to this page because there's been a change to this transcluded page" and sending an Echo notification seems overkill.
- Second, that sometimes pages may be listed as transcluded even though they actually aren't, as for example when the Wikipedia:Template:Annotated link (due to it using a Lua method I can't recall right now). I may be wrong about this but I recall this being the case.
Is my assessment correct? Or did you identify other difficulties? In any case, I guess sending it to "Larger suggestions" would be preferable, since the JavaScript solution, however doable and appreciated, seems to me with too many problems. Thanks! Sophivorus (talk) 12:00, 27 January 2022 (UTC)
- Or am I wrong about #1? Thinking a bit more about it, it seems Wikidata already pushes notifications to watchers of a page when a change is done to the linked Wikidata item. Sophivorus (talk) 12:18, 27 January 2022 (UTC)
- @Sophivorus If you wanted to treat a page and all of the transcluded pages as separate watched items, there's no issue in my mind apart from #2, and that you may unknowingly watch a lot of pages some of which you don't care about. For instance, by watching a page you also watch its talk page, so would you want to watch all transcluded pages there, too? Including {{reply to}}, etc.?
- My assumption was you'd want to for instance watch Example and if there's a change to a template used on Example, it not only shows up on your watchlist but also indicates it shows up as a transclusion on Example (so that you understand why its on your watchlist). And if you were to unwatch w:Example, it would also unwatch all of the transcluded pages. That's the part that doesn't exist -- a relationship between watched items. We could establish this with a new table, but in order to leverage the existing backend watchlisting system, every transclusion must also be a watched item (in the
watchlist
table). Your code snippet seems to instead recreate this system by looping through the transclusions on every edit. This could cause performance problems (I'm not sure), among a hosts of other problems in splitting the logic into the extension code rather than using what comes free with Core. - I think all of this is absolutely doable. When there's a will, there's a way. It's just that after having spent ~6 months to bring you mw:Help:Watchlist expiry, we're pretty familiar with the watchlist backend, and were going off intuition that this proposal may be out of scope for us. With your word, we will move this to Larger suggestions. Kind regards, MusikAnimal (WMF) (talk) 16:51, 27 January 2022 (UTC)
- Where do we stand with this now, @Sophivorus? I'm asking because of a comment on my talk page here: https://en.wikipedia.org/wiki/User_talk:EMsmile#Excerpt_function EMsmile (talk) 10:48, 31 May 2022 (UTC)
- @EMsmile Hi! No progress so far. My short talk above with @MusikAnimal (WMF) summarizes some of the difficulties. Sophivorus (talk) 12:18, 31 May 2022 (UTC)
- Where do we stand with this now, @Sophivorus? I'm asking because of a comment on my talk page here: https://en.wikipedia.org/wiki/User_talk:EMsmile#Excerpt_function EMsmile (talk) 10:48, 31 May 2022 (UTC)
Voting
- Support * Pppery * it has begun 19:04, 28 January 2022 (UTC)
- Support --Arnd (talk) 20:36, 28 January 2022 (UTC)
- Support — Draceane talkcontrib. 22:42, 28 January 2022 (UTC)
- Support Transclusion is a vital tool for reducing redundant content forks, and better watching for it would help it to be done more. {{u|Sdkb}} talk 04:21, 29 January 2022 (UTC)
- Support Aca (talk) 16:20, 29 January 2022 (UTC)
- Support --NGC 54 (talk|contribs) 23:15, 29 January 2022 (UTC)
- Support TheInternetGnome (talk) 08:55, 30 January 2022 (UTC)
- Support JPxG (talk) 01:12, 31 January 2022 (UTC)
- Support Libcub (talk) 01:37, 31 January 2022 (UTC)
- Support the wub "?!" 15:05, 31 January 2022 (UTC)
- Support Lectrician1 (talk) 20:27, 31 January 2022 (UTC)
- Support Hires an editor (talk) 00:22, 2 February 2022 (UTC)
- Support Excerpts are an amazing tool and need to become usable/practical also for featured articles. EMsmile (talk) 10:34, 4 February 2022 (UTC)
- Support Anti-vandalism efforts Thingofme (talk) 14:45, 5 February 2022 (UTC)
- Support --Ciao • Bestoernesto • ✉ 20:17, 6 February 2022 (UTC)
- Support —— Eric Liu(Talk) 07:36, 7 February 2022 (UTC)
- Support Daniel Case (talk) 03:41, 8 February 2022 (UTC)
- Support β16 - (talk) 11:10, 10 February 2022 (UTC)
- Support TheFrog001 (talk) 15:08, 10 February 2022 (UTC)