Skip to content

Commit 891d940

Browse files
committed
Redesign the skill form for both github and native mode
Signed-off-by: Anil Vishnoi <[email protected]>
1 parent ac9c2fb commit 891d940

File tree

14 files changed

+553
-447
lines changed

14 files changed

+553
-447
lines changed

src/components/Contribute/AuthorInformation.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,8 @@ const AuthorInformation: React.FC<Props> = ({ formType, reset, formData, setDisa
6868
return (
6969
<>
7070
<h2>
71-
Author Information <span style={{ color: 'red' }}>*</span>
71+
<strong>Author Information </strong>
72+
<span style={{ color: 'red' }}>*</span>
7273
</h2>
7374
<p>Provide your information required for a GitHub DCO sign-off.</p>
7475
<FormGroup isRequired key={'author-info-details-email'} label="Email address">

src/components/Contribute/Skill/AttributionInformation/AttributionInformation.tsx

Lines changed: 8 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
import React, { useEffect } from 'react';
22
import { checkSkillFormCompletion } from '../validation';
33
import { SkillFormData } from '@/types';
4-
import {
5-
ValidatedOptions,
6-
FormFieldGroupExpandable,
7-
FormFieldGroupHeader,
8-
FormGroup,
9-
TextInput,
10-
FormHelperText,
11-
HelperText,
12-
HelperTextItem
13-
} from '@patternfly/react-core';
4+
import { ValidatedOptions, FormGroup, TextInput, FormHelperText, HelperText, HelperTextItem } from '@patternfly/react-core';
145
import { ExclamationCircleIcon } from '@patternfly/react-icons';
156

167
interface Props {
@@ -93,22 +84,12 @@ const AttributionInformation: React.FC<Props> = ({
9384
};
9485

9586
return (
96-
<FormFieldGroupExpandable
97-
toggleAriaLabel="Details"
98-
header={
99-
<FormFieldGroupHeader
100-
titleText={{
101-
text: (
102-
<p>
103-
Attribution Information <span style={{ color: 'red' }}>*</span>
104-
</p>
105-
),
106-
id: 'attribution-info-id'
107-
}}
108-
titleDescription="Provide attribution information."
109-
/>
110-
}
111-
>
87+
<>
88+
<h2>
89+
<strong>Attribution Information</strong> <span style={{ color: 'red' }}>*</span>
90+
</h2>
91+
<p>Provide attribution information for the skill.</p>
92+
11293
<FormGroup isRequired key={'attribution-info-details-title_work'} label="Work title">
11394
<TextInput
11495
isRequired
@@ -172,7 +153,7 @@ const AttributionInformation: React.FC<Props> = ({
172153
</FormHelperText>
173154
)}
174155
</FormGroup>
175-
</FormFieldGroupExpandable>
156+
</>
176157
);
177158
};
178159

src/components/Contribute/Skill/FilePathInformation/FilePathInformation.tsx

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import React from 'react';
22
import PathService from '@/components/PathService/PathService';
3-
import { FormFieldGroupExpandable, FormFieldGroupHeader, FormGroup } from '@patternfly/react-core';
3+
import { FormGroup } from '@patternfly/react-core';
44

55
interface Props {
66
reset?: boolean;
@@ -10,27 +10,16 @@ interface Props {
1010

1111
const FilePathInformation: React.FC<Props> = ({ reset, path, setFilePath }) => {
1212
return (
13-
<FormFieldGroupExpandable
14-
isExpanded
15-
toggleAriaLabel="Details"
16-
header={
17-
<FormFieldGroupHeader
18-
titleText={{
19-
text: (
20-
<p>
21-
Taxonomy Directory Path <span style={{ color: 'red' }}>*</span>
22-
</p>
23-
),
24-
id: 'file-path-info-id'
25-
}}
26-
titleDescription="Specify the directory location within taxonomy repository structure for the QnA Yaml and Attribution files."
27-
/>
28-
}
29-
>
13+
<>
14+
<h2>
15+
<strong>Taxonomy Directory Path</strong> <span style={{ color: 'red' }}>*</span>
16+
</h2>
17+
<p>Specify the directory location within taxonomy repository structure for the QnA Yaml and Attribution files.</p>
18+
3019
<FormGroup isRequired key={'file-path-service-id'}>
3120
<PathService reset={reset} rootPath="skills" path={path} handlePathChange={setFilePath} />
3221
</FormGroup>
33-
</FormFieldGroupExpandable>
22+
</>
3423
);
3524
};
3625

0 commit comments

Comments
 (0)