Problem
The media PCS endpoint used in the gallery view was removed. See T248553: `media` endpoint stopped working as before
The gallery was restored using the media-list endpoint but it doesn't have the media metadata so the about button is currently unavailable.
This task is about adding the about button back with the media description, author, and license.
Solution
The media metadata can be retrieved using the LicenseUrl|LicenseShortName|ImageDescription|Artist&iiextmetadatalanguage=en&iiextmetadatamultilang=1&iiprop=url|extmetadata|dimensions&iiurlwidth=640&prop=imageinfo&rawcontinue=&titles=File:Volc%C3%A1n_Ubinas,_Arequipa,_Per%C3%BA,_2015-08-02,_DD_50.JPG | MW API.
Options to integrate it in the current version of the code include:
- fetch metadata (in batches) for all media as part of useArticle(). This change is made in a single place and the rest of the app stays as it is. It adds a delay before showing the article but the gallery and the about features will be fast.
- fetch metadata when the user selects the about button. This keeps the article loading as it is now but adds a delay when users use the about feature. It may require a loading indicator.
- lazy load the metadata after the article is loaded but before (hopefully) the users use the about button. This is more complex but probably gives the best user experience. Although all those network requests are quite wasteful for those users who will never look at the metadata.
For MVP
Implement option 2 that will fetch metadata when the user selects the about button. Use the loading indicator that exists for page previews within the app.
Description section: When the description is not available from the API, fallback to captions. If captions are not available, fallback to using the image file name in the description section.
Author and license: When the author information is not available, use the copy "Unknown author"