Page MenuHomePhabricator

Merge jquery.cookie and mediawiki.cookie modules
Open, Needs TriagePublic


The jquery.cookie and mediawiki.cookie scripts are both quite small. Both separately and combined, they don't really make sense to me to register as their own top-level bundle. But at least as a first step we can combine the two.

This would also be a good time to acknowledge the fact that we have forked jquery-cookie (ref change 655719, and clean up and simplify the code to align with our current best practices.

jquery.cookie can be an alias for mediawiki.cookie, to be removed once core and bundled/wmf exensions have migrated.

Although we don't yet have a deprecation policy for modules and other frontend code, it seems fair that given its widespread use, we should keep the alias in at least one stable release. We'll also want to notify Tech News and perhaps wait for, or help make happen, a tourbot to fix the majority of simple gadget dependencies and mw.loader calls.

This migration can already start today because mediawiki.cookie naturally depends on (and thus provides) jquery.cookie.

NOTE: We are not deprecating $.cookie. This function will continue to be provided as a low-level interface for direct cookie reads. Use of the higher-level mw.cookie interface is and remains completely optional. This task is about the bundle in which these JavaScript codes are delived from the server to the browser. The module name jquery.cookie will deprecated once its contents have been merged into mediawiki.cookie.