@rh-support/troubleshoot 2.2.90-beta.3 → 2.2.90-beta.5

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.
@@ -57,11 +57,11 @@ function Summary(props) {
57
57
  try {
58
58
  yield updateCaseDetails(caseDispatch, caseNumber, caseDetails);
59
59
  setIsSummaryUpdating(false);
60
- ToastNotification.addSuccessMessage(t(`Problem statement has been successfully updated`));
60
+ ToastNotification.addSuccessMessage(t(`Summarize your problem has been successfully updated`));
61
61
  }
62
62
  catch (e) {
63
63
  setIsSummaryUpdating(false);
64
- caseUpdateError.showError(e, t(`Problem statement failed to updated`));
64
+ caseUpdateError.showError(e, t(`Summarize your problem failed to updated`));
65
65
  throw e;
66
66
  }
67
67
  });
@@ -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 statement"),
127
+ React.createElement(Trans, null, "Summarize your problem"),
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,KAA0C,MAAM,OAAO,CAAC;AAQ/D,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,qBAgInC;kBAhIQ,aAAa;;;AAmItB,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"OpenCaseIssue.d.ts","sourceRoot":"","sources":["../../../../src/components/CaseInformation/OpenCaseIssue.tsx"],"names":[],"mappings":"AAKA,OAAO,KAA0C,MAAM,OAAO,CAAC;AAQ/D,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,qBAmHnC;kBAnHQ,aAAa;;;AAsHtB,eAAe,aAAa,CAAC"}
@@ -43,10 +43,7 @@ function OpenCaseIssue(props) {
43
43
  return ProgressVariant.danger;
44
44
  if (!summary)
45
45
  return ProgressVariant.success;
46
- if (summary.length > SUMMARY_LENGTH_LIMIT - 20) {
47
- return ProgressVariant.danger;
48
- }
49
- else if (summary.length > SUMMARY_LENGTH_LIMIT / 2) {
46
+ if (summary.length > SUMMARY_LENGTH_LIMIT / 2) {
50
47
  return ProgressVariant.warning;
51
48
  }
52
49
  else {
@@ -54,29 +51,24 @@ function OpenCaseIssue(props) {
54
51
  }
55
52
  };
56
53
  const getIsSummaryInvalid = () => hasLargeSummary || (isNextBtnClickedToShowValidationError && isSummaryEmpty);
54
+ const isIdea = () => supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT;
57
55
  useEffect(() => {
58
56
  setIsSummaryEmpty(summary ? isEmpty(summary.trim()) : true);
59
57
  // @ts-ignore
60
58
  }, [summary]);
61
59
  return (React.createElement(React.Fragment, null,
62
60
  React.createElement(InlineEdit, { labelProps: {
63
- htmlFor: supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
64
- ? 'get-support-title'
65
- : 'get-support-summary',
61
+ htmlFor: isIdea() ? 'get-support-title' : 'get-support-summary',
66
62
  }, labelContent: React.createElement(React.Fragment, null,
67
- React.createElement(Trans, null, supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT ? 'Title' : 'Problem statement'),
63
+ React.createElement(Trans, null, isIdea() ? 'Title' : 'Summarize your problem'),
68
64
  ' ',
69
65
  !!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 && !isSummaryEmpty, content: summary },
70
- React.createElement("textarea", { id: supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
71
- ? 'get-support-title'
72
- : 'get-support-summary', className: `form-control${getIsSummaryInvalid() ? ' form-invalid' : ''}`, "aria-invalid": getIsSummaryInvalid(), "aria-required": !!props.required, required: !!props.required, name: supportType === PreviousCaseTypes.FEATURE_ENHANCEMENT
73
- ? 'get-support-title'
74
- : '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
75
- ? 'get-support-title'
76
- : 'get-support-summary', rows: 5 }),
77
- 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" })),
66
+ React.createElement("textarea", { id: isIdea() ? 'get-support-title' : 'get-support-summary', className: `form-control${getIsSummaryInvalid() ? ' form-invalid' : ''}`, "aria-invalid": getIsSummaryInvalid(), "aria-required": !!props.required, required: !!props.required, name: isIdea() ? 'get-support-title' : 'get-support-summary', placeholder: isIdea()
67
+ ? t('i18nkeySummarizeIdea', "Summarize what you're experiencing today")
68
+ : t('i18nkeySummarizeExperience', `Describe your problem in detail. Include specific steps already taken and error messages. (Limit: ${SUMMARY_LENGTH_LIMIT} characters)`), value: summary, onChange: onSummaryChange, onBlur: onSummaryBlur, autoFocus: !!props.autoFocus, "data-tracking-id": isIdea() ? 'get-support-title' : 'get-support-summary' }),
69
+ 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 ${!isNextBtnClickedToShowValidationError && isEmpty(summary) ? 'gray' : ''}`, id: "summary-progress-bar" })),
78
70
  hasLargeSummary && (React.createElement("div", { className: "pull-top" },
79
- React.createElement("p", { className: "form-instructions form-invalid" }, t(`Description cannot exceed ${SUMMARY_LENGTH_LIMIT} characters.`))))));
71
+ React.createElement("p", { className: "form-instructions form-invalid" }, t(`The summarize your problem cannot be more than ${SUMMARY_LENGTH_LIMIT} characters.`))))));
80
72
  }
81
73
  OpenCaseIssue.defaultProps = defaultProps;
82
74
  export default OpenCaseIssue;
@@ -1 +1 @@
1
- {"version":3,"file":"RecommendationInfoBox.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RecommendationInfoBox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAGxC,eAAO,MAAM,qBAAqB,yBA8CjC,CAAC"}
1
+ {"version":3,"file":"RecommendationInfoBox.d.ts","sourceRoot":"","sources":["../../../../src/components/Recommendations/RecommendationInfoBox.tsx"],"names":[],"mappings":"AACA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,eAAO,MAAM,qBAAqB,yBAiDjC,CAAC"}
@@ -1,27 +1,28 @@
1
1
  import { Accordion, AccordionContent, AccordionItem, AccordionToggle, List, ListItem } from '@patternfly/react-core';
2
2
  import React, { useState } from 'react';
3
- import { Trans } from 'react-i18next';
3
+ import { Trans, useTranslation } from 'react-i18next';
4
+ import { SUMMARY_LENGTH_LIMIT } from '../../reducers/CaseConstNTypes';
4
5
  export const RecommendationInfoBox = () => {
6
+ const { t } = useTranslation();
5
7
  const [isExpanded, setIsExpanded] = useState(true);
6
8
  return (React.createElement(React.Fragment, null,
7
9
  React.createElement(Accordion, { isBordered: true, asDefinitionList: false, className: "card card-white pf-v5-u-mt-md" },
8
10
  React.createElement(AccordionItem, null,
9
- React.createElement(AccordionToggle, { id: "recommendation-tips", isExpanded: isExpanded, onClick: () => setIsExpanded(!isExpanded) },
10
- React.createElement(Trans, null, "Tips for problem statement field")),
11
+ React.createElement(AccordionToggle, { id: "recommendation-tips", isExpanded: isExpanded, onClick: () => setIsExpanded(!isExpanded) }, t(`Tips for summarizing your problem in under ${SUMMARY_LENGTH_LIMIT} characters`)),
11
12
  React.createElement(AccordionContent, { isHidden: !isExpanded },
12
13
  React.createElement("span", { className: "pf-v5-u-color-100" },
13
- React.createElement(Trans, null, "Include the following information in the description to expedite your case:")),
14
+ React.createElement(Trans, null, "To help us find the right information for you, include 1-2 key details, such as:")),
14
15
  React.createElement(List, { className: "pf-v5-u-ml-lg", style: { listStyleType: 'disc' } },
15
16
  React.createElement(ListItem, null,
16
- React.createElement(Trans, null, "Problem")),
17
+ React.createElement(Trans, null, "Relevant keywords")),
17
18
  React.createElement(ListItem, null,
18
- React.createElement(Trans, null, "Steps you've taken")),
19
+ React.createElement(Trans, null, "Error messages")),
19
20
  React.createElement(ListItem, null,
20
- React.createElement(Trans, null, "Error Messages"))),
21
+ React.createElement(Trans, null, "Specific problems"))),
21
22
  React.createElement("span", { className: "pf-v5-u-color-100" },
22
23
  React.createElement(Trans, null, "Examples:")),
23
24
  React.createElement("p", null,
24
- React.createElement(Trans, null, "\"we see error/message\", \"function that is failing\"")),
25
+ React.createElement(Trans, null, "I'm unable to start the SSHD service and am receiving this error message, \u201CBad yes/no argument for ShowPatchLevel parameter.\u201D")),
25
26
  React.createElement("p", null,
26
- React.createElement(Trans, null, "I'm unable to start the SSHD service receiving the error message \"Bad yes/no argument for ShowPatchLevel parameter\"")))))));
27
+ React.createElement(Trans, null, "We see this error message: \u201Cfunction that is failing\u201D.")))))));
27
28
  };
@@ -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 statement"),
41
+ React.createElement("div", { className: "pf-v5-u-font-family-heading" }, "Summarize your problem"),
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 }),
@@ -438,6 +438,11 @@ input[type='checkbox'] {
438
438
  height: 2px;
439
439
  }
440
440
 
441
+ #summary-progress-bar.gray .pf-v5-c-progress__bar,
442
+ #summary-progress-bar.gray .pf-v5-c-progress__bar::before {
443
+ background-color: var(--pf-v5-global--palette--black-300) !important;
444
+ }
445
+
441
446
  #summary-progress-bar .pf-v5-c-progress.pf-m-sm .pf-v5-c-progress__measure {
442
447
  font-size: 14px;
443
448
  }
@@ -446,3 +451,8 @@ input[type='checkbox'] {
446
451
  row-gap: 9px;
447
452
  line-height: 2px;
448
453
  }
454
+
455
+ #get-support-title,
456
+ #get-support-summary {
457
+ min-height: 110px !important;
458
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rh-support/troubleshoot",
3
- "version": "2.2.90-beta.3",
3
+ "version": "2.2.90-beta.5",
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.47-beta.0",
65
- "@rh-support/react-context": "2.1.52-beta.0",
64
+ "@rh-support/components": "2.1.47-beta.1",
65
+ "@rh-support/react-context": "2.1.52-beta.1",
66
66
  "@rh-support/types": "2.0.3",
67
- "@rh-support/user-permissions": "2.1.34-beta.0",
68
- "@rh-support/utils": "2.1.24-beta.0",
67
+ "@rh-support/user-permissions": "2.1.34-beta.1",
68
+ "@rh-support/utils": "2.1.24-beta.1",
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": "e6e54f44311de3872889f6ced4e5af9f5f8dacc5"
135
+ "gitHead": "6a9b5942ca79ed563716a8ab4fcb59ec51b69254"
136
136
  }