Wikidata interface currently features a number of sticky elements which are powered by JavaScript. This is a cool feature to have, but it can be realised entirely in CSS, which will work better in most modern browsers.
.wikibase-entitytermsforlanguagelistview-header {
position: -webkit-sticky;
position: sticky;
top: 0;
}I suggest that having to do calculations on scroll is too much for a relatively small enhancement and we can use CSS instead (at the very least for all browsers except IE, if we need that support). This will be more performant and responsive (now I routinely see the table header getting carried away from its content).
This dependency is related to current mechanism for sticking:
https://github.com/wikimedia/mediawiki-extensions-Wikibase/blob/a3736ac4e00dc33f78cc87364fd6feb3ff2301f2/view/resources/jquery/jquery.sticknode.js
This was already done once (and reverted) now ready to do again T212191#6960216
Acceptance criteria 🏕️🌟(18 August 2021)
- jquery.stickNode is replaced with CSS equivalent