Skip to content

Commit 40031aa

Browse files
committed
Add roadmap component + page
1 parent 2aaf520 commit 40031aa

File tree

6 files changed

+139
-0
lines changed

6 files changed

+139
-0
lines changed

Diff for: src/components/GitHubIssueList.astro

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
import GitHubIssue from "./GitHubIssue.astro";
3+
4+
interface Props {
5+
open: boolean;
6+
issues: list;
7+
elClass: string;
8+
}
9+
10+
const { open, issues, elClass } = Astro.props;
11+
---
12+
13+
<details class={`pb-0 mb-5 ${elClass}`} open={open}>
14+
<summary class="px-5 py-7 cursor-pointer"
15+
><h2 class="inline"><slot /></h2></summary
16+
>
17+
<div class="flex flex-col gap-5 p-5">
18+
{issues.map((issue) => <GitHubIssue issue={issue} />)}
19+
</div>
20+
</details>

Diff for: src/components/GitHubRoadmap.astro

+89
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
---
2+
import axios from "axios";
3+
import GitHubIssueList from "./GitHubIssueList.astro";
4+
import { useTranslations } from "../utils/i18n";
5+
6+
const lang = Astro.currentLocale as language;
7+
const t = useTranslations(lang);
8+
9+
const issues = { backlog: [], inProgress: [], done: [], planned: [] };
10+
11+
const query = `
12+
query {
13+
organization(login: "pentacent") {
14+
projectV2(number: 2) {
15+
items(first: 100) {
16+
nodes {
17+
status: fieldValueByName(name: "Status") {
18+
... on ProjectV2ItemFieldSingleSelectValue {
19+
name
20+
}
21+
}
22+
content {
23+
... on Issue {
24+
title
25+
number
26+
html_url: url
27+
closed
28+
closedAt
29+
comments {
30+
total_count: totalCount
31+
}
32+
reactions {total_count: totalCount}
33+
}
34+
}
35+
}
36+
}
37+
}
38+
}
39+
}
40+
`;
41+
42+
try {
43+
const response = await axios.post(
44+
"https://api.github.com/graphql",
45+
{ query: query },
46+
{
47+
headers: {
48+
Authorization: `Bearer ${import.meta.env.GITHUB_PROJECT_TOKEN}`,
49+
"Content-Type": "application/json",
50+
},
51+
},
52+
);
53+
54+
const nodes = response.data.data.organization.projectV2.items.nodes;
55+
56+
nodes.forEach((node) => {
57+
switch (node.status.name) {
58+
case "Planned":
59+
return issues.planned.push(node.content);
60+
case "In Progress":
61+
return issues.inProgress.push(node.content);
62+
case "Done":
63+
return issues.done.push(node.content);
64+
case "Contributions Welcome":
65+
return issues.planned.push(node.content);
66+
case "Backlog":
67+
return issues.backlog.push(node.content);
68+
}
69+
});
70+
} catch (error) {
71+
console.warn(`Unable to fetch GitHub project information`, error);
72+
}
73+
---
74+
75+
<GitHubIssueList open="true" elClass="bg-emerald-200" issues={issues.inProgress}
76+
>{t("roadmap.inProgress")}</GitHubIssueList
77+
>
78+
79+
<GitHubIssueList open={true} elClass="bg-blue-200" issues={issues.planned}
80+
>{t("roadmap.planned")}</GitHubIssueList
81+
>
82+
83+
<GitHubIssueList elClass="bg-purple-100" issues={issues.backlog}
84+
>{t("roadmap.backlog")}</GitHubIssueList
85+
>
86+
87+
<GitHubIssueList elClass="bg-emerald-100" issues={issues.done} open
88+
>{t("roadmap.completed")}</GitHubIssueList
89+
>

Diff for: src/content/articles/de/roadmap.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Roadmap
3+
description: Dies ist die öffentliche Roadmap für das Keila-Projekt.
4+
---
5+
6+
Keila entwickelt sich immer weiter. Hier sind einige Dinge, an denen wir gerade arbeiten oder die für zukünftige Versionen geplant sind.
7+
8+
Wenn du eigene Vorschläge oder Ideen hast, kannst du sie in unserer [Community bei GitHub](https://github.com/pentacent/keila) teilen oder uns einfach eine E-Mail an <Email user="hello" domain="keila.io" /> senden.
9+
10+
<GitHubRoadmap />

Diff for: src/content/articles/en/roadmap.mdx

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Roadmap
3+
description: This is the public roadmap for the Keila project. Here we share what we're working on right now and what's planned for future releases.
4+
---
5+
6+
Keila is constantly evolving. Here are some things we’re currently working on and things that we have planned for future releases.
7+
8+
If you have suggestions or ideas, please feel free to [join our community on GitHub](https://github.com/pentacent/keila) or reach out directly at <Email user="hello" domain="keila.io" />.
9+
10+
<GitHubRoadmap />

Diff for: src/layouts/ArticleLayout.astro

+2
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import KeilaImage from "../components/KeilaImage.astro";
66
import Email from "../components/Email.astro";
77
import Plans from "../components/Plans.astro";
88
import GitHubIssue from "../components/GitHubIssue.astro";
9+
import GitHubRoadmap from "../components/GitHubRoadmap.astro";
910
import LibreFriends from "../components/LibreFriends.astro";
1011
import I18NLink from "../components/I18nLink.astro";
1112
@@ -32,6 +33,7 @@ const { Content, components } = await entry.render();
3233
components={{
3334
...components,
3435
GitHubIssue,
36+
GitHubRoadmap,
3537
I18NLink,
3638
KeilaImage,
3739
LibreFriends,

Diff for: src/utils/translations.ts

+8
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,10 @@ export const strings = {
9191
"managed-note.heading": "Note:",
9292
"managed-note.body":
9393
"This document only applies if you are using Keila Cloud.<br />If you are using a self-hosted instance, these instructions won’t work.",
94+
"roadmap.planned": "Planned",
95+
"roadmap.inProgress": "In Progress",
96+
"roadmap.backlog": "Further Ideas",
97+
"roadmap.completed": "Completed",
9498
},
9599
de: {
96100
lang: "Deutsch",
@@ -167,6 +171,10 @@ export const strings = {
167171
"managed-note.heading": "Hinweis:",
168172
"managed-note.body":
169173
"Diese Anleitung gilt nur, wenn du Keila Cloud verwemdest.<br />Wenn du eine eigene Instanz betreibst, werden die hier gezeigten Schritte nicht funktionieren.",
174+
"roadmap.planned": "Geplant",
175+
"roadmap.inProgress": "In Arbeit",
176+
"roadmap.backlog": "Weitere Ideen",
177+
"roadmap.completed": "Abgeschlossen",
170178
},
171179
fr: {
172180
lang: "Français",

0 commit comments

Comments
 (0)