internetarchive / openlibrary

One webpage for every book ever published!

Home Page:https://openlibrary.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add Wikipedia link to author page based on Wikidata

RayBB opened this issue · comments

Problem

A clear and concise description of what you want to happen

We now have wikidata info pulled in for all authors and want to start using this to improve the author page.

The first thing we should do is add WIkipedia links.
The links should be language aware

  • Show the same language as the user is currently viewing the site in, fall back to english

Expected behaviour / screenshots (ex: Figma design screenshots for UI feature)

Additional Context

This is just the first of the icons we want to display. In the future we will display a few others like Twitter, Instagram, Facebook (to be determined which).

Proposal & Constraints

What is the proposed solution / implementation?

This should be fairly straightforward to get the appropriate sitelink doing something similar to

def get_description(self, language: str = 'en') -> str | None:

For the UI component we need:

  1. An icon for wikipedia (probably one of these) - note phosphor or fluent don't have wikipedia icons
  2. Show the icon on the right sidebar under birth
  3. The icon should have alt text saying wikipedia and linking to the correct page.

Leads

Related files

Stakeholders

Note: Before making a new branch or updating an existing one, please ensure your branch is up to date.