Background
- As part of https://phabricator.wikimedia.org/T379444, we want to refactor pinnableElement.js to make it easier for the hooks to clear pinnable elements from columns. This requires improving the TOC pinning behavior, as it is the one edge case not handled by pinnableElement.js now.
Requirements
- TOC uses pinnableElements.js for pinning/unpinning behavior rather than custom code in setupIntersectionHandlers
- unneeded methods in pinnableElements.js are combined or deleted for maintainabliity
Acceptance criteria
- No changes in behavior. All pinnable menus can be pinned and unpinned, except on small viewports
- The TOC can continue to be pinned to the sticky header