Skip to content

Commit

Permalink
fix restart action and toned down failed task message
Browse files Browse the repository at this point in the history
  • Loading branch information
jschuler committed Mar 10, 2022
1 parent 69d65e4 commit ed56af6
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion packages/dev/src/AppLocalized.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const App3: React.FC<AppProps> = ({ children, showCardFooters }) => {
language,
loading,
useQueryParams: withQueryParams,
alwaysShowTaskReview: false,
alwaysShowTaskReview: true,
};

return (
Expand Down
2 changes: 1 addition & 1 deletion packages/dev/src/AppProps.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const App: React.FC<AppProps> = ({ children, showCardFooters }) => {
language,
loading,
useQueryParams: withQueryParams,
alwaysShowTaskReview: false,
alwaysShowTaskReview: true,
};

const toggleQuickStart = (quickStartId: string) => {
Expand Down
4 changes: 2 additions & 2 deletions packages/dev/src/quickstarts-data/yaml/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ spec:
review:
instructions: |-
- Did you complete the task successfully?
failedTaskHelp: This task isnt verified yet. Try the task again.
failedTaskHelp: This task isn't verified yet. Try the task again.
# optional - the task's success and failure messages
summary:
success: Shows a success message in the task header
Expand All @@ -105,7 +105,7 @@ spec:
review:
instructions: |-
- Thanks for checking out this quick start!
failedTaskHelp: This task isnt verified yet. Try the task again.
failedTaskHelp: This task isn't verified yet. Try the task again.
conclusion: |-
The conclusion appears in the last section of the quick start.
# you can link to the next quick start(s) here
Expand Down
2 changes: 1 addition & 1 deletion packages/module/src/QuickStartDrawer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const QuickStartContainer: React.FC<QuickStartContainerProps> = ({
useQueryParams = true,
markdown,
contextProps,
alwaysShowTaskReview = false,
alwaysShowTaskReview = true,
...props
}) => {
const valuesForQuickstartContext: QuickStartContextValues = useValuesForQuickStartContext({
Expand Down
10 changes: 6 additions & 4 deletions packages/module/src/controller/QuickStartTaskHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,13 @@ const QuickStartTaskHeader: React.FC<QuickStartTaskHeaderProps> = ({
'pfext-quick-start-task-header__title-failed':
taskStatus === (QuickStartTaskStatus.FAILED || QuickStartTaskStatus.VISITED),
});
const notCompleted = taskStatus === QuickStartTaskStatus.VISITED;
const skippedReviewOrFailed =
taskStatus === QuickStartTaskStatus.REVIEW || taskStatus === QuickStartTaskStatus.FAILED;
// const notCompleted = taskStatus === QuickStartTaskStatus.VISITED;
// const skippedReview = taskStatus === QuickStartTaskStatus.REVIEW;
const failedReview = taskStatus === QuickStartTaskStatus.FAILED;

const tryAgain = !isActiveTask && (skippedReviewOrFailed || notCompleted) && (
// TODO: toned down when this is shown, investigate further when we should display it
// related: https://github.com/patternfly/patternfly-quickstarts/issues/104
const tryAgain = failedReview && (
<>
<div />
<div className="pfext-quick-start-task-header__tryagain">Try the steps again.</div>
Expand Down
4 changes: 4 additions & 0 deletions packages/module/src/styles/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@
input[type="radio"] {
margin-right: 7px;
}

.pf-c-list {
--pf-c-list--PaddingLeft: 20px;
}
}

// drawer
Expand Down
2 changes: 1 addition & 1 deletion packages/module/src/utils/quick-start-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ export const useValuesForQuickStartContext = (
});
setAllQuickStartStates((qs) => ({
...qs,
[quickStartId]: getDefaultQuickStartState(totalTasks, QuickStartStatus.IN_PROGRESS),
[quickStartId]: getDefaultQuickStartState(totalTasks, QuickStartStatus.NOT_STARTED),
}));
},
[setActiveQuickStartID, setAllQuickStartStates, useQueryParams],
Expand Down

0 comments on commit ed56af6

Please sign in to comment.