From f034e2a431b9f510283e7c6a171306eedd10e83a Mon Sep 17 00:00:00 2001 From: Andrew Dahms Date: Fri, 9 Apr 2021 11:47:57 +1000 Subject: [PATCH 1/4] Minor edits to the text in labels for bulk operations. --- .../bulkOperationConfirmation.test.tsx.snap | 12 ++++++------ .../frontend/src/app/bulkOperationConfirmation.tsx | 14 +++++++------- .../frontend/src/app/bulkOperationMetadata.tsx | 4 ++-- .../validation/validators/XrefValidator.java | 2 +- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/pantheon-bundle/frontend/src/app/__snapshots__/bulkOperationConfirmation.test.tsx.snap b/pantheon-bundle/frontend/src/app/__snapshots__/bulkOperationConfirmation.test.tsx.snap index e921b4a4f..2f3b7fa81 100644 --- a/pantheon-bundle/frontend/src/app/__snapshots__/bulkOperationConfirmation.test.tsx.snap +++ b/pantheon-bundle/frontend/src/app/__snapshots__/bulkOperationConfirmation.test.tsx.snap @@ -32,7 +32,7 @@ exports[`BulkOperationConfirmation tests should render BulkOperationConfirmation measureLocation="top" min={0} size="sm" - title="Update Succeeded" + title="Succeeded" tooltipPosition="top" value={50} valueText={null} @@ -49,7 +49,7 @@ exports[`BulkOperationConfirmation tests should render BulkOperationConfirmation measureLocation="top" min={0} size="sm" - title="Update failed" + title="Failed" tooltipPosition="top" value={10} valueText={null} @@ -66,7 +66,7 @@ exports[`BulkOperationConfirmation tests should render BulkOperationConfirmation measureLocation="top" min={0} size="sm" - title="No draft version found. No action taken" + title="No drafts found - no action taken" tooltipPosition="top" value={40} valueText={null} @@ -120,7 +120,7 @@ exports[`BulkOperationConfirmation tests should render BulkOperationConfirmation variant="large" > - Update Succeeded: + Succeeded:

- Update Ignored: + Ignored:

- Update Failed: + Failed:
} > -
-
-
+
+
+
- Update Succeeded: + Succeeded:
@@ -85,7 +85,7 @@ class BulkOperationConfirmation extends React.Component

- Update Ignored: + Ignored:
@@ -98,7 +98,7 @@ class BulkOperationConfirmation extends React.Component

- Update Failed: + Failed:
@@ -130,4 +130,4 @@ class BulkOperationConfirmation extends React.Component 0 && this.state.bulkUpdateWarning === this.props.documentsSelected.length) { - this.setState({ metadataEditError: "No draft versions found on selected items. Unable to save metadata." }) + this.setState({ metadataEditError: "No drafts found on selected items. Unable to save metadata." }) } }) } @@ -485,4 +485,4 @@ class BulkOperationMetadata extends React.Component Date: Thu, 12 Aug 2021 10:56:02 -0400 Subject: [PATCH 2/4] update xref error message --- .../java/com/redhat/pantheon/validation/model/Validation.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pantheon-bundle/src/main/java/com/redhat/pantheon/validation/model/Validation.java b/pantheon-bundle/src/main/java/com/redhat/pantheon/validation/model/Validation.java index 75bf4314e..25f704da2 100644 --- a/pantheon-bundle/src/main/java/com/redhat/pantheon/validation/model/Validation.java +++ b/pantheon-bundle/src/main/java/com/redhat/pantheon/validation/model/Validation.java @@ -26,7 +26,7 @@ public interface Validation extends WorkspaceChild { default Validation setValidation (Violations violations, int index) { if(null != violations.get(PantheonConstants.TYPE_XREF)){ - this.message().set("invalid Cross reference exists in the document"); + this.message().set("Invalid cross references"); this.status().set("error"); this.validationType().set("xref"); this.xrefTarget().set(violations.get(PantheonConstants.TYPE_XREF).getDetails(index)); From ee56250429b3166c00835a3c17abdc22e3c65532 Mon Sep 17 00:00:00 2001 From: Lisa Davidson Date: Thu, 12 Aug 2021 15:58:09 -0400 Subject: [PATCH 3/4] re-work bulk publish/unpublish title logic --- .../src/app/BulkOperationPublish.test.tsx | 1 + .../frontend/src/app/BulkOperationPublish.tsx | 5 ++++- .../frontend/src/app/BulkPublishConfirmation.tsx | 15 ++++++++------- pantheon-bundle/frontend/src/app/search.tsx | 10 +++++++--- 4 files changed, 20 insertions(+), 11 deletions(-) diff --git a/pantheon-bundle/frontend/src/app/BulkOperationPublish.test.tsx b/pantheon-bundle/frontend/src/app/BulkOperationPublish.test.tsx index ad9fe6578..5288e9edb 100644 --- a/pantheon-bundle/frontend/src/app/BulkOperationPublish.test.tsx +++ b/pantheon-bundle/frontend/src/app/BulkOperationPublish.test.tsx @@ -13,6 +13,7 @@ const props = { isBulkPublish: true, isBulkUnpublish: false, bulkOperationCompleted: true, + bulkOperationTitle: "Bulk Publish", updateIsBulkPublish: (isBulkPublish) => anymatch, updateIsBulkUnpublish: (isBulkUnpublish) => anymatch, updateBulkOperationCompleted: (bulkOperationCompleted) => anymatch diff --git a/pantheon-bundle/frontend/src/app/BulkOperationPublish.tsx b/pantheon-bundle/frontend/src/app/BulkOperationPublish.tsx index 7fe706941..af7ed66f5 100644 --- a/pantheon-bundle/frontend/src/app/BulkOperationPublish.tsx +++ b/pantheon-bundle/frontend/src/app/BulkOperationPublish.tsx @@ -11,6 +11,7 @@ export interface IBulkOperationPublishProps { isBulkPublish: boolean isBulkUnpublish: boolean bulkOperationCompleted: boolean + bulkOperationTitle: string updateIsBulkPublish: (isBulkPublish) => any updateIsBulkUnpublish: (isBulkUnpublish) => any updateBulkOperationCompleted: (bulkOperationConfirmation) => any @@ -126,7 +127,8 @@ class BulkOperationPublish extends React.Component} diff --git a/pantheon-bundle/frontend/src/app/BulkPublishConfirmation.tsx b/pantheon-bundle/frontend/src/app/BulkPublishConfirmation.tsx index 0f2f96d35..99d9b4a44 100644 --- a/pantheon-bundle/frontend/src/app/BulkPublishConfirmation.tsx +++ b/pantheon-bundle/frontend/src/app/BulkPublishConfirmation.tsx @@ -15,6 +15,7 @@ export interface IBulkPublishProps { onShowBulkOperationConfirmation: (showBulkConfirmation) => any isBulkUnpublish: boolean bulkOperationCompleted: boolean + bulkOperationTitle: string updateBulkOperationCompleted: (bulkOperationCompleted) => any } @@ -50,7 +51,7 @@ class BulkPublishConfirmation extends React.Component{
} actionLinks={ @@ -58,9 +59,9 @@ class BulkPublishConfirmation extends React.Component{ } > -
-
- {!this.props.isBulkUnpublish &&
} +
+
+ {!this.props.isBulkUnpublish &&
}
{ onClose={this.handleModalToggle} footer={footer} > - {`${this.props.isBulkUnpublish ? "Unpublished" : "Published"} Succeessfully:`} + Succeeded:
{this.props.updateSucceeded.length > 0 && @@ -88,7 +89,7 @@ class BulkPublishConfirmation extends React.Component{

- {!this.props.isBulkUnpublish && (
Publish Ignored: + {!this.props.isBulkUnpublish && (
Ignored: {this.props.updateIgnored.length > 0 && {this.props.updateIgnored.split(",").map((data, index) => ( @@ -102,7 +103,7 @@ class BulkPublishConfirmation extends React.Component{
)}

- {`${this.props.isBulkUnpublish ? "Unpublish" : "Publish"} Failed:`} + Failed:
{this.props.updateFailed.length > 0 && diff --git a/pantheon-bundle/frontend/src/app/search.tsx b/pantheon-bundle/frontend/src/app/search.tsx index 6663aa268..f6155a94c 100644 --- a/pantheon-bundle/frontend/src/app/search.tsx +++ b/pantheon-bundle/frontend/src/app/search.tsx @@ -63,6 +63,7 @@ export interface ISearchState { // bulk publish isBulkPublish: boolean isBulkUnpublish: boolean + bulkOperationTitle: string } class Search extends Component { private drawerRef: React.RefObject; @@ -110,7 +111,8 @@ class Search extends Component { //bulk operation - publish isBulkPublish: false, - isBulkUnpublish: false + isBulkUnpublish: false, + bulkOperationTitle: "Bulk Publish", }; this.drawerRef = React.createRef(); } @@ -348,6 +350,7 @@ class Search extends Component { isBulkPublish={this.state.isBulkPublish} isBulkUnpublish={this.state.isBulkUnpublish} bulkOperationCompleted={this.state.bulkOperationCompleted} + bulkOperationTitle={this.state.bulkOperationTitle} updateIsBulkPublish={this.updateIsBulkPublish} updateIsBulkUnpublish={this.updateIsBulkUnpublish} updateBulkOperationCompleted={this.updateBulkOperationCompleted} @@ -358,6 +361,7 @@ class Search extends Component { isBulkPublish={this.state.isBulkPublish} isBulkUnpublish={this.state.isBulkUnpublish} bulkOperationCompleted={this.state.bulkOperationCompleted} + bulkOperationTitle={this.state.bulkOperationTitle} updateIsBulkPublish={this.updateIsBulkPublish} updateIsBulkUnpublish={this.updateIsBulkUnpublish} updateBulkOperationCompleted={this.updateBulkOperationCompleted} @@ -687,7 +691,7 @@ class Search extends Component { //determine if publish or unpublish bulk operation if (text === 'publish') { - this.setState({ isBulkPublish: !this.state.isBulkPublish, isBulkUnpublish: false }, () => { + this.setState({ isBulkPublish: true, isBulkUnpublish: false, bulkOperationTitle: "Bulk Publish" }, () => { if (this.state.bulkOperationWarn === false && this.state.repositoriesSelected.length === 1) { this.setState({ isBulkOperationButtonDisabled: false, bulkOperationCompleted: false }) } else { @@ -696,7 +700,7 @@ class Search extends Component { }) } else if (text === 'unpublish') { - this.setState({ isBulkUnpublish: !this.state.isBulkUnpublish, isBulkPublish: false }, () => { + this.setState({ isBulkUnpublish: true, isBulkPublish: false, bulkOperationTitle: "Bulk Unpublish" }, () => { if (this.state.bulkOperationWarn === false && this.state.repositoriesSelected.length === 1) { this.setState({ isBulkOperationButtonDisabled: false, bulkOperationCompleted: false }) } else { From 2bfbf27c58a277656046cc3a3cc69fb268838fc1 Mon Sep 17 00:00:00 2001 From: Lisa Davidson Date: Thu, 12 Aug 2021 15:58:22 -0400 Subject: [PATCH 4/4] re-work bulk publish/unpublish title logic --- pantheon-bundle/frontend/src/app/BulkOperationPublish.tsx | 1 - 1 file changed, 1 deletion(-) diff --git a/pantheon-bundle/frontend/src/app/BulkOperationPublish.tsx b/pantheon-bundle/frontend/src/app/BulkOperationPublish.tsx index af7ed66f5..7e3cf9cbf 100644 --- a/pantheon-bundle/frontend/src/app/BulkOperationPublish.tsx +++ b/pantheon-bundle/frontend/src/app/BulkOperationPublish.tsx @@ -127,7 +127,6 @@ class BulkOperationPublish extends React.Component