Skip to content

Commit cdc63d1

Browse files
authored
Remove PyPI badges from toolkit headers (#896)
1 parent 298b4b8 commit cdc63d1

6 files changed

Lines changed: 5 additions & 150 deletions

File tree

app/_components/logo.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import { Arcade, ArcadeLogo } from "@arcadeai/design-system";
1+
import {
2+
Arcade,
3+
ArcadeLogo,
4+
} from "@arcadeai/design-system/components/ui/atoms/icons";
25

36
export function Logo() {
47
return (

app/_components/toolkit-docs/components/toolkit-header.tsx

Lines changed: 0 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ import {
99
AUTH_TYPE_LABELS,
1010
DEFAULT_AUTHOR,
1111
getAuthProviderDocsUrl,
12-
getPackageName,
13-
LICENSE_BADGE,
14-
PYPI_BADGES,
1512
} from "../constants";
1613
import type { ToolkitHeaderProps, ToolkitType } from "../types";
1714

@@ -66,7 +63,6 @@ function ToolkitBadges({
6663
* @example
6764
* ```tsx
6865
* <ToolkitHeader
69-
* id="Github"
7066
* label="GitHub"
7167
* description="GitHub repository and collaboration tools"
7268
* metadata={toolkitData.metadata}
@@ -75,7 +71,6 @@ function ToolkitBadges({
7571
* ```
7672
*/
7773
export function ToolkitHeader({
78-
id,
7974
label,
8075
description,
8176
metadata,
@@ -86,7 +81,6 @@ export function ToolkitHeader({
8681
}: ToolkitHeaderProps): React.ReactElement {
8782
// Icon comes from the JSON metadata - the source of truth
8883
const iconUrl = metadata.iconUrl;
89-
const packageName = getPackageName(id);
9084

9185
// Determine auth display
9286
const authProviderName = auth?.providerId
@@ -220,59 +214,6 @@ export function ToolkitHeader({
220214
)}
221215
</div>
222216
</div>
223-
224-
{/* PyPI Badges */}
225-
{id && (
226-
<div className="bg-neutral-dark/20 px-6 py-3">
227-
<div className="flex flex-wrap justify-center gap-2">
228-
{PYPI_BADGES.map((badge) => (
229-
<a
230-
href={
231-
typeof badge.href === "function"
232-
? badge.href(packageName)
233-
: badge.href
234-
}
235-
key={badge.alt}
236-
rel="noopener noreferrer"
237-
target="_blank"
238-
>
239-
<img
240-
alt={badge.alt}
241-
className="h-5 w-auto"
242-
height={20}
243-
src={
244-
typeof badge.src === "function"
245-
? badge.src(packageName)
246-
: badge.src
247-
}
248-
width={80}
249-
/>
250-
</a>
251-
))}
252-
<a
253-
href={
254-
typeof LICENSE_BADGE.href === "function"
255-
? LICENSE_BADGE.href(packageName)
256-
: LICENSE_BADGE.href
257-
}
258-
rel="noopener noreferrer"
259-
target="_blank"
260-
>
261-
<img
262-
alt={LICENSE_BADGE.alt}
263-
className="h-5 w-auto"
264-
height={20}
265-
src={
266-
typeof LICENSE_BADGE.src === "function"
267-
? LICENSE_BADGE.src(packageName)
268-
: LICENSE_BADGE.src
269-
}
270-
width={80}
271-
/>
272-
</a>
273-
</div>
274-
</div>
275-
)}
276217
</div>
277218
);
278219
}

app/_components/toolkit-docs/components/toolkit-page.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -613,7 +613,6 @@ export function ToolkitPage({ data }: ToolkitPageProps) {
613613
<ToolkitHeader
614614
auth={data.auth}
615615
description={data.description}
616-
id={data.id}
617616
label={data.label}
618617
metadata={metadata}
619618
toolStats={toolStats}

app/_components/toolkit-docs/constants.ts

Lines changed: 1 addition & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,7 @@
11
/**
2-
* Toolkit documentation constants
3-
*
4-
* Centralized configuration for URLs, badges, labels, and other constants
5-
* used throughout the toolkit documentation components.
2+
* Toolkit documentation constants shared across toolkit UI components.
63
*/
74

8-
// =============================================================================
9-
// External URLs
10-
// =============================================================================
11-
12-
/**
13-
* GitHub organization URL
14-
*/
15-
export const GITHUB_ORG_URL = "https://github.com/arcadeai";
16-
17-
/**
18-
* GitHub repository URL pattern for toolkit code
19-
* Use: `${GITHUB_ORG_URL}/arcade_${toolkitId.toLowerCase()}`
20-
*/
21-
export const GITHUB_REPO_PREFIX = "arcade_";
22-
23-
/**
24-
* License file URL
25-
*/
26-
export const LICENSE_URL = `${GITHUB_ORG_URL}/arcade-ai/blob/main/LICENSE`;
27-
28-
/**
29-
* PyPI base URL
30-
*/
31-
export const PYPI_BASE_URL = "https://pypi.org/project";
32-
33-
/**
34-
* Shields.io base URL for badges
35-
*/
36-
export const SHIELDS_IO_BASE_URL = "https://img.shields.io";
37-
385
// =============================================================================
396
// Internal Routes
407
// =============================================================================
@@ -71,65 +38,13 @@ export function getPackageName(toolkitId: string): string {
7138
return `${PACKAGE_PREFIX}${id}`;
7239
}
7340

74-
/**
75-
* Generate PyPI project URL from package name
76-
*/
77-
export function getPyPIUrl(packageName: string): string {
78-
return `${PYPI_BASE_URL}/${packageName}/`;
79-
}
80-
8141
/**
8242
* Generate auth provider docs URL from provider ID
8343
*/
8444
export function getAuthProviderDocsUrl(providerId: string): string {
8545
return `${AUTH_PROVIDER_DOCS_PATH}/${providerId.toLowerCase()}`;
8646
}
8747

88-
// =============================================================================
89-
// Badges Configuration
90-
// =============================================================================
91-
92-
export type BadgeConfig = {
93-
alt: string;
94-
src: string | ((packageName: string) => string);
95-
href: string | ((packageName: string) => string);
96-
};
97-
98-
/**
99-
* PyPI badge configurations
100-
*/
101-
export const PYPI_BADGES: BadgeConfig[] = [
102-
{
103-
alt: "PyPI Version",
104-
src: (pkg) => `${SHIELDS_IO_BASE_URL}/pypi/v/${pkg}`,
105-
href: (pkg) => getPyPIUrl(pkg),
106-
},
107-
{
108-
alt: "Python Versions",
109-
src: (pkg) => `${SHIELDS_IO_BASE_URL}/pypi/pyversions/${pkg}`,
110-
href: (pkg) => getPyPIUrl(pkg),
111-
},
112-
{
113-
alt: "Wheel Status",
114-
src: (pkg) => `${SHIELDS_IO_BASE_URL}/pypi/wheel/${pkg}`,
115-
href: (pkg) => getPyPIUrl(pkg),
116-
},
117-
{
118-
alt: "Downloads",
119-
src: (pkg) => `${SHIELDS_IO_BASE_URL}/pypi/dm/${pkg}`,
120-
href: (pkg) => getPyPIUrl(pkg),
121-
},
122-
];
123-
124-
/**
125-
* License badge configuration
126-
*/
127-
export const LICENSE_BADGE: BadgeConfig = {
128-
alt: "License",
129-
src: `${SHIELDS_IO_BASE_URL}/badge/License-MIT-yellow.svg`,
130-
href: LICENSE_URL,
131-
};
132-
13348
// =============================================================================
13449
// Default Values
13550
// =============================================================================

app/_components/toolkit-docs/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
* return (
1515
* <>
1616
* <ToolkitHeader
17-
* id={toolkitData.id}
1817
* label={toolkitData.label}
1918
* description={toolkitData.description}
2019
* metadata={toolkitData.metadata}

app/_components/toolkit-docs/types/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -378,8 +378,6 @@ export type DocumentationChunkRendererProps = {
378378
* Props for ToolkitHeader component
379379
*/
380380
export type ToolkitHeaderProps = {
381-
/** Toolkit ID for icon lookup */
382-
id: string;
383381
/** Display label */
384382
label: string;
385383
/** Toolkit description */

0 commit comments

Comments
 (0)