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

Refactor IdentifiersInput Vue component to not need isEdition checks #10301

Open
cdrini opened this issue Jan 9, 2025 · 2 comments · May be fixed by #10307
Open

Refactor IdentifiersInput Vue component to not need isEdition checks #10301

cdrini opened this issue Jan 9, 2025 · 2 comments · May be fixed by #10307
Assignees
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 3 Issues that we can consider at our leisure. [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 Jan 9, 2025

I think we can remove all the references to isEdition (or similar) from this code. Most of the logic was just checking for saveIdentifiersAsList , and now that that abstraction has come out, I think these can be cleared up as well! Instead of edition_popular, we can just have a popular_ids="['project_gutenberg', 'isbn']" and so on. This doesn't have to be edition-specific, and can just be a list of identifiers to be extracted from the pool of identifiers to be listed at the top. And then you can just check if there are any popular identifiers.

(Addendum of #10032)

Relevant Files

https://github.com/internetarchive/openlibrary/blob/master/openlibrary/components/IdentifiersInput.vue

Stakeholders

@schu96

@cdrini cdrini added Priority: 3 Issues that we can consider at our leisure. [managed] Type: Refactor/Clean-up Issues related to reorganization/clean-up of data or code (e.g. for maintainability). [managed] Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] labels Jan 9, 2025
@schu96
Copy link
Contributor

schu96 commented Jan 9, 2025

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

@cdrini
Copy link
Collaborator Author

cdrini commented Jan 9, 2025

Awesome, thank you @schu96 !

@schu96 schu96 linked a pull request Jan 9, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Lead: @cdrini Issues overseen by Drini (Staff: Team Lead & Solr, Library Explorer, i18n) [managed] Priority: 3 Issues that we can consider at our leisure. [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