User Story:
Similar to the watchlist expiry time, it should be possible for a user to set the watchlist labels for a page after they've clicked the watchstar (or watch link, on skins without a star).
Details:
- When selecting the Watch star, a popup opens, displaying Expiry and Labels fields.
- This popover replaces the previous mw.notify notification.
- The popover times out by itself after 5 seconds if not interacted with.
- When selecting the Watch star, the page is immediately watched or unwatched, regardless of whether the user interacts with the popover.
- The labels field is a MenuMultiselectLookup widget, with which it is possible to autocomplete on any of a user's watchlist labels. The labels are available from the action=userinfo API, and should not be loaded at page load time (note that the modules for the notification and popup are also not loaded, so they and the data can be loaded at the same time).
- There will be a hyperlink from the watch popup to Special:WatchlistLabels.
- Any number of labels will be able to be selected. As each is selected (i.e. its InfoChip appears) the set of labels is saved. This avoids the need for a 'save' button, and follows the behaviour of the expiry dropdown.
- No new labels are able to be created from this place.
- The action=watch API is updated to accept label IDs for assigning. T416291.
- The action=watch page action is updated to show a new 'watchlist labels' field. T418547
Details for QA:
- Should work in all supported skins.
- No-JS flow should make sense and all features be usable.
- Clicking the watchstar or menu triggers the loading of some extra ResourceLoader modules, and on slow connections this can be a noticeable delay. Some skins (e.g. Vector) indicate this by spinning the star.



