@rh-support/troubleshoot 2.2.89 → 2.2.90-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -124,7 +124,7 @@ function Summary(props) {
124
124
  });
125
125
  return (React.createElement(React.Fragment, null,
126
126
  React.createElement(NewInlineEdit, { labelProps: { htmlFor: 'case-details-summary' }, labelContent: React.createElement(React.Fragment, null,
127
- React.createElement(Trans, null, "Problem description"),
127
+ React.createElement(Trans, null, "Problem statement"),
128
128
  React.createElement(ValueChangedIcon, { afterLocalChange: afterLocalChange, isLocalChange: localSummaryChange, value: summary, getTooltipContent: getSummaryChangedTT }),
129
129
  React.createElement("span", { className: "form-required", "aria-hidden": true }, "*")), allowInlineEdit: props.inlineEditable, content: summary ? summary : t('No summary to display.'), saveDisabled: saveDisabled, hideLabel: props.hideLabel, hideSaveCancel: props.hideSaveCancel, charCount: (summaryState === null || summaryState === void 0 ? void 0 : summaryState.length) || 0, charTotal: SUMMARY_LENGTH_LIMIT, cancelToggleState: isCancelClicked, saveToggleState: isSaveClicked, isExportingPDF: isExportingPDF },
130
130
  React.createElement(TextInputGroup, null,
@@ -1 +1 @@
1
- {"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AASD,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBAqGnC;kBArGQ,aAAa;;;AAwGtB,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA+B,MAAM,OAAO,CAAC;AAQpD,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,WAAW,CAAC,EAAE,MAAM,CAAC;CACxB;AASD,iBAAS,aAAa,CAAC,KAAK,EAAE,MAAM,qBA6HnC;kBA7HQ,aAAa;;;AAgItB,eAAe,aAAa,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Progress, ProgressMeasureLocation, ProgressSize } from '@patternfly/react-core';
1
+ import { Progress, ProgressMeasureLocation, ProgressSize, ProgressVariant } from '@patternfly/react-core';
2
2
  import { InlineEdit } from '@rh-support/components';
3
3
  import { PreviousCaseTypes } from '@rh-support/utils';
4
4
  import isEmpty from 'lodash/isEmpty';
@@ -39,25 +39,41 @@ function OpenCaseIssue(props) {
39
39
  onCaseDetailsChange({ summary: summaryLocal });
40
40
  setIsSummaryInValid(isEmpty(summaryLocal === null || summaryLocal === void 0 ? void 0 : summaryLocal.trim()));
41
41
  };
42
+ const getVariant = () => {
43
+ if (getIsSummaryInvalid())
44
+ return ProgressVariant.danger;
45
+ if (!summary)
46
+ return ProgressVariant.success;
47
+ if (summary.length > SUMMARY_LENGTH_LIMIT - 20) {
48
+ return ProgressVariant.danger;
49
+ }
50
+ else if (summary.length > SUMMARY_LENGTH_LIMIT / 2) {
51
+ return ProgressVariant.warning;
52
+ }
53
+ else {
54
+ return ProgressVariant.success;
55
+ }
56
+ };
57
+ const getIsSummaryInvalid = () => isSummaryInValid || hasLargeSummary || (isNextBtnClickedToShowValidationError && !summary);
42
58
  return (React.createElement(React.Fragment, null,
43
59
  React.createElement(InlineEdit, { labelProps: {
44
60
  htmlFor: supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
45
61
  ? 'get-support-title'
46
62
  : 'get-support-summary',
47
63
  }, labelContent: React.createElement(React.Fragment, null,
48
- React.createElement(Trans, null, supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT ? 'Title' : 'Problem description'),
64
+ React.createElement(Trans, null, supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT ? 'Title' : 'Problem statement'),
49
65
  ' ',
50
66
  !!props.required && (React.createElement("span", { className: "form-required", "aria-hidden": true }, "*"))), allowInlineEdit: props.inlineEditable, hideSaveCancel: !!props.hideSaveCancel, initialIsEditing: !!props.initialIsEditing, saveOnBlur: true, collapseOnBlur: !!props.collapseOnBlur && !isSummaryInValid, content: summary },
51
67
  React.createElement("textarea", { id: supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
52
68
  ? 'get-support-title'
53
- : 'get-support-summary', className: `form-control${isSummaryInValid || hasLargeSummary || (isNextBtnClickedToShowValidationError && !summary)
54
- ? ' form-invalid'
55
- : ''}`, "aria-invalid": isSummaryInValid, "aria-required": !!props.required, required: !!props.required, name: supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
69
+ : 'get-support-summary', className: `form-control${getIsSummaryInvalid() ? ' form-invalid' : ''}`, "aria-invalid": isSummaryInValid, "aria-required": !!props.required, required: !!props.required, name: supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
56
70
  ? 'get-support-title'
57
71
  : 'get-support-summary', placeholder: t('i18nkeySummarizeExperience', "Please describe the problem you are facing, including any specific steps you've taken or error messages."), value: summary, onChange: onSummaryChange, onBlur: onSummaryBlur, autoFocus: !!props.autoFocus, "data-tracking-id": supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
58
72
  ? 'get-support-title'
59
- : 'get-support-summary', rows: 6 }),
60
- React.createElement(Progress, { value: summary === null || summary === void 0 ? void 0 : summary.length, min: 0, max: SUMMARY_LENGTH_LIMIT, size: ProgressSize.sm, label: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, valueText: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.outside }))));
73
+ : 'get-support-summary', rows: 5 }),
74
+ React.createElement(Progress, { value: summary === null || summary === void 0 ? void 0 : summary.length, min: 0, max: SUMMARY_LENGTH_LIMIT, size: ProgressSize.sm, label: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, valueText: `${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, measureLocation: ProgressMeasureLocation.top, "aria-label": `Progress - ${summary === null || summary === void 0 ? void 0 : summary.length} / ${SUMMARY_LENGTH_LIMIT}`, variant: getVariant(), title: ' ', className: "pf-v5-u-mt-md", id: "summary-progress-bar" })),
75
+ hasLargeSummary && (React.createElement("div", { className: "pull-top" },
76
+ React.createElement("p", { className: "form-instructions form-invalid" }, t(`Description cannot exceed ${SUMMARY_LENGTH_LIMIT} characters.`))))));
61
77
  }
62
78
  OpenCaseIssue.defaultProps = defaultProps;
63
79
  export default OpenCaseIssue;
@@ -7,7 +7,7 @@ export const RecommendationInfoBox = () => {
7
7
  React.createElement(Accordion, { isBordered: true, asDefinitionList: false, className: "card card-white pf-v5-u-mt-md" },
8
8
  React.createElement(AccordionItem, null,
9
9
  React.createElement(AccordionToggle, { id: "recommendation-tips", isExpanded: isExpanded, onClick: () => setIsExpanded(!isExpanded) },
10
- React.createElement(Trans, null, "Tips for problem description field")),
10
+ React.createElement(Trans, null, "Tips for problem statement field")),
11
11
  React.createElement(AccordionContent, { isHidden: !isExpanded },
12
12
  React.createElement("span", { className: "pf-v5-u-color-100" },
13
13
  React.createElement(Trans, null, "Include the following information in the description to expedite your case:")),
@@ -1 +1 @@
1
- {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAS1C,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA+DzC;kBA/DQ,mBAAmB;;;AAkE5B,eAAe,mBAAmB,CAAC"}
1
+ {"version":3,"file":"TroubleshootSection.d.ts","sourceRoot":"","sources":["../../../../src/components/TroubleshootSection/TroubleshootSection.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAqB,MAAM,OAAO,CAAC;AAS1C,UAAU,MAAM;IACZ,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,cAAc,CAAC,EAAE,OAAO,CAAC;CAC5B;AASD,iBAAS,mBAAmB,CAAC,KAAK,EAAE,MAAM,qBA8DzC;kBA9DQ,mBAAmB;;;AAiE5B,eAAe,mBAAmB,CAAC"}
@@ -38,7 +38,7 @@ function TroubleshootSection(props) {
38
38
  React.createElement("span", { className: "pf-v5-u-font-family-heading pf-v5-u-ml-xl pf-v5-u-pr-xs" }, "Version"),
39
39
  ' ',
40
40
  version),
41
- React.createElement("div", { className: "pf-v5-u-font-family-heading" }, "Problem Description"),
41
+ React.createElement("div", { className: "pf-v5-u-font-family-heading" }, "Problem statement"),
42
42
  React.createElement("p", { className: "pf-v5-u-mb-xl" }, summary)),
43
43
  !isCreatingCase && (React.createElement(OpenShiftClusterId, { className: "push-bottom", "data-tracking-id": "troubleshoot-section-openshift-cluster-id" })),
44
44
  React.createElement(LoadingDots, { show: topContent.isFetching }),
@@ -428,3 +428,21 @@ input[type='checkbox'] {
428
428
  position: absolute;
429
429
  width: 100%;
430
430
  }
431
+
432
+ #summary-progress-bar .pf-v5-c-progress__status-icon {
433
+ display: none;
434
+ }
435
+
436
+ #summary-progress-bar .pf-v5-c-progress__bar,
437
+ #summary-progress-bar .pf-v5-c-progress__indicator {
438
+ height: 2px;
439
+ }
440
+
441
+ #summary-progress-bar .pf-v5-c-progress.pf-m-sm .pf-v5-c-progress__measure {
442
+ font-size: 14px;
443
+ }
444
+
445
+ #summary-progress-bar {
446
+ row-gap: 9px;
447
+ line-height: 2px;
448
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.89",
3
+ "version": "2.2.90-beta.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org"
@@ -61,11 +61,11 @@
61
61
  "@progress/kendo-licensing": "1.3.5",
62
62
  "@progress/kendo-react-pdf": "^5.16.0",
63
63
  "@redux-devtools/extension": "^3.3.0",
64
- "@rh-support/components": "2.1.46",
65
- "@rh-support/react-context": "2.1.51",
64
+ "@rh-support/components": "2.1.47-beta.0",
65
+ "@rh-support/react-context": "2.1.52-beta.0",
66
66
  "@rh-support/types": "2.0.3",
67
- "@rh-support/user-permissions": "2.1.33",
68
- "@rh-support/utils": "2.1.23",
67
+ "@rh-support/user-permissions": "2.1.34-beta.0",
68
+ "@rh-support/utils": "2.1.24-beta.0",
69
69
  "@types/react-redux": "^7.1.33",
70
70
  "@types/redux": "^3.6.0",
71
71
  "dompurify": "^2.2.6",
@@ -132,5 +132,5 @@
132
132
  "defaults and supports es6-module",
133
133
  "maintained node versions"
134
134
  ],
135
- "gitHead": "29776067a54082b3758fd8571961ab733d60d914"
135
+ "gitHead": "edaa6e0bccdcbc0318e4f7149cd57db97ee60ef4"
136
136
  }