Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

docs(design-guidelines): Updated quickstarts guidelines. #327

Merged
merged 3 commits into from
Sep 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion packages/dev/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
},
"dependencies": {
"@patternfly/patternfly": "6.0.0-alpha.205",
"@patternfly/quickstarts": "^6.0.0-alpha.4",
"@patternfly/quickstarts": "^6.0.0-alpha.0",
"@patternfly/react-core": "6.0.0-alpha.100",
"i18next": "^19.8.3",
"i18next-browser-languagedetector": "^8.0.0",
Expand Down
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/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"history": "^5.0.0"
},
"devDependencies": {
"@patternfly/documentation-framework": "6.0.0-alpha.64",
"@patternfly/documentation-framework": "6.0.0-alpha.79",
"@patternfly/patternfly": "6.0.0-alpha.205",
"@patternfly/react-icons": "6.0.0-alpha.35",
"@patternfly/react-styles": "6.0.0-alpha.34",
Expand Down

Large diffs are not rendered by default.

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;
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ describe('QuickStartTile', () => {
);
const catalogTile = wrapper.find(Card);
expect(catalogTile.exists()).toBeTruthy();
expect(catalogTile.prop('isSelected')).toBe(false);
});

it('should load proper catalog tile with featured property', () => {
Expand Down
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
4 changes: 2 additions & 2 deletions packages/module/src/controller/QuickStartTaskHeaderList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const QuickStartTaskHeaderList: React.FC<QuickStartTaskHeaderListProps> = ({
onTaskSelect,
}) =>
tasks?.length > 0 ? (
<div className="pf-v6-c-wizard__nav-list">
<ul className="pf-v6-c-wizard__nav-list">
{tasks.map((task, index) => (
<TaskHeader
key={task.title}
Expand All @@ -25,7 +25,7 @@ const QuickStartTaskHeaderList: React.FC<QuickStartTaskHeaderListProps> = ({
onTaskSelect={onTaskSelect}
/>
))}
</div>
</ul>
) : null;

export default QuickStartTaskHeaderList;
26 changes: 9 additions & 17 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1375,27 +1375,27 @@
"@nodelib/fs.scandir" "2.1.5"
fastq "^1.6.0"

"@patternfly/ast-helpers@^1.4.0-alpha.53":
version "1.4.0-alpha.68"
resolved "https://registry.yarnpkg.com/@patternfly/ast-helpers/-/ast-helpers-1.4.0-alpha.68.tgz#1c72af9e85467a96f56bee5b2ef26be3a6127dbf"
integrity sha512-2AblXsXLVuLpYtbNUCozuwTmk3SRCaGNWn9MHcajV48r/ivlJpb25M6Rd3hH3tNs0XiQVxB9JMfzSbroq3Ojew==
"@patternfly/ast-helpers@^1.4.0-alpha.68":
version "1.4.0-alpha.88"
resolved "https://registry.yarnpkg.com/@patternfly/ast-helpers/-/ast-helpers-1.4.0-alpha.88.tgz#8fa65d400b0cd6bd8cbee37cdb147091e2541a12"
integrity sha512-t7mLrMwYWGRWH41cX4nDcHp8Ki0uycjbEg60/nGbHliSlvd+mEtLqUTsKAwHwljBiAhqVg2wYt9gnFKFGOiwTg==
dependencies:
acorn "^8.4.1"
acorn-class-fields "^1.0.0"
acorn-jsx "^5.3.2"
acorn-static-class-features "^1.0.0"
astring "^1.7.5"

"@patternfly/[email protected].64":
version "6.0.0-alpha.64"
resolved "https://registry.yarnpkg.com/@patternfly/documentation-framework/-/documentation-framework-6.0.0-alpha.64.tgz#5c30de59c20971b4e9bbeb4b3638aaf38ac218d8"
integrity sha512-pXgdbC/bcqivt+AOkhklS+kzeANRXDa+cGjKAMyVj4SeAOqfBbyK80xugpyT+lGbhEKMOlfujxmuNr1OlGsBmA==
"@patternfly/[email protected].79":
version "6.0.0-alpha.79"
resolved "https://registry.yarnpkg.com/@patternfly/documentation-framework/-/documentation-framework-6.0.0-alpha.79.tgz#799f53fbb1fbb530444838fadc62fc1a6a25ce51"
integrity sha512-akgy6DdSeAYyBG2k9wB4eSZqYdqrfmLs0s9cnGoPYle9bpGtc8Tvc8HX9+fXNEV3Di7gaiMYsKhHiQo319bcNA==
dependencies:
"@babel/core" "^7.24.3"
"@babel/preset-env" "^7.24.3"
"@babel/preset-react" "^7.24.1"
"@mdx-js/util" "1.6.16"
"@patternfly/ast-helpers" "^1.4.0-alpha.53"
"@patternfly/ast-helpers" "^1.4.0-alpha.68"
"@reach/router" "npm:@gatsbyjs/[email protected]"
autoprefixer "9.8.6"
babel-loader "^9.1.3"
Expand Down Expand Up @@ -1473,14 +1473,6 @@
resolved "https://registry.yarnpkg.com/@patternfly/patternfly/-/patternfly-6.0.0-alpha.205.tgz#9974f712ee69b28ec6851c6240e52c2d99969f9c"
integrity sha512-rzatApP3YpiYOHamDm+RhQpnep2AAhVodVRr3lyg6X5naiSSbPXXGWm7ShhUfftzwW4G1le1Uy0ZlM05rtQHWg==

"@patternfly/quickstarts@^6.0.0-alpha.4":
version "6.0.0-alpha.4"
resolved "https://registry.yarnpkg.com/@patternfly/quickstarts/-/quickstarts-6.0.0-alpha.4.tgz#000483770d31042bd1c476aba3d98eae0ad6a9e2"
integrity sha512-mG0H+AbzQ+2MOZ74Yckqi+UnpfO/9q2rKQ7I65zzbgkfRv/Nu56GeJ4EWSdT38zxAMSXr2x++sUGR2g31WDjLA==
dependencies:
dompurify "^2.4.9"
history "^5.0.0"

"@patternfly/[email protected]":
version "6.0.0-alpha.100"
resolved "https://registry.yarnpkg.com/@patternfly/react-code-editor/-/react-code-editor-6.0.0-alpha.100.tgz#519f04de8c68d99c9ab92b7a5ba98d58841a99b2"
Expand Down
Loading