==Why are we doing this?
To allow readers to see a preview of Wikipedia content on their phones on sites outside Wikipedia and its sister projects,
===Main features
- A card that displays a summary preview of the first sentence from the summary section of a Wikipedia article
- The card appears at the bottom of a phone screen
- Where a lead image is available, it shows a thumbnail of the image
- Where an article has no lead image, the card shows text only
- The card includes Wikipedia branding
- The card has a CTA that can redirect user to read full article on Wikipedia
- The card has licensing information
Interactions
- A user can tap on a hyperlink on a website to view the preview card
- A user can tap outside the card to close it
- Card can be dragged up to show slightly more information from the summary of an article
- When the card is dragged up, it can also show multiple images from the article
- Card can be an image only experience
- When there is no summary section of an article, no preview is shown
FUTURE: A user can select settings to decide if they want to see the preview or not
Functionality
- Works for LTR and RTL languages
===Requirements
* The `wikipediaPreviews.init()` function should accept a boolean `mobile` option. The goal is not to be responsive but to be in one of the two modes.
* The popup shows when a node with the `data-wikipedia-previews` attribute is tapped (instead of hover).
* To hide the popup, tap outside of it. (consider adding a close button to the popup)
* The popup is a bottom drawer occupying the bottom half of the screen.
* The README needs to be updated with the new init option
* Unit tests are mandatory
* If you find yourself writing `if (mobile) {...}` all over the place, consider writing mobile-specific versions of components and wiring them according to the mode.
==Notes
The Wikipedia Previews codebase is located at https://github.com/wikimedia/wikipedia-previews
You may fork the repository, commit to your fork and submit a pull request.