Handle deprecated XWiki.watchlist from xwiki.js

Hi everyone,

I recently started to work a bit on xwiki.js and I noticed that we’re still having XWiki.watchlist defined in there, even though it’s deprecated since XWiki 7.4.
I started some work to move it to compatibility.js (as part of [Misc] Clean up a bit xwiki.js to move deprecated stuff by surli · Pull Request #3230 · xwiki/xwiki-platform · GitHub) but I’m wondering if it’s useful at all: this code was meant to be used by the watchlist application which is not bundled in XWiki Standard for quite some time, and which is now moved to the attic.

So I see at least 3 options:

  1. we move it to compatibility.js as I did in the PR, since it was an API and it’s the standard rule
  2. we provide a new JSX that we put in the code of watchlist app in attic, to provide that API in XWiki: it involves a bit of work, especially since it needs to be done with an old version of XWiki. And ideally it involves to also release the extension. Knowing that this extension can’t even be installed in new versions of XWiki
  3. we remove entirely the code from XS, and maybe we attach in the extension page the javascript code that is needed and document it

Option 1 is already done, and it’s easy but it means we’ll keep forever this useless piece of code.
Option 2 would have been the solution to chose if the extension could still be installed: knowing that it can’t be installed I think it’s really too much work for little value.
Option 3 is the most reasonable option IMO and if we document the JS code it means we won’t lose it / allow people to still hack with it if they want to.

So I’d go for option 3 on my side, wdyt?

Given that it does not make any sense to have the watchlist app installed in XWiki these days, I feel option 3 is the one that makes the most sense.

For info I already pushed option 1 since it was done: [Misc] Deprecate watchlist in xwiki.js · xwiki/xwiki-platform@a5f8379 · GitHub. We can still go for option 3 if I get more feedbacks on that proposal.