internetarchive / openlibrary

One webpage for every book ever published!
https://openlibrary.org
GNU Affero General Public License v3.0
5.12k stars 1.34k forks source link

Replace edition identifier input with Vue component #9922

Open cdrini opened 7 hours ago

cdrini commented 7 hours ago

Proposal

We currently have a vue component, AuthorIdentifiers, we use on the authors page for this purpose (eg see the "Identifiers" section on https://openlibrary.org/authors/OL716700A/Francine_Pascal/edit ). We have a very similar component on the editions page for adding edition identifiers (eg Go to the edition tab, and then the "Identifiers" section of https://openlibrary.org/books/OL1088853M/Wizard's_First_Rule/edit ) which does not use Vue. We would like to expand AuthorIdentifiers with some new options to have it support edition identifiers, and then replace the edition identifiers with this new component.

How do they differ?

For legacy reasons, there are some slight differences as to how identifiers are stored on authors vs editions. We want to expand the vue component to support both schemes.

Authors:

Stored like this on the author record (eg https://openlibrary.org/authors/OL716700A/Francine_Pascal.json )

{
    "remote_ids": {
        "viaf": "12319102"
    },
}

And its passed as a prop the identifiers from https://openlibrary.org/config/author .

Editions: Stored like this on the edition record (eg https://openlibrary.org/books/OL1088853M.json)

{
    "identifiers": {
        "goodreads": ["914886"],
        "librarything": ["4070590"],
    }
}

Note it's a list. The possible identifiers should be passed in from the edition config.

Justification

Breakdown

Requirements Checklist

Tests

Related files

Stakeholders

@mheiman @RayBB


Instructions for Contributors

Please run these commands to ensure your repository is up to date before creating a new branch to work on this issue and each time after pushing code to Github, because the pre-commit bot may add commits to your PRs upstream.

schu96 commented 6 hours ago

@cdrini I'd like to be assigned to this issue