Skip to content

Commit

Permalink
fix lint issues and some a11y issues
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolethoen committed Sep 20, 2024
1 parent 0c6f33b commit a200ea2
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 24 deletions.
4 changes: 2 additions & 2 deletions packages/dev/src/CustomCatalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ export const CustomCatalog: React.FC = () => {
<Content component="p" className="catalog-sub">
Instructional examples
</Content>
<Gallery hasGutter>
<Gallery hasGutter className="pfext-quick-start-catalog__gallery" >
{allQuickStarts
.filter((quickStart: QuickStart) => quickStart.metadata.instructional)
.map((quickStart: QuickStart, index: number) => {
Expand Down Expand Up @@ -172,7 +172,7 @@ export const CustomCatalog: React.FC = () => {
<Content component="p" className="catalog-sub">
Additional examples
</Content>
<Gallery hasGutter>
<Gallery hasGutter className="pfext-quick-start-catalog__gallery" >
{allQuickStarts
.filter((quickStart: QuickStart) => !quickStart.metadata.instructional)
.map((quickStart: QuickStart, index: number) => {
Expand Down
2 changes: 1 addition & 1 deletion packages/module/release.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ module.exports = {
'@semantic-release/npm',
],
tagFormat: 'prerelease-v${version}',
"dryRun": true,
dryRun: true,
};
2 changes: 1 addition & 1 deletion packages/module/src/catalog/QuickStartCatalog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const QuickStartCatalog: React.FC<QuickStartCatalogProps> = ({ quickStarts }) =>

return (
<div>
<Gallery hasGutter>
<Gallery hasGutter className="pfext-quick-start-catalog__gallery" >
{quickStarts.map((quickStart, index) => {
const {
metadata: { name: id },
Expand Down
11 changes: 3 additions & 8 deletions packages/module/src/catalog/QuickStartTile.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import {
ButtonProps,
Flex,
Stack,
Label
Label,
} from '@patternfly/react-core';
import OutlinedClockIcon from '@patternfly/react-icons/dist/js/icons/outlined-clock-icon';
import { StatusIcon } from '@console/shared';
Expand Down Expand Up @@ -65,7 +65,6 @@ const QuickStartTile: React.FC<QuickStartTileProps> = ({
const { setActiveQuickStart, footer, getResource } =
React.useContext<QuickStartContextValues>(QuickStartContext);


const statusColorMap = {
[QuickStartStatus.COMPLETE]: 'green',
[QuickStartStatus.IN_PROGRESS]: 'purple',
Expand Down Expand Up @@ -153,11 +152,7 @@ const QuickStartTile: React.FC<QuickStartTileProps> = ({
{quickStartIcon}
</CardHeader>
<CardTitle>
<QuickStartTileHeader
name={displayName}
onSelect={onSelect}
quickStartId={id}
/>
<QuickStartTileHeader name={displayName} onSelect={onSelect} quickStartId={id} />
</CardTitle>
<CardBody>
<Stack hasGutter>
Expand All @@ -174,7 +169,7 @@ const QuickStartTile: React.FC<QuickStartTileProps> = ({
{status !== QuickStartStatus.NOT_STARTED && (
<Label
variant="outline"
color={statusColorMap[status] as "green" | "purple" | "grey"}
color={statusColorMap[status] as 'green' | 'purple' | 'grey'}
icon={<StatusIcon status={status} />}
data-test="status"
>
Expand Down
21 changes: 9 additions & 12 deletions packages/module/src/catalog/QuickStartTileHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,14 @@ const QuickStartTileHeader: React.FC<QuickStartTileHeaderProps> = ({
name,
quickStartId,
onSelect,
}) => {

return (
<Flex flexWrap={{ default: 'nowrap' }}>
<Title headingLevel="h3" data-test="title" id={quickStartId}>
<Button variant="link" isInline onClick={onSelect}>
<QuickStartMarkdownView content={name} />
</Button>
</Title>
</Flex>
);
};
}) => (
<Flex flexWrap={{ default: 'nowrap' }}>
<Title headingLevel="h3" data-test="title" id={quickStartId}>
<Button variant="link" isInline onClick={onSelect}>
<QuickStartMarkdownView content={name} />
</Button>
</Title>
</Flex>
);

export default QuickStartTileHeader;
1 change: 1 addition & 0 deletions packages/module/src/controller/QuickStartFooter.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const QuickStartFooter: React.FC<QuickStartFooterProps> = ({
() => (
<Button
variant="primary"
className="pfext-quick-start-footer__actionbtn"
onClick={onNext}
data-testid={`qs-drawer-${camelize(getPrimaryButtonText)}`}
data-test={`${getPrimaryButtonText} button`}
Expand Down

0 comments on commit a200ea2

Please sign in to comment.