Skip to content

Commit 9fd1421

Browse files
authored
Merge pull request #1235 from andrewnicols/directoryRestructure
Project information for directory restructure
2 parents b47967d + 6c23151 commit 9fd1421

File tree

7 files changed

+399
-13
lines changed

7 files changed

+399
-13
lines changed

config/navbar.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,13 @@ const navbar = {
5656
label: 'Processes',
5757
docsPluginId: 'general',
5858
},
59+
{
60+
type: 'docSidebar',
61+
position: 'left',
62+
sidebarId: 'projects',
63+
label: 'Projects',
64+
docsPluginId: 'general',
65+
},
5966
{
6067
type: 'docSidebar',
6168
position: 'left',

data/projects.json

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,27 @@
11
{
22
"$schema": "../static/schema/projects.json",
33
"projects": {
4+
"directoryrestructure/index": {
5+
"title": "Directory Restructure",
6+
"status": "In Progress",
7+
"owners": [
8+
{
9+
"name": "Andrew Lyons",
10+
"githubUsername": "andrewnicols"
11+
}
12+
],
13+
"discussionLinks": [],
14+
"issueLinks": [
15+
{
16+
"link": "https://tracker.moodle.org/browse/MDL-83424",
17+
"title": "MDL-83424"
18+
},
19+
{
20+
"link": "https://tracker.moodle.org/browse/IDEA-75",
21+
"title": "Roadmap Proposal"
22+
}
23+
]
24+
},
425
"docs/migration": {
526
"title": "Dev Docs Migration",
627
"status": "In Progress",

general/projects/directoryrestructure/index.md

Lines changed: 331 additions & 0 deletions
Large diffs are not rendered by default.

project-words.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,9 @@ Josep
3939
JMeter
4040
JWKS
4141
Kanban
42+
Laravel
4243
MAINNODE
44+
MDK
4345
MDL
4446
MDLQA
4547
MDLSITE
@@ -49,6 +51,7 @@ Moodleisms
4951
Moodlelib
5052
Moodlenet
5153
Moodlers
54+
Moosh
5255
Multilang
5356
MyISAM
5457
MySQLi
@@ -73,6 +76,7 @@ SIGINT
7376
SIGTERM
7477
Soulier
7578
Stene
79+
Symfony
7680
TCPDF
7781
TODO
7882
ToBic

src/components/Project/index.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,14 @@ export declare interface Link {
2323
link: string,
2424
}
2525

26+
declare interface IssueLinks extends Array<Link> {}
27+
2628
export declare interface ProjectSummaryData {
2729
projectName: string,
2830
title: string,
2931
owners: Array<PersonProps>,
3032
status: string,
31-
issueLinks?: Array<Link>,
33+
issueLinks?: IssueLinks,
3234
discussionLinks?: Array<Link>,
3335
}
3436

src/components/ProjectSummary/index.tsx

Lines changed: 33 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,38 @@ export default function ProjectSummary(props: ProjectSummaryProps): ReactNode {
4848
);
4949
}
5050

51+
function getIssueLinks({ issueLinks }: ProjectSummaryData): ReactNode {
52+
if (issueLinks.length === 1) {
53+
return (
54+
<>
55+
{issueLinks.map(({ link, title }) => (
56+
<div key={title}>
57+
<Link
58+
to={link}
59+
>
60+
{title}
61+
</Link>
62+
</div>
63+
))}
64+
</>
65+
);
66+
}
67+
68+
return (
69+
<ul>
70+
{issueLinks.map(({ link, title }) => (
71+
<li key={title}>
72+
<Link
73+
to={link}
74+
>
75+
{title}
76+
</Link>
77+
</li>
78+
))}
79+
</ul>
80+
);
81+
}
82+
5183
function GetProjectSummary(projectData: ProjectSummaryData): ReactNode {
5284
return (
5385
<div className={styles.projectsummary}>
@@ -82,17 +114,7 @@ export default function ProjectSummary(props: ProjectSummaryProps): ReactNode {
82114
&& (
83115
<tr>
84116
<th>Issues</th>
85-
<td>
86-
{projectData.issueLinks.map(({ link, title }) => (
87-
<div key={title}>
88-
<Link
89-
to={link}
90-
>
91-
{title}
92-
</Link>
93-
</div>
94-
))}
95-
</td>
117+
<td>{getIssueLinks(projectData)}</td>
96118
</tr>
97119
)}
98120
</tbody>
Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
.projectsummary {
22
float: right;
33
clear: both;
4-
font-family: monospace;
54
padding-left: 1rem;
65
}

0 commit comments

Comments
 (0)