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

Fix(AC): users should be able to make Author Credits optional #871

Merged
merged 18 commits into from
Jul 19, 2023

Conversation

tr1ten
Copy link
Collaborator

@tr1ten tr1ten commented Aug 11, 2022

This PR does two things:

  • Adds visual validation for Author Credits, showing an error if left empty
  • Adds a checkbox so that users can make the AC optional

@MonkeyDo MonkeyDo changed the title Fix(AC): AC field should show error when empty Fix(AC): users should be able to make Author Credits optional Sep 1, 2022
Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on making this better !
Let me know if you have any question about the comments below

Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking pretty good

I tried the PR locally, but it looks like creation an Edition with name section filled, EG selected and AC disabled is not considered valid (submit button is disabled).
Can you please also try this?

Secondly, we should disable the AC edit button when AC is disabled. Currently with AC disabled the AC field is disabled but I can still click edit to open the modal.

src/client/entity-editor/validators/common.ts Outdated Show resolved Hide resolved
src/client/entity-editor/validators/common.ts Outdated Show resolved Hide resolved
src/client/entity-editor/validators/edition.ts Outdated Show resolved Hide resolved
tr1ten and others added 12 commits September 9, 2022 19:05
Previously it was in the buttonBar section, which is eventually going to be deprecated.
to author-credit-editor actions file, so that it can be shared between the Edition and EditionGroup sections
Reworked mapStateToProps and the new checkbox to disable ACs to fix a couple of issues and simplify a tad
Went from buttonBar to editionSection / editionGroupSection
For new entities whose entitySection is an empty object
which might be undefined (for new entities) in mapStateToProps
Made a mistake when refactoring !
missing `authorCreditEnable: false` for all the edition data
@MonkeyDo MonkeyDo merged commit 665518d into metabrainz:master Jul 19, 2023
4 checks passed
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