The mediawiki.viewport module was deprecated in T284179
This task encompasses updating RelatedArticles to use IntersectionObserver and remove usage of the module.
We previously did this in QuickSurveys, so we have an example of how to do this: https://gerrit.wikimedia.org/r/c/698050 , doing this in RelatedArticles will more or less copy that approach.
IntersectionObserver https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API
QA
https://en.m.wikipedia.beta.wmflabs.org/w/index.php?title=Related_test
Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Related_test and verify that 3 cards show at the bottom of the page.
Visit https://en.m.wikipedia.beta.wmflabs.org/wiki/Related_Articles_3# and drop your Internet connection offline. Scroll to the bottom of page and verify there are no cards.
Restore internet connection and refresh page. Now scroll to bottom of page and verify that you see the three cards.
QA Results - Beta
AC | Status | Details |
---|---|---|
1 | ✅ | T284251#7497631 |
2 | ✅ | T284251#7497631 |
3 | ||
QA Results - Prod
AC | Status | Details |
---|---|---|
1 | ✅ | T284251#7522153 |
2 | ✅ | T284251#7522153 |
3 | ✅ | T284251#7522153 |