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

Add frog protocols 🐸 #93

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
9 changes: 9 additions & 0 deletions src/components/content/ProtocolBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ const cosmicProtocolsUnstableBadgeTheme: BadgeTheme = {
backgroundColor: 'bg-red-100',
}

const frogProtocolsBadgeTheme: BadgeTheme = {
textColor: 'text-red-800',

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you should probably use text-green-800. the difference won't be very noticeable tbf but its just a minor nitpick

Copy link
Contributor

@PolyMeilex PolyMeilex Sep 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, green seems kinda better
image

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I didn't want it to use the same colors as wayland stable protocols.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can use one of the other color palettes from Tailwind

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Random idea, perhaps lime bg-lime-400 text-lime-900

image

(btw core is green, stable protocols are actually blue)
(I swear I'm not trying to turn this into a discussion about colors of bike sheds 😄 )

backgroundColor: 'bg-green-100',
}

const westonProtocolsUnstableBadgeTheme: BadgeTheme = {
textColor: 'text-yellow-800',
backgroundColor: 'bg-yellow-100',
Expand All @@ -67,6 +72,8 @@ function badgeThemeFor(
return kdeProtocolsUnstableBadgeTheme
} else if (source === WaylandProtocolSource.CosmicProtocols) {
return cosmicProtocolsUnstableBadgeTheme
} else if (source === WaylandProtocolSource.FrogProtocols) {
return frogProtocolsBadgeTheme
} else if (source === WaylandProtocolSource.WestonProtocols) {
return westonProtocolsUnstableBadgeTheme
} else {
Expand All @@ -88,6 +95,8 @@ export const ProtocolBadge: React.FC<{ protocol: WaylandProtocolMetadata }> = ({
? 'kde'
: protocol.source === WaylandProtocolSource.CosmicProtocols
? 'cosmic'
: protocol.source === WaylandProtocolSource.FrogProtocols
? 'frog'
: protocol.source === WaylandProtocolSource.WestonProtocols
? 'weston'
: protocol.source === WaylandProtocolSource.External
Expand Down
9 changes: 9 additions & 0 deletions src/components/sidebar-navigation/WaylandProtocolLinks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,14 @@ function groupProtocolsIntoSections(): Section[] {
),
}

const frogProtocols: Section = {
name: 'Frog',
items: protocols.filter(
({ source }) =>
source === WaylandProtocolSource.FrogProtocols
),
}

const westonProtocolsUnstable: Section = {
name: 'Weston unstable',
items: protocols.filter(
Expand All @@ -155,6 +163,7 @@ function groupProtocolsIntoSections(): Section[] {
wlrProtocolsUnstable,
kdeProtocolsUnstable,
cosmicProtocolsUnstable,
frogProtocols,
westonProtocolsUnstable,
externalProtocols,
]
Expand Down
8 changes: 8 additions & 0 deletions src/model/protocol-source-link-builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,14 @@ const sourceRepositoryUrls: Record<
// eslint-disable-next-line no-template-curly-in-string
'https://github.com/pop-os/cosmic-protocols/blob/main/${stability}/${protocol}.xml',
},
[WaylandProtocolSource.FrogProtocols]: {
repositoryUrl: 'https://github.com/misyltoad/frog-protocols',
stabilityUrl:
'https://github.com/misyltoad/frog-protocols/tree/main/frog-protocols',
protocolUrl:
// eslint-disable-next-line no-template-curly-in-string
'https://github.com/misyltoad/frog-protocols/blob/main/frog-protocols/${protocol}.xml',
},
[WaylandProtocolSource.WestonProtocols]: {
repositoryUrl: 'https://gitlab.freedesktop.org/wayland/weston',
stabilityUrl:
Expand Down
1 change: 1 addition & 0 deletions src/model/wayland-protocol-metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ export enum WaylandProtocolSource {
WlrProtocols = 'wlr-protocols',
KDEProtocols = 'kde-protocols',
CosmicProtocols = 'cosmic-protocols',
FrogProtocols = 'frog-protocols',
WestonProtocols = 'weston-protocols',
External = 'external',
}
Expand Down