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

Name deduplication improvements #522

Merged
merged 8 commits into from Oct 9, 2020
Merged

Conversation

MonkeyDo
Copy link
Contributor

@MonkeyDo MonkeyDo commented Oct 7, 2020

Problem

This PR addresses a few issues with name deduplication and other search-related mechanisms in the entity editor:

  • BB-356: Editions with the same name should be allowed
  • BB-413: Name deduplication triggers for the entity being edited
  • BB-537: Don't auto-select matching Edition Group

Solution

  1. Allow Editions and Edition Groups with the same name (without requiring a disambiguation)
  2. Autocomplete and deduplication mechanisms should filter out the entity being edited from its results to avoid conflict with itself.
  3. For an Edition with a name matching that of an Edition Group, instead of auto-selecting the first exact match, display a list of exact matches to allow the editor to select one, or opt for searching for another one or automatically creating one; once an EG is selected, hide the list of matches:

Here a match is shown, but not selected yet, and an EG will be created automatically.
Capture d’écran 2020-10-09 à 12 40 45

Here the editor chose to search for an existing one and can select one or choose to revert to auto-creation.
Capture d’écran 2020-10-09 à 12 43 08

Here the exact match was selected. If any EG is selected, we hide the list of matches (we don't want to confuse editors with a warning-colour thing when everything is all right)
Capture d’écran 2020-10-09 à 12 41 04

Areas of Impact

EntityEditor component, mainly EditionSection and NameSection.

Don't deduplicate Editions and Edition Groups for now, until we have a better way to compare (author for EG, edition date, published, etc. for Edition)
Allow to search for existing edition groups for new editions
Instead display possible options and also allow to search or auto-create.
If an EG is selected, hide the matching EGs component
…lication

If I'm editing an existing entity, remove said entity from the alias-related search results (autocomplete and deduplication [disambiguation requirement])
@coveralls
Copy link

coveralls commented Oct 7, 2020

Coverage Status

Coverage increased (+0.01%) to 60.851% when pulling 1831eeb on dont-deduplicate-editions into 55ff508 on master.

Allow for an EG to be created automatically even though there is an EG with the same name as the Edition, essentially creating a possibly duplicate EG.
MonkeyDo added a commit to metabrainz/bookbrainz-data-js that referenced this pull request Oct 8, 2020
If an Edition doesn't have an EG filled (whether it be during creation or edit, previously only for cretion), auto create an EG.
See metabrainz/bookbrainz-site#522 for context
@MonkeyDo MonkeyDo merged commit 1d0d594 into master Oct 9, 2020
@MonkeyDo MonkeyDo deleted the dont-deduplicate-editions branch January 14, 2021 15:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants