Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace edition identifier input with Vue component #9922

Open
cdrini opened this issue Oct 1, 2024 · 1 comment · May be fixed by #9957
Open

Replace edition identifier input with Vue component #9922

cdrini opened this issue Oct 1, 2024 · 1 comment · May be fixed by #9957
Assignees
Labels
Affects: Librarians Issues related to features that librarians particularly need. [managed] Lead: @mheiman Needs: Response Issues which require feedback from lead Priority: 2 Important, as time permits. [managed] Type: Refactor/Clean-up Issues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed]

Comments

@cdrini
Copy link
Collaborator

cdrini commented Oct 1, 2024

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

  • Expand AuthorIdentifiers with two new options:
    • multiple: true/false -- whether it's a list or a single value
    • input-prefix: str -- where to save; e.g. author--remote_ids-- for authors, or edition--identifiers-- (or something like this; might need tweaking)
  • Update the edition edit page, to render the new component.
  • Incorporate any extra validation / etc in the existing edition identifiers into the
  • Delete the code for the old edition identifiers selection
  • Rename AuthorIdentifiers to IdentifiersInput and update all references.

Tests

  • Confirm adding an IA edition is still restricted to super-librarians, as before.
  • Can add multiple IA identifiers to editions per identifier-type
  • Can delete identifiers on editions
  • Can add only one identifier to authors
  • Can delete identifiers on authors

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.

@cdrini cdrini added Type: Refactor/Clean-up Issues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed] Priority: 2 Important, as time permits. [managed] Affects: Librarians Issues related to features that librarians particularly need. [managed] Lead: @mheiman labels Oct 1, 2024
@cdrini cdrini changed the title Replace edition identifier with Vue component Replace edition identifier selector with Vue component Oct 1, 2024
@schu96
Copy link
Contributor

schu96 commented Oct 1, 2024

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

@cdrini cdrini changed the title Replace edition identifier selector with Vue component Replace edition identifier input with Vue component Oct 1, 2024
@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label Oct 2, 2024
@schu96 schu96 linked a pull request Oct 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Affects: Librarians Issues related to features that librarians particularly need. [managed] Lead: @mheiman Needs: Response Issues which require feedback from lead Priority: 2 Important, as time permits. [managed] Type: Refactor/Clean-up Issues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed]
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants