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

BB-764: Unified form ISBNs bug #1083

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

insane-22
Copy link
Contributor

Problem

BB-764: On the unified form, ticking and then unticking the "Automatically add ISBN" checkbox results in the generated ISBN to be left over in the "edit identifiers" modal.
Unchecking should remove the auto-generated ISBN.

Solution

With the present code, what happens is that when the user checks the box for the first time, an action is dispatched to have the auto generated ISBN in the list of identifiers, but when he unchecks again, there was no direction to remove the added identifier. Hence, I have used this already defined removeIdentifierRow action:-
image

It requires rowId as a parameter, which we get using the addAutoIdentifier:-
image

After changes:-
https://github.com/metabrainz/bookbrainz-site/assets/116253210/ecfc1a2b-2f7e-45f0-817a-cc77243a27d9

Areas of Impact

src/client/unified-form/cover-tab/isbn-field.tsx
src/client/unified-form/interface/type.ts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant