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

update PDS to version 3.21.0 #50

Merged
merged 1 commit into from
Dec 2, 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
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
"test:ci": "yarn contentlayer:build && yarn prettier:ci && yarn tsc --noEmit --noEmitHelpers && yarn lint:ci"
},
"dependencies": {
"@porsche-design-system/components-js": "3.11.0",
"@porsche-design-system/components-react": "3.11.0",
"@porsche-design-system/components-js": "3.21.0",
"@porsche-design-system/components-react": "3.21.0",
"@primer/octicons": "19.8.0",
"contentlayer": "0.3.4",
"date-fns": "2.30.0",
Expand Down
4 changes: 2 additions & 2 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@
<HeroSection
title="404"
subtitle="FOSS@Porsche"
imageSrc={heroImage}

Check warning on line 11 in src/app/not-found.tsx

View workflow job for this annotation

GitHub Actions / Automated Tests and Linting

Unsafe assignment of an `any` value
imageAlt="AI generated Porsche Taycan"
/>
<PText theme="dark" size="middle" align="center">
<PText theme="dark" size="medium" align="center">
This page could not be found.
</PText>
<PText theme="dark" size="middle" align="center">
<PText theme="dark" size="medium" align="center">
We can only apologize for the 404. Our favorite is 911.
</PText>
</>
Expand Down
2 changes: 1 addition & 1 deletion src/components/02_molecules/foss_movement/KeyValue.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const KeyValue: React.FC<PropsWithChildren<KeyValueProps>> = (
<PAccordion
theme="dark"
heading="Principles"
tag="h3"
headingTag="h3"
size="medium"
open={isOpen}
onUpdate={onUpdate}
Expand Down
21 changes: 11 additions & 10 deletions src/components/02_molecules/navigation/Navigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ import { compareDesc } from "date-fns";
import { usePathname } from "next/navigation";
import { allBlogs, allDocs } from "contentlayer/generated";
import {
type FlyoutNavigationUpdateEventDetail,
type FlyoutMultilevelUpdateEventDetail,
PButtonPure,
PFlyoutNavigation,
PFlyoutNavigationItem,
PFlyoutMultilevel,
PFlyoutMultilevelItem,
PLinkPure,
PLinkTile,
} from "@porsche-design-system/components-react/ssr";
Expand All @@ -32,9 +32,10 @@ export const Navigation: React.FC<NavigationProps> = () => {
}, []);
const onDismiss = useCallback(() => {
setIsMenuOpen(false);
setFlyoutNavigationActiveIdentifier(undefined);
}, []);
const onUpdate = useCallback(
(e: CustomEvent<FlyoutNavigationUpdateEventDetail>) =>
(e: CustomEvent<FlyoutMultilevelUpdateEventDetail>) =>
setFlyoutNavigationActiveIdentifier(e.detail.activeIdentifier),
[],
);
Expand Down Expand Up @@ -74,7 +75,7 @@ export const Navigation: React.FC<NavigationProps> = () => {
<PButtonPure icon="menu-lines" theme="dark" onClick={() => onOpen()}>
Menu
</PButtonPure>
<PFlyoutNavigation
<PFlyoutMultilevel
open={isMenuOpen}
activeIdentifier={flyoutNavigationActiveIdentifier}
onDismiss={onDismiss}
Expand All @@ -98,7 +99,7 @@ export const Navigation: React.FC<NavigationProps> = () => {
</Link>
</PLinkPure>
))}
<PFlyoutNavigationItem
<PFlyoutMultilevelItem
identifier="blog"
label="Contributor Stories"
key="blog"
Expand Down Expand Up @@ -129,8 +130,8 @@ export const Navigation: React.FC<NavigationProps> = () => {
{link.title}
</Link>
))}
</PFlyoutNavigationItem>
<PFlyoutNavigationItem
</PFlyoutMultilevelItem>
<PFlyoutMultilevelItem
identifier="documentation"
label="Documentation"
key="docs"
Expand All @@ -144,8 +145,8 @@ export const Navigation: React.FC<NavigationProps> = () => {
{link.title}
</Link>
))}
</PFlyoutNavigationItem>
</PFlyoutNavigation>
</PFlyoutMultilevelItem>
</PFlyoutMultilevel>
</div>
);
};
2 changes: 1 addition & 1 deletion src/components/03_organisms/newsCard/NewsCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export const NewsCard: React.FC<NewsCardProps> = ({
return (
<PLinkTile
label="Read more"
compact="true"
compact
description={title}
href={url}
className={s.link}
Expand Down
15 changes: 10 additions & 5 deletions src/components/03_organisms/projectCard/ProjectCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,17 @@ interface GithubResponse {
forks: string;
}

export const getGitHubData = async (repo: string): Promise<GithubResponse> => {
const res = await fetch(`https://api.github.com/repos/${repo}`);
if (!res.ok) {
throw new Error("Failed to fetch data");
export const getGitHubData = async (
repo: string,
): Promise<GithubResponse | null> => {
let res;

try {
res = await fetch(`https://api.github.com/repos/${repo}`);
return await (res.json() as Promise<GithubResponse>);
} catch {
throw new Error(`Failed to fetch data ${repo}`);
}
return res.json() as Promise<GithubResponse>;
};

export const renderGitHubStats = (
Expand Down
33 changes: 20 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1105,24 +1105,31 @@ __metadata:
languageName: node
linkType: hard

"@porsche-design-system/components-js@npm:3.11.0":
version: 3.11.0
resolution: "@porsche-design-system/components-js@npm:3.11.0"
checksum: 95aa51e027232f4248233d6ad12877234d83c8e42d870eac037246e42f641c02dd61f63d0e639dbbc27a3e59a30ca8f66bf139b879422ee97a9fea30a537daf2
"@porsche-design-system/components-js@npm:3.21.0":
version: 3.21.0
resolution: "@porsche-design-system/components-js@npm:3.21.0"
checksum: 431054c51fded85509249ab18d3481452d5fd5f614e73d896adfee1ba7c0b60806500cd3edeb6d72990ec11bf36f149bb258d6b02d963dc895a656ec64ecebfd
languageName: node
linkType: hard

"@porsche-design-system/components-react@npm:3.11.0":
version: 3.11.0
resolution: "@porsche-design-system/components-react@npm:3.11.0"
"@porsche-design-system/components-react@npm:3.21.0":
version: 3.21.0
resolution: "@porsche-design-system/components-react@npm:3.21.0"
dependencies:
"@porsche-design-system/components-js": 3.11.0
"@porsche-design-system/components-js": 3.21.0
peerDependencies:
react: ">=17.0.0 <19.0.0"
react-dom: ">=17.0.0 <19.0.0"
ag-grid-enterprise: ">= 32.0.0 <33.0.0"
ag-grid-react: ">= 32.0.0 <33.0.0"
react: ">=18.0.0 <19.0.0"
react-dom: ">=18.0.0 <19.0.0"
peerDependenciesMeta:
ag-grid-enterprise:
optional: true
ag-grid-react:
optional: true
bin:
patchRemixRunProcessBrowserGlobalIdentifier: bin/patchRemixRunProcessBrowserGlobalIdentifier.js
checksum: b68b83c82067867a5c84cdfd41b1d013d1a6f0bf0195ef6fb00333c043e3a29a9ced08e2f8194a3903c330859a8e8e70a74b12a051f63cd5b31d5b5286226443
checksum: 086bdafd194b522ae0b3a1ff71de8f37e49cf2d08daea89760ea077826bd6fb8d8fb537afcd3474d02ea2b1f45ff9e808c29970452499d0a59f75b8ae1d8ece1
languageName: node
linkType: hard

Expand Down Expand Up @@ -5883,8 +5890,8 @@ __metadata:
"@next/bundle-analyzer": 13.5.6
"@next/eslint-plugin-next": 13.5.6
"@playwright/test": 1.41.1
"@porsche-design-system/components-js": 3.11.0
"@porsche-design-system/components-react": 3.11.0
"@porsche-design-system/components-js": 3.21.0
"@porsche-design-system/components-react": 3.21.0
"@porscheofficial/eslint-config-porschedigital-react": 4.0.0
"@porscheofficial/prettier-config-porschedigital": 4.0.0
"@primer/octicons": 19.8.0
Expand Down
Loading