The Cards extension is confusing, neglected and there are problems with the documentation. We will resolve this by consolidating the code with RelatedArticles
= Acceptance criteria
[] Move Cards RL modules that are used by RelatedPages into RelatedArticles extension.
[] Remove any unused RL code in the Card extension
[] Remove the Cards extension from the cluster
[] Update [[ https://mediawiki.org/wiki/Extension:Cards | Cards ]] and [[ https://mediawiki.org/wiki/Extension:RelatedArticles | RelatedPages ]] documentation
= Original task
Given that I include cards through the mw.cards.CardsGateway
When I show the cards
Then I expect the cards to show the same images as those I get from pageimages
That doesn't work as expected.
Note the code example at [[ https://www.mediawiki.org/wiki/Extension:Cards | Extension:Cards#How to Use ]] is
```
mw.loader.using( 'ext.cards' ).done( function () {
var gateway = new mw.cards.CardsGateway( { api: new mw.Api() } );
// 'Book' and 'Phone' are page titles, 200 is the thumbnail width in pixels
gateway.getCards( ['Book', 'Phone'], 200 ).done( function( cards ) {
$( '#bodyContent' ).append( cards.$el );
} );
} );
```
This leads to a api-call [[ https://no.wikipedia.org/w/api.php?action=query&format=json&prop=extracts%7Cpageimages&explaintext=true&exlimit=3&exintro=true&exsentences=1&pithumbsize=200&titles=Test+av+pageimages%7CShania_Twain%7CAdele_Adkins&continue=&formatversion=2 | like this ]], but that has a continue value set, which is not resolved before `getCards()` returns. Ie. the whole set is not downloaded, only the initial part is, and thus only a single card has an image.
Either `getCards()` must return a resolved set or the extension page must describe how the developer can resolve the full set herself. In the present state the example is incomplete
{F4119233}
All of the cards should have images, but only one does.
The usual proof that it did actually happen! :)