@purview-dev/pm-docs-site 0.0.0-stage → 0.1.0-pre.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE.md +9 -0
- package/README.md +167 -2
- package/cli.mjs +120 -0
- package/index.d.ts +49 -0
- package/index.mjs +97 -0
- package/lib/options.mjs +67 -0
- package/lib/repo-docs.mjs +148 -0
- package/lib/schema-version.mjs +29 -0
- package/lib/sidebar.mjs +47 -0
- package/lib/site-options.mjs +38 -0
- package/package.json +62 -5
- package/src/components/ExportStamp.astro +29 -0
- package/src/components/FeatureSummary.astro +160 -0
- package/src/components/FeatureTable.astro +64 -0
- package/src/components/ItemDetail.astro +16 -0
- package/src/components/ItemDialog.astro +16 -0
- package/src/components/LinkedFrom.astro +33 -0
- package/src/components/LinkedText.astro +12 -0
- package/src/components/PlanInteractions.astro +18 -0
- package/src/components/RefLink.astro +18 -0
- package/src/components/StateBadge.astro +15 -0
- package/src/components/lib/KanbanItemCard.astro +264 -0
- package/src/components/lib/StatusTimelineFeed.astro +194 -0
- package/src/components/lib/TaskKanbanCard.astro +215 -0
- package/src/content.config.ts +16 -0
- package/src/env.d.ts +7 -0
- package/src/lib/planning-types.ts +207 -0
- package/src/lib/planning.ts +387 -0
- package/src/lib/references.ts +360 -0
- package/src/loaders/repo-docs.ts +69 -0
- package/src/pages/index.astro +158 -0
- package/src/pages/plan/board.astro +140 -0
- package/src/pages/plan/log.astro +83 -0
- package/src/pages/plan/risks/[id].astro +72 -0
- package/src/pages/plan/risks.astro +263 -0
- package/src/pages/plan/roadmap.astro +90 -0
- package/src/routes/plan/briefs.astro +66 -0
- package/src/routes/plan/features/[id].astro +113 -0
- package/src/routes/plan/features/index.astro +29 -0
- package/src/routes/plan/inbox.astro +78 -0
- package/src/routes/plan/milestones/[milestone].astro +113 -0
- package/src/routes/plan/milestones/index.astro +56 -0
- package/src/routes/plan/now.astro +135 -0
- package/src/routes/plan/strategy.astro +194 -0
- package/src/scripts/plan.ts +86 -0
- package/src/styles/components.css +374 -0
- package/src/styles/width.css +4 -0
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The task board, column by column, from planning.json's `board.columns` —
|
|
3
|
+
// the same columns the pm-board skill renders. Each card links to its item's
|
|
4
|
+
// page; a plain click opens the item popup, and each column can collapse.
|
|
5
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
6
|
+
|
|
7
|
+
import ExportStamp from '../../components/ExportStamp.astro';
|
|
8
|
+
import ItemDetail from '../../components/ItemDetail.astro';
|
|
9
|
+
import ItemDialog from '../../components/ItemDialog.astro';
|
|
10
|
+
import KanbanItemCard from '../../components/lib/KanbanItemCard.astro';
|
|
11
|
+
import TaskKanbanCard from '../../components/lib/TaskKanbanCard.astro';
|
|
12
|
+
import PlanInteractions from '../../components/PlanInteractions.astro';
|
|
13
|
+
import { features, initials, loadPlanning, planProgress, sizeToPriority } from '../../lib/planning';
|
|
14
|
+
import { siteRefs } from '../../lib/references';
|
|
15
|
+
import type { Card } from '../../lib/planning-types';
|
|
16
|
+
import '../../styles/components.css';
|
|
17
|
+
|
|
18
|
+
const planning = loadPlanning();
|
|
19
|
+
const { columns } = planning.board;
|
|
20
|
+
const { known } = siteRefs();
|
|
21
|
+
|
|
22
|
+
// The item behind a card, for its milestone and its page.
|
|
23
|
+
const items = new Map(features(planning).map((feature) => [feature.id, feature]));
|
|
24
|
+
const hrefOf = (id: string | null) => (id ? (known.get(id)?.href ?? undefined) : undefined);
|
|
25
|
+
const milestoneKey = (id: string | null) => (id ? (items.get(id)?.milestone ?? 'none') : 'none');
|
|
26
|
+
const tagOf = (id: string | null) => {
|
|
27
|
+
const key = milestoneKey(id);
|
|
28
|
+
|
|
29
|
+
return { tag: key === 'none' ? 'No milestone' : key, tagHref: known.get(key)?.href ?? null };
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
const progress = planProgress(planning.plan);
|
|
33
|
+
const taskPriority = (size: Card['size']) => ({ low: 'low', medium: 'med', high: 'high' } as const)[sizeToPriority(size)];
|
|
34
|
+
|
|
35
|
+
const queued = [
|
|
36
|
+
{ name: 'next', title: 'Next', cards: columns.next },
|
|
37
|
+
{ name: 'foryou', title: 'For you', cards: columns.foryou },
|
|
38
|
+
{ name: 'waiting', title: 'Waiting', cards: columns.waiting },
|
|
39
|
+
];
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
<StarlightPage
|
|
43
|
+
frontmatter={{ title: 'Board', description: 'Now, Next, For you, Waiting and Done.', tableOfContents: false }}
|
|
44
|
+
>
|
|
45
|
+
<ExportStamp />
|
|
46
|
+
<PlanInteractions />
|
|
47
|
+
|
|
48
|
+
<!-- `not-content`: Starlight's prose spacing would push every column after the first down. -->
|
|
49
|
+
<div class="plan-columns not-content">
|
|
50
|
+
<section class="plan-column" data-column="now" aria-labelledby="col-now">
|
|
51
|
+
<h2 id="col-now">
|
|
52
|
+
<button type="button" class="plan-column__toggle" aria-expanded="true" aria-controls="col-now-cards">
|
|
53
|
+
<span class="plan-column__name">Now</span> <span class="plan-column__count">{columns.now.length}</span>
|
|
54
|
+
</button>
|
|
55
|
+
</h2>
|
|
56
|
+
<div class="plan-column__cards" id="col-now-cards">
|
|
57
|
+
{columns.now.length === 0 && <p class="plan-empty">Nothing here</p>}
|
|
58
|
+
{
|
|
59
|
+
columns.now.map((card) => (
|
|
60
|
+
<>
|
|
61
|
+
<TaskKanbanCard
|
|
62
|
+
task={`${card.id} ${card.title}`}
|
|
63
|
+
date={planning.now.started ?? ''}
|
|
64
|
+
assigneeInitials={initials(card.owner)}
|
|
65
|
+
priority={taskPriority(card.size)}
|
|
66
|
+
progress={progress}
|
|
67
|
+
href={hrefOf(card.id)}
|
|
68
|
+
itemId={card.id}
|
|
69
|
+
/>
|
|
70
|
+
{hrefOf(card.id) && <ItemDetail id={card.id} />}
|
|
71
|
+
</>
|
|
72
|
+
))
|
|
73
|
+
}
|
|
74
|
+
</div>
|
|
75
|
+
</section>
|
|
76
|
+
|
|
77
|
+
{
|
|
78
|
+
queued.map((column) => (
|
|
79
|
+
<section class="plan-column" data-column={column.name} aria-labelledby={`col-${column.name}`}>
|
|
80
|
+
<h2 id={`col-${column.name}`}>
|
|
81
|
+
<button type="button" class="plan-column__toggle" aria-expanded="true" aria-controls={`col-${column.name}-cards`}>
|
|
82
|
+
<span class="plan-column__name">{column.title}</span> <span class="plan-column__count">{column.cards.length}</span>
|
|
83
|
+
</button>
|
|
84
|
+
</h2>
|
|
85
|
+
<div class="plan-column__cards" id={`col-${column.name}-cards`}>
|
|
86
|
+
{column.cards.length === 0 && <p class="plan-empty">Nothing here</p>}
|
|
87
|
+
{column.cards.map((card) => (
|
|
88
|
+
<>
|
|
89
|
+
<KanbanItemCard
|
|
90
|
+
title={`${card.id} ${card.title}`}
|
|
91
|
+
{...tagOf(card.id)}
|
|
92
|
+
assignee={initials(card.owner)}
|
|
93
|
+
dueDate={card.detail ?? ''}
|
|
94
|
+
priority={sizeToPriority(card.size)}
|
|
95
|
+
commentsCount={0}
|
|
96
|
+
attachmentsCount={0}
|
|
97
|
+
href={hrefOf(card.id)}
|
|
98
|
+
itemId={card.id}
|
|
99
|
+
/>
|
|
100
|
+
{hrefOf(card.id) && <ItemDetail id={card.id} />}
|
|
101
|
+
</>
|
|
102
|
+
))}
|
|
103
|
+
</div>
|
|
104
|
+
</section>
|
|
105
|
+
))
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
<section class="plan-column" data-column="done" aria-labelledby="col-done">
|
|
109
|
+
<h2 id="col-done">
|
|
110
|
+
<button type="button" class="plan-column__toggle" aria-expanded="true" aria-controls="col-done-cards">
|
|
111
|
+
<span class="plan-column__name">Done</span> <span class="plan-column__count">{columns.done.length}</span>
|
|
112
|
+
</button>
|
|
113
|
+
</h2>
|
|
114
|
+
<div class="plan-column__cards" id="col-done-cards">
|
|
115
|
+
{columns.done.length === 0 && <p class="plan-empty">Nothing here</p>}
|
|
116
|
+
{
|
|
117
|
+
columns.done.map((entry) => (
|
|
118
|
+
// The result can run to a paragraph; it is on the Log page, not squeezed into a tag.
|
|
119
|
+
<>
|
|
120
|
+
<KanbanItemCard
|
|
121
|
+
title={entry.id ? `${entry.id} ${entry.title}` : entry.title}
|
|
122
|
+
{...tagOf(entry.id)}
|
|
123
|
+
assignee={initials(entry.owner)}
|
|
124
|
+
dueDate={entry.date}
|
|
125
|
+
priority="low"
|
|
126
|
+
commentsCount={0}
|
|
127
|
+
attachmentsCount={0}
|
|
128
|
+
href={hrefOf(entry.id)}
|
|
129
|
+
itemId={entry.id ?? undefined}
|
|
130
|
+
/>
|
|
131
|
+
{entry.id && hrefOf(entry.id) && <ItemDetail id={entry.id} />}
|
|
132
|
+
</>
|
|
133
|
+
))
|
|
134
|
+
}
|
|
135
|
+
</div>
|
|
136
|
+
</section>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<ItemDialog />
|
|
140
|
+
</StarlightPage>
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
---
|
|
2
|
+
// Done, dropped and reviews, newest first, from planning.json's
|
|
3
|
+
// `board.activity`. A done item's plan links to its page on this site.
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../../components/ExportStamp.astro';
|
|
7
|
+
import LinkedText from '../../components/LinkedText.astro';
|
|
8
|
+
import RefLink from '../../components/RefLink.astro';
|
|
9
|
+
import { docsHref, loadPlanning } from '../../lib/planning';
|
|
10
|
+
import '../../styles/components.css';
|
|
11
|
+
|
|
12
|
+
const planning = loadPlanning();
|
|
13
|
+
// `activity` carries no plan path; the Done log does.
|
|
14
|
+
const plans = new Map(planning.log.done.filter((entry) => entry.id).map((entry) => [entry.id, entry.plan]));
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
<StarlightPage frontmatter={{ title: 'Log', description: 'What was done, dropped and reviewed, newest first.', tableOfContents: false }}>
|
|
18
|
+
<ExportStamp />
|
|
19
|
+
|
|
20
|
+
<table class="log-table">
|
|
21
|
+
<thead>
|
|
22
|
+
<tr>
|
|
23
|
+
<th scope="col">Date</th>
|
|
24
|
+
<th scope="col">Kind</th>
|
|
25
|
+
<th scope="col">Item</th>
|
|
26
|
+
<th scope="col">Result</th>
|
|
27
|
+
</tr>
|
|
28
|
+
</thead>
|
|
29
|
+
<tbody>
|
|
30
|
+
{
|
|
31
|
+
planning.board.activity.map((entry) => {
|
|
32
|
+
const plan = entry.kind === 'done' && entry.id ? docsHref(plans.get(entry.id) ?? null) : null;
|
|
33
|
+
|
|
34
|
+
return (
|
|
35
|
+
<tr>
|
|
36
|
+
<td>{entry.date}</td>
|
|
37
|
+
<td>
|
|
38
|
+
<span class={`log-kind log-kind--${entry.kind}`}>{entry.kind}</span>
|
|
39
|
+
</td>
|
|
40
|
+
<td>
|
|
41
|
+
{entry.id ? <RefLink ref={entry.id} /> : <LinkedText text={entry.title} />}
|
|
42
|
+
{plan && (
|
|
43
|
+
<>
|
|
44
|
+
{' '}
|
|
45
|
+
(<a href={plan}>plan</a>)
|
|
46
|
+
</>
|
|
47
|
+
)}
|
|
48
|
+
</td>
|
|
49
|
+
<td>
|
|
50
|
+
<LinkedText text={entry.result} />
|
|
51
|
+
</td>
|
|
52
|
+
</tr>
|
|
53
|
+
);
|
|
54
|
+
})
|
|
55
|
+
}
|
|
56
|
+
</tbody>
|
|
57
|
+
</table>
|
|
58
|
+
</StarlightPage>
|
|
59
|
+
|
|
60
|
+
<style>
|
|
61
|
+
.log-table td:first-child {
|
|
62
|
+
white-space: nowrap;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
.log-kind {
|
|
66
|
+
padding: 0.1rem 0.45rem;
|
|
67
|
+
border-radius: 4px;
|
|
68
|
+
font-size: var(--sl-text-xs);
|
|
69
|
+
text-transform: uppercase;
|
|
70
|
+
letter-spacing: 0.03em;
|
|
71
|
+
border: 1px solid var(--sl-color-hairline);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.log-kind--done {
|
|
75
|
+
color: #047857;
|
|
76
|
+
border-color: #10b98166;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.log-kind--dropped {
|
|
80
|
+
color: #b91c1c;
|
|
81
|
+
border-color: #ef444466;
|
|
82
|
+
}
|
|
83
|
+
</style>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
---
|
|
2
|
+
// One open or closed risk from planning.json's `risks`: its rating, owner and
|
|
3
|
+
// dates, what it affects, its trigger and mitigation, and what links to it.
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../../../components/ExportStamp.astro';
|
|
7
|
+
import LinkedFrom from '../../../components/LinkedFrom.astro';
|
|
8
|
+
import LinkedText from '../../../components/LinkedText.astro';
|
|
9
|
+
import { loadPlanning } from '../../../lib/planning';
|
|
10
|
+
import type { Risk } from '../../../lib/planning-types';
|
|
11
|
+
import '../../../styles/components.css';
|
|
12
|
+
|
|
13
|
+
export function getStaticPaths() {
|
|
14
|
+
const { risks } = loadPlanning();
|
|
15
|
+
|
|
16
|
+
return [...risks.open, ...risks.closed].map((risk) => ({ params: { id: risk.id.toLowerCase() }, props: { risk } }));
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
const { risk } = Astro.props as { risk: Risk };
|
|
20
|
+
|
|
21
|
+
const facts: { label: string; value: string }[] = [
|
|
22
|
+
{ label: 'Likelihood', value: risk.likelihood },
|
|
23
|
+
{ label: 'Impact', value: risk.impact },
|
|
24
|
+
...(risk.ragOverride ? [{ label: 'RAG override', value: risk.ragOverride }] : []),
|
|
25
|
+
{ label: 'Status', value: risk.status },
|
|
26
|
+
{ label: 'Owner', value: risk.owner },
|
|
27
|
+
...(risk.raised ? [{ label: 'Raised', value: risk.raised }] : []),
|
|
28
|
+
{ label: 'Reviewed', value: risk.reviewed ?? 'never' },
|
|
29
|
+
...(risk.closed ? [{ label: 'Closed', value: risk.closed }] : []),
|
|
30
|
+
];
|
|
31
|
+
const prose = [
|
|
32
|
+
{ label: 'Affects', text: risk.affects },
|
|
33
|
+
{ label: 'Trigger', text: risk.trigger },
|
|
34
|
+
{ label: 'Mitigation', text: risk.mitigation },
|
|
35
|
+
];
|
|
36
|
+
---
|
|
37
|
+
|
|
38
|
+
<StarlightPage
|
|
39
|
+
frontmatter={{ title: `${risk.id} ${risk.title}`, description: `${risk.rag} risk, ${risk.status}.`, tableOfContents: false }}
|
|
40
|
+
>
|
|
41
|
+
<ExportStamp kind="Risk" />
|
|
42
|
+
|
|
43
|
+
<p>
|
|
44
|
+
<span class={`rag rag--${risk.rag}`}>{risk.rag}</span>
|
|
45
|
+
{' '}
|
|
46
|
+
<a href="/plan/risks/">All risks</a>
|
|
47
|
+
</p>
|
|
48
|
+
|
|
49
|
+
<dl class="plan-facts">
|
|
50
|
+
{
|
|
51
|
+
facts.map((fact) => (
|
|
52
|
+
<div>
|
|
53
|
+
<dt>{fact.label}</dt>
|
|
54
|
+
<dd>
|
|
55
|
+
<LinkedText text={fact.value} />
|
|
56
|
+
</dd>
|
|
57
|
+
</div>
|
|
58
|
+
))
|
|
59
|
+
}
|
|
60
|
+
</dl>
|
|
61
|
+
|
|
62
|
+
{
|
|
63
|
+
prose.map((entry) => (
|
|
64
|
+
<section>
|
|
65
|
+
<h2>{entry.label}</h2>
|
|
66
|
+
<p>{entry.text ? <LinkedText text={entry.text} /> : 'none'}</p>
|
|
67
|
+
</section>
|
|
68
|
+
))
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
<LinkedFrom ref={risk.id} />
|
|
72
|
+
</StarlightPage>
|
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The risk register from planning.json's `risks`: the RAG counts, the
|
|
3
|
+
// likelihood × impact matrix of open risks, then open, closed and removed risks.
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../../components/ExportStamp.astro';
|
|
7
|
+
import LinkedText from '../../components/LinkedText.astro';
|
|
8
|
+
import RefLink from '../../components/RefLink.astro';
|
|
9
|
+
import { loadPlanning, riskMatrix } from '../../lib/planning';
|
|
10
|
+
import '../../styles/components.css';
|
|
11
|
+
|
|
12
|
+
const planning = loadPlanning();
|
|
13
|
+
const { risks, counts } = planning;
|
|
14
|
+
const matrix = riskMatrix(risks.open);
|
|
15
|
+
|
|
16
|
+
const figures = [
|
|
17
|
+
{ label: 'Red', value: counts.redRisks, rag: 'red' },
|
|
18
|
+
{ label: 'Amber', value: counts.amberRisks, rag: 'amber' },
|
|
19
|
+
{ label: 'Green', value: counts.greenRisks, rag: 'green' },
|
|
20
|
+
{ label: 'Closed', value: risks.closed.length, rag: null },
|
|
21
|
+
];
|
|
22
|
+
---
|
|
23
|
+
|
|
24
|
+
<StarlightPage frontmatter={{ title: 'Risks', description: 'The risk register: open risks by RAG status, then closed and removed risks.', tableOfContents: false }}>
|
|
25
|
+
<ExportStamp />
|
|
26
|
+
|
|
27
|
+
<section>
|
|
28
|
+
<h2>Open risks: {counts.openRisks}</h2>
|
|
29
|
+
<dl class="risk-figures">
|
|
30
|
+
{
|
|
31
|
+
figures.map((figure) => (
|
|
32
|
+
<div class={figure.rag ? `risk-figure--${figure.rag}` : undefined}>
|
|
33
|
+
<dt>{figure.label}</dt>
|
|
34
|
+
<dd>{figure.value}</dd>
|
|
35
|
+
</div>
|
|
36
|
+
))
|
|
37
|
+
}
|
|
38
|
+
</dl>
|
|
39
|
+
</section>
|
|
40
|
+
|
|
41
|
+
<section>
|
|
42
|
+
<h2>Likelihood × impact</h2>
|
|
43
|
+
<div class="risk-matrix not-content" role="table" aria-label="Open risks by likelihood and impact">
|
|
44
|
+
<div role="row" class="risk-matrix__row">
|
|
45
|
+
<span role="columnheader" class="risk-matrix__corner">Impact ↓ / Likelihood →</span>
|
|
46
|
+
{matrix[0]!.map((cell) => <span role="columnheader" class="risk-matrix__axis">{cell.likelihood}</span>)}
|
|
47
|
+
</div>
|
|
48
|
+
{
|
|
49
|
+
matrix.map((row) => (
|
|
50
|
+
<div role="row" class="risk-matrix__row">
|
|
51
|
+
<span role="rowheader" class="risk-matrix__axis">{row[0]!.impact}</span>
|
|
52
|
+
{row.map((cell) => (
|
|
53
|
+
<div role="cell" class={`risk-matrix__cell risk-matrix__cell--${cell.rag}`}>
|
|
54
|
+
{cell.risks.length === 0 ? (
|
|
55
|
+
<span class="plan-empty">–</span>
|
|
56
|
+
) : (
|
|
57
|
+
cell.risks.map((risk) => (
|
|
58
|
+
<RefLink ref={risk.id} label="id" />
|
|
59
|
+
))
|
|
60
|
+
)}
|
|
61
|
+
</div>
|
|
62
|
+
))}
|
|
63
|
+
</div>
|
|
64
|
+
))
|
|
65
|
+
}
|
|
66
|
+
</div>
|
|
67
|
+
<p class="plan-empty">A cell's colour is the RAG its likelihood and impact derive; a risk's own RAG can differ when it is overridden.</p>
|
|
68
|
+
</section>
|
|
69
|
+
|
|
70
|
+
<section>
|
|
71
|
+
<h2>Open</h2>
|
|
72
|
+
{risks.open.length === 0 && <p class="plan-empty">No open risks.</p>}
|
|
73
|
+
{
|
|
74
|
+
risks.open.length > 0 && (
|
|
75
|
+
<table class="risk-table">
|
|
76
|
+
<thead>
|
|
77
|
+
<tr>
|
|
78
|
+
<th scope="col">RAG</th>
|
|
79
|
+
<th scope="col">Risk</th>
|
|
80
|
+
<th scope="col">Likelihood</th>
|
|
81
|
+
<th scope="col">Impact</th>
|
|
82
|
+
<th scope="col">Status</th>
|
|
83
|
+
<th scope="col">Owner</th>
|
|
84
|
+
<th scope="col">Mitigation</th>
|
|
85
|
+
<th scope="col">Reviewed</th>
|
|
86
|
+
</tr>
|
|
87
|
+
</thead>
|
|
88
|
+
<tbody>
|
|
89
|
+
{risks.open.map((risk) => (
|
|
90
|
+
<tr id={risk.id.toLowerCase()}>
|
|
91
|
+
<td>
|
|
92
|
+
<span class={`rag rag--${risk.rag}`}>{risk.rag}</span>
|
|
93
|
+
</td>
|
|
94
|
+
<td>
|
|
95
|
+
<strong><RefLink ref={risk.id} label="id" /></strong> <LinkedText text={risk.title} />
|
|
96
|
+
{risk.affects && <div class="risk-detail">Affects: <LinkedText text={risk.affects} /></div>}
|
|
97
|
+
{risk.trigger && <div class="risk-detail">Trigger: <LinkedText text={risk.trigger} /></div>}
|
|
98
|
+
{risk.ragOverride && (
|
|
99
|
+
<div class="risk-detail">
|
|
100
|
+
RAG override: <LinkedText text={risk.ragOverride} />
|
|
101
|
+
</div>
|
|
102
|
+
)}
|
|
103
|
+
</td>
|
|
104
|
+
<td>{risk.likelihood}</td>
|
|
105
|
+
<td>{risk.impact}</td>
|
|
106
|
+
<td>{risk.status}</td>
|
|
107
|
+
<td>{risk.owner}</td>
|
|
108
|
+
<td>{risk.mitigation ? <LinkedText text={risk.mitigation} /> : 'none'}</td>
|
|
109
|
+
<td>{risk.reviewed}</td>
|
|
110
|
+
</tr>
|
|
111
|
+
))}
|
|
112
|
+
</tbody>
|
|
113
|
+
</table>
|
|
114
|
+
)
|
|
115
|
+
}
|
|
116
|
+
</section>
|
|
117
|
+
|
|
118
|
+
<section>
|
|
119
|
+
<h2>Closed</h2>
|
|
120
|
+
{risks.closed.length === 0 && <p class="plan-empty">No closed risks.</p>}
|
|
121
|
+
{
|
|
122
|
+
risks.closed.length > 0 && (
|
|
123
|
+
<table class="risk-table">
|
|
124
|
+
<thead>
|
|
125
|
+
<tr>
|
|
126
|
+
<th scope="col">RAG</th>
|
|
127
|
+
<th scope="col">Risk</th>
|
|
128
|
+
<th scope="col">Closed</th>
|
|
129
|
+
</tr>
|
|
130
|
+
</thead>
|
|
131
|
+
<tbody>
|
|
132
|
+
{risks.closed.map((risk) => (
|
|
133
|
+
<tr id={risk.id.toLowerCase()}>
|
|
134
|
+
<td>
|
|
135
|
+
<span class={`rag rag--${risk.rag}`}>{risk.rag}</span>
|
|
136
|
+
</td>
|
|
137
|
+
<td>
|
|
138
|
+
<strong><RefLink ref={risk.id} label="id" /></strong> <LinkedText text={risk.title} />
|
|
139
|
+
</td>
|
|
140
|
+
<td>
|
|
141
|
+
<LinkedText text={risk.closed} />
|
|
142
|
+
</td>
|
|
143
|
+
</tr>
|
|
144
|
+
))}
|
|
145
|
+
</tbody>
|
|
146
|
+
</table>
|
|
147
|
+
)
|
|
148
|
+
}
|
|
149
|
+
</section>
|
|
150
|
+
|
|
151
|
+
{
|
|
152
|
+
risks.removed.length > 0 && (
|
|
153
|
+
<section>
|
|
154
|
+
<h2>Removed</h2>
|
|
155
|
+
<ul>
|
|
156
|
+
{risks.removed.map((entry) => (
|
|
157
|
+
<li id={entry.id.toLowerCase()}>
|
|
158
|
+
{entry.date} <strong><RefLink ref={entry.id} label="id" /></strong> <LinkedText text={entry.title} />
|
|
159
|
+
{entry.reason && (
|
|
160
|
+
<>
|
|
161
|
+
. Reason: <LinkedText text={entry.reason} />
|
|
162
|
+
</>
|
|
163
|
+
)}
|
|
164
|
+
</li>
|
|
165
|
+
))}
|
|
166
|
+
</ul>
|
|
167
|
+
</section>
|
|
168
|
+
)
|
|
169
|
+
}
|
|
170
|
+
</StarlightPage>
|
|
171
|
+
|
|
172
|
+
<style>
|
|
173
|
+
.risk-figures {
|
|
174
|
+
display: grid;
|
|
175
|
+
grid-template-columns: repeat(auto-fit, minmax(7rem, 1fr));
|
|
176
|
+
gap: 0.75rem;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
.risk-figures > div {
|
|
180
|
+
padding: 0.75rem 1rem;
|
|
181
|
+
border: 1px solid var(--sl-color-hairline);
|
|
182
|
+
border-left-width: 4px;
|
|
183
|
+
border-radius: 10px;
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
.risk-figures dt {
|
|
187
|
+
color: var(--sl-color-gray-3);
|
|
188
|
+
font-size: var(--sl-text-sm);
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
.risk-figures dd {
|
|
192
|
+
margin: 0;
|
|
193
|
+
font-size: var(--sl-text-2xl);
|
|
194
|
+
font-weight: 700;
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.risk-figure--red {
|
|
198
|
+
border-left-color: #ef4444 !important;
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
.risk-figure--amber {
|
|
202
|
+
border-left-color: #f59e0b !important;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
.risk-figure--green {
|
|
206
|
+
border-left-color: #10b981 !important;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
.risk-matrix {
|
|
210
|
+
display: grid;
|
|
211
|
+
gap: 0.35rem;
|
|
212
|
+
max-width: 36rem;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
.risk-matrix__row {
|
|
216
|
+
display: grid;
|
|
217
|
+
grid-template-columns: 8rem repeat(3, 1fr);
|
|
218
|
+
gap: 0.35rem;
|
|
219
|
+
}
|
|
220
|
+
|
|
221
|
+
.risk-matrix__corner,
|
|
222
|
+
.risk-matrix__axis {
|
|
223
|
+
color: var(--sl-color-gray-3);
|
|
224
|
+
font-size: var(--sl-text-xs);
|
|
225
|
+
text-transform: capitalize;
|
|
226
|
+
align-self: center;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
.risk-matrix__cell {
|
|
230
|
+
display: flex;
|
|
231
|
+
flex-wrap: wrap;
|
|
232
|
+
gap: 0.35rem;
|
|
233
|
+
align-content: center;
|
|
234
|
+
justify-content: center;
|
|
235
|
+
min-height: 3.5rem;
|
|
236
|
+
padding: 0.4rem;
|
|
237
|
+
border-radius: 8px;
|
|
238
|
+
border: 1px solid var(--sl-color-hairline);
|
|
239
|
+
font-size: var(--sl-text-sm);
|
|
240
|
+
font-weight: 600;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.risk-matrix__cell--red {
|
|
244
|
+
background: #ef444426;
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.risk-matrix__cell--amber {
|
|
248
|
+
background: #f59e0b26;
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
.risk-matrix__cell--green {
|
|
252
|
+
background: #10b98126;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.risk-table td:first-child {
|
|
256
|
+
white-space: nowrap;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
.risk-detail {
|
|
260
|
+
color: var(--sl-color-gray-3);
|
|
261
|
+
font-size: var(--sl-text-xs);
|
|
262
|
+
}
|
|
263
|
+
</style>
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
---
|
|
2
|
+
// The roadmap by milestone, in strategy order: what is done, what is in
|
|
3
|
+
// progress, and what is queued, all from planning.json.
|
|
4
|
+
import StarlightPage from '@astrojs/starlight/components/StarlightPage.astro';
|
|
5
|
+
|
|
6
|
+
import ExportStamp from '../../components/ExportStamp.astro';
|
|
7
|
+
import ItemDetail from '../../components/ItemDetail.astro';
|
|
8
|
+
import ItemDialog from '../../components/ItemDialog.astro';
|
|
9
|
+
import LinkedText from '../../components/LinkedText.astro';
|
|
10
|
+
import StatusTimelineFeed from '../../components/lib/StatusTimelineFeed.astro';
|
|
11
|
+
import PlanInteractions from '../../components/PlanInteractions.astro';
|
|
12
|
+
import RefLink from '../../components/RefLink.astro';
|
|
13
|
+
import { loadPlanning, roadmapGroups } from '../../lib/planning';
|
|
14
|
+
import { siteRefs } from '../../lib/references';
|
|
15
|
+
import '../../styles/components.css';
|
|
16
|
+
|
|
17
|
+
const { known } = siteRefs();
|
|
18
|
+
const groups = roadmapGroups(loadPlanning()).map((group) => ({
|
|
19
|
+
...group,
|
|
20
|
+
events: group.events.map((event) => {
|
|
21
|
+
const href = event.id ? known.get(event.id)?.href : null;
|
|
22
|
+
|
|
23
|
+
return href ? { ...event, href, itemId: event.id! } : event;
|
|
24
|
+
}),
|
|
25
|
+
}));
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
<StarlightPage frontmatter={{ title: 'Roadmap', description: 'Milestones in order, with what is done, in progress and queued.', tableOfContents: false }}>
|
|
29
|
+
<ExportStamp />
|
|
30
|
+
|
|
31
|
+
{
|
|
32
|
+
groups.map((group) => (
|
|
33
|
+
<section class="roadmap-group">
|
|
34
|
+
<h2>
|
|
35
|
+
<RefLink ref={group.milestone?.id ?? 'none'} />
|
|
36
|
+
{group.milestone?.isFocus && <span class="roadmap-focus">Focus</span>}
|
|
37
|
+
</h2>
|
|
38
|
+
<p class="roadmap-meta">
|
|
39
|
+
{group.milestone && <strong>{group.milestone.status}</strong>}
|
|
40
|
+
{group.milestone && ' · '}
|
|
41
|
+
{group.progress.done} of {group.progress.total} done
|
|
42
|
+
{group.milestone?.exitCriteria && (
|
|
43
|
+
<>
|
|
44
|
+
{' '}
|
|
45
|
+
— <LinkedText text={group.milestone.exitCriteria} />
|
|
46
|
+
</>
|
|
47
|
+
)}
|
|
48
|
+
</p>
|
|
49
|
+
{group.progress.total > 0 && (
|
|
50
|
+
<progress class="roadmap-progress" max={group.progress.total} value={group.progress.done}>
|
|
51
|
+
{group.progress.done} of {group.progress.total}
|
|
52
|
+
</progress>
|
|
53
|
+
)}
|
|
54
|
+
{group.events.length === 0 ? <p class="plan-empty">No items</p> : <StatusTimelineFeed events={group.events} />}
|
|
55
|
+
{group.events.map((event) => 'itemId' in event && <ItemDetail id={event.itemId} />)}
|
|
56
|
+
</section>
|
|
57
|
+
))
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
<ItemDialog />
|
|
61
|
+
<PlanInteractions />
|
|
62
|
+
</StarlightPage>
|
|
63
|
+
|
|
64
|
+
<style>
|
|
65
|
+
.roadmap-group + .roadmap-group {
|
|
66
|
+
margin-top: 2.5rem;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
.roadmap-focus {
|
|
70
|
+
margin-left: 0.5rem;
|
|
71
|
+
padding: 0.1rem 0.5rem;
|
|
72
|
+
border-radius: 999px;
|
|
73
|
+
background: var(--sl-color-accent-low);
|
|
74
|
+
color: var(--sl-color-accent-high);
|
|
75
|
+
font-size: var(--sl-text-xs);
|
|
76
|
+
vertical-align: middle;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
.roadmap-meta {
|
|
80
|
+
color: var(--sl-color-gray-2);
|
|
81
|
+
font-size: var(--sl-text-sm);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.roadmap-progress {
|
|
85
|
+
width: 100%;
|
|
86
|
+
max-width: 24rem;
|
|
87
|
+
height: 0.5rem;
|
|
88
|
+
accent-color: var(--sl-color-accent);
|
|
89
|
+
}
|
|
90
|
+
</style>
|