diff --git a/wherehows-web/app/components/dataset-compliance-rollup-row.ts b/wherehows-web/app/components/dataset-compliance-rollup-row.ts index be0aac25d0..db905f8bb4 100644 --- a/wherehows-web/app/components/dataset-compliance-rollup-row.ts +++ b/wherehows-web/app/components/dataset-compliance-rollup-row.ts @@ -27,6 +27,11 @@ import { IComplianceEntity } from 'wherehows-web/typings/api/datasets/compliance export default class DatasetComplianceRollupRow extends Component.extend({ tagName: '' }) { + /** + * References the parent external action to handle double click events on the field name + * @memberof DatasetComplianceRollupRow + */ + onFieldDblClick: () => void; /** * References the parent external action to add a tag to the list of change sets * @memberof DatasetComplianceRollupRow @@ -247,6 +252,15 @@ export default class DatasetComplianceRollupRow extends Component.extend({ return false; }); + /** + * Mouse double click event handler invokes parent action + * @memberof DatasetComplianceRollupRow + */ + @action + onFragmentDblClick() { + get(this, 'onFieldDblClick')(); + } + /** * Toggles the expansion / collapse of the row expansion flag * @memberof DatasetComplianceRollupRow diff --git a/wherehows-web/app/components/dataset-compliance.ts b/wherehows-web/app/components/dataset-compliance.ts index e01f8382d4..8c44a366d6 100644 --- a/wherehows-web/app/components/dataset-compliance.ts +++ b/wherehows-web/app/components/dataset-compliance.ts @@ -137,6 +137,12 @@ export default class DatasetCompliance extends Component { */ notifications: ComputedProperty = inject(); + /** + * Flag indicating that the field names in each compliance row is truncated or rendered in full + * @type {boolean} + */ + isShowingFullFieldNames = true; + /** * Flag indicating that the related dataset is schemaless or has a schema * @type {boolean} @@ -941,6 +947,13 @@ export default class DatasetCompliance extends Component { this.updateStep(initialStepIndex); }, + /** + * Toggles the flag isShowingFullFieldNames when invoked + */ + onFieldDblClick() { + this.toggleProperty('isShowingFullFieldNames'); + }, + /** * Adds a new field tag to the list of compliance change set items * @param {IComplianceChangeSet} tag properties for new field tag diff --git a/wherehows-web/app/constants/dataset-compliance.ts b/wherehows-web/app/constants/dataset-compliance.ts index f04cf6de89..2a6db84555 100644 --- a/wherehows-web/app/constants/dataset-compliance.ts +++ b/wherehows-web/app/constants/dataset-compliance.ts @@ -195,6 +195,10 @@ const tagNeedsReview = (complianceDataTypes: Array) => return false; } + if (!identifierType) { + return true; + } + // Check that suggestion exists and the identifierType does not match the change set item if (suggestion && suggestion.identifierType !== identifierType) { isReviewRequired = isReviewRequired || !suggestionAuthority; diff --git a/wherehows-web/app/templates/components/dataset-compliance-rollup-row.hbs b/wherehows-web/app/templates/components/dataset-compliance-rollup-row.hbs index 02108d13b4..b8f10a198b 100644 --- a/wherehows-web/app/templates/components/dataset-compliance-rollup-row.hbs +++ b/wherehows-web/app/templates/components/dataset-compliance-rollup-row.hbs @@ -15,6 +15,7 @@ isReviewRequested=isReviewRequested suggestionResolution=suggestionResolution suggestionMatchesCurrentValue=suggestionMatchesCurrentValue + onFragmentDblClick=(action "onFragmentDblClick") onSuggestionClick=(action "onSuggestionClick") onToggleRowExpansion=(action "onToggleRowExpansion") onAddFieldTag=(action "onAddFieldTag") diff --git a/wherehows-web/app/templates/datasets/dataset-compliance/-dataset-compliance-entities.hbs b/wherehows-web/app/templates/datasets/dataset-compliance/-dataset-compliance-entities.hbs index cf0a788643..f100ef5fde 100644 --- a/wherehows-web/app/templates/datasets/dataset-compliance/-dataset-compliance-entities.hbs +++ b/wherehows-web/app/templates/datasets/dataset-compliance/-dataset-compliance-entities.hbs @@ -75,12 +75,13 @@ field=field isNewComplianceInfo=isNewComplianceInfo complianceDataTypes=complianceDataTypes + onFieldDblClick=(action "onFieldDblClick") onFieldTagAdded=(action "onFieldTagAdded") onFieldTagRemoved=(action "onFieldTagRemoved") onTagIdentifierTypeChange=(action "tagIdentifierChanged") onSuggestionIntent=(action "onFieldSuggestionIntentChange") as |row| }} - + {{#row.cell}} {{#if row.isReadonly}} @@ -147,12 +148,12 @@
- {{split-text row.identifierField 23}} + {{if isShowingFullFieldNames row.identifierField (split-text row.identifierField 23)}}
- {{split-text row.dataType 23}} + {{if isShowingFullFieldNames row.dataType (split-text row.dataType 23)}}
diff --git a/wherehows-web/tests/helpers/datasets/compliance-policy/field-changeset-constants.ts b/wherehows-web/tests/helpers/datasets/compliance-policy/field-changeset-constants.ts index 90b24e73b6..97bbbbaa78 100644 --- a/wherehows-web/tests/helpers/datasets/compliance-policy/field-changeset-constants.ts +++ b/wherehows-web/tests/helpers/datasets/compliance-policy/field-changeset-constants.ts @@ -17,15 +17,23 @@ const mockFieldChangeSets = [ isDirty: true, privacyPolicyExists: false, suggestionAuthority: true, - __requiresReview__: false, - __msg__: 'NO suggestion, and policy does NOT exist and user has made changes to local working copy' + __requiresReview__: true, + __msg__: + 'No suggestion, and policy does NOT exist and user has made changes to local working copy, but no identifierType' + }, + { + isDirty: false, + privacyPolicyExists: false, + suggestionAuthority: false, + __requiresReview__: true, + __msg__: 'No identifierType present' }, { isDirty: false, privacyPolicyExists: false, suggestionAuthority: true, __requiresReview__: true, - __msg__: 'NO suggestion, and policy does NOT exist but user has NOT made changes to local working copy' + __msg__: 'No suggestion, and policy does NOT exist but user has NOT made changes to local working copy' }, { isDirty: true, @@ -34,7 +42,7 @@ const mockFieldChangeSets = [ suggestion, identifierType: 'same', __requiresReview__: false, - __msg__: 'NO suggestion, and policy does NOT exist but user has NOT made changes to local working copy' + __msg__: 'Suggestion exists, and policy does NOT exist but user has made changes to local working copy' } ];