diff --git a/CHANGES.md b/CHANGES.md index c57e894b..958b2334 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,5 +1,9 @@ # Changes +Version 2.0.0 (released 2023-02-09) + +- Add direct publish workflow for submitting to communities + Version 1.2.0 (released 2023-01-20) - Always send a `pids` key to the backend. That change is needed as the backend behavior diff --git a/package-lock.json b/package-lock.json index 5ec8837d..0797faaa 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "react-invenio-deposit", - "version": "1.2.0", + "version": "2.0.0", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "react-invenio-deposit", - "version": "2.0.0", + "version": "1.2.0", "license": "MIT", "devDependencies": { "@babel/cli": "^7.5.0", diff --git a/package.json b/package.json index 24763f69..f21f7af3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-invenio-deposit", - "version": "1.2.0", + "version": "2.0.0", "description": "React components to build forms in Invenio", "main": "dist/cjs/index.js", "browser": "dist/cjs/index.js", diff --git a/src/lib/components/CommunitySelectionModal/CommunitySelectionModal.js b/src/lib/components/CommunitySelectionModal/CommunitySelectionModal.js index 16842afa..03e70a71 100644 --- a/src/lib/components/CommunitySelectionModal/CommunitySelectionModal.js +++ b/src/lib/components/CommunitySelectionModal/CommunitySelectionModal.js @@ -27,6 +27,10 @@ class CommunitySelectionModalComponent extends Component { onCommunityChange(community); this.setState({ localChosenCommunity: null, modalOpen: false }); }, + // NOTE: We disable the eslint check as the actual destructing leads to a problem + // related to the updated state value. To avoid this, we need to access the + // `this.state` variable directly in the definition of the function so that any + // consumption of it, will return always the latest updated value. // eslint-disable-next-line react/destructuring-assignment getChosenCommunity: () => this.state.localChosenCommunity, userCommunitiesMemberships, diff --git a/src/lib/components/PublishButton/SubmitReviewModal.js b/src/lib/components/PublishButton/SubmitReviewModal.js index 50329933..a1a1b8b8 100644 --- a/src/lib/components/PublishButton/SubmitReviewModal.js +++ b/src/lib/components/PublishButton/SubmitReviewModal.js @@ -93,9 +93,9 @@ export class SubmitReviewModal extends Component { fieldPath="acceptAccessToRecord" label={ view and edit your upload's metadata and files." + )} values={{ communityTitle, }}