All of our users should be able to use the watchstar functionality.
Current problems:
T141924 is related to the first two points.
- Users with non-JS browsers are not able to watch an article. The watch icon doesn't show. To reproduce login at https://en.m.wikipedia.org/wiki/Book and make sure you're not watching the page. Then disable JS and reload the page. You'll notice the watchstar icon is gone (the mw-ui-icon-watch class is not added by PHP).
- Users with non-JS browsers are not able to un-watch an article. The un-watch icon doesn't show. To reproduce login at https://en.m.wikipedia.org/wiki/Book and make sure you are watching the page. Then disable JS and reload the page. You'll notice the watchstar icon is gone (the mw-ui-icon-watched class is not added by PHP).
- The JS version of the watchstar replaces the PHP rendered markup. This is problematic because:
- JS and non-JS versions will need to be styled differently.
- this is an unnecessary DOM manipulation by JS. We should use the existing a element and not replace it with a button element.
- the new mark-up is different from the one in Vector. We should strive for consistency.
Proposed solutions:
Watchstar works regardless of whether the user's browser supports JS. The JS version uses the PHP rendered mark-up and doesn't reinvent the wheel.