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

Project information for directory restructure #1235

Merged
merged 4 commits into from
Jan 22, 2025
Merged
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
7 changes: 7 additions & 0 deletions config/navbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ const navbar = {
label: 'Processes',
docsPluginId: 'general',
},
{
type: 'docSidebar',
position: 'left',
sidebarId: 'projects',
label: 'Projects',
docsPluginId: 'general',
},
{
type: 'docSidebar',
position: 'left',
Expand Down
21 changes: 21 additions & 0 deletions data/projects.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,27 @@
{
"$schema": "../static/schema/projects.json",
"projects": {
"directoryrestructure/index": {
"title": "Directory Restructure",
"status": "In Progress",
"owners": [
{
"name": "Andrew Lyons",
"githubUsername": "andrewnicols"
}
],
"discussionLinks": [],
"issueLinks": [
{
"link": "https://tracker.moodle.org/browse/MDL-83424",
"title": "MDL-83424"
},
{
"link": "https://tracker.moodle.org/browse/IDEA-75",
"title": "Roadmap Proposal"
}
]
},
"docs/migration": {
"title": "Dev Docs Migration",
"status": "In Progress",
Expand Down
331 changes: 331 additions & 0 deletions general/projects/directoryrestructure/index.md

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions project-words.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,9 @@ Josep
JMeter
JWKS
Kanban
Laravel
MAINNODE
MDK
MDL
MDLQA
MDLSITE
Expand All @@ -49,6 +51,7 @@ Moodleisms
Moodlelib
Moodlenet
Moodlers
Moosh
Multilang
MyISAM
MySQLi
Expand All @@ -73,6 +76,7 @@ SIGINT
SIGTERM
Soulier
Stene
Symfony
TCPDF
TODO
ToBic
Expand Down
4 changes: 3 additions & 1 deletion src/components/Project/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ export declare interface Link {
link: string,
}

declare interface IssueLinks extends Array<Link> {}

export declare interface ProjectSummaryData {
projectName: string,
title: string,
owners: Array<PersonProps>,
status: string,
issueLinks?: Array<Link>,
issueLinks?: IssueLinks,
discussionLinks?: Array<Link>,
}

Expand Down
44 changes: 33 additions & 11 deletions src/components/ProjectSummary/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,38 @@ export default function ProjectSummary(props: ProjectSummaryProps): ReactNode {
);
}

function getIssueLinks({ issueLinks }: ProjectSummaryData): ReactNode {
if (issueLinks.length === 1) {
return (
<>
{issueLinks.map(({ link, title }) => (
<div key={title}>
<Link
to={link}
>
{title}
</Link>
</div>
))}
</>
);
}

return (
<ul>
{issueLinks.map(({ link, title }) => (
<li key={title}>
<Link
to={link}
>
{title}
</Link>
</li>
))}
</ul>
);
}

function GetProjectSummary(projectData: ProjectSummaryData): ReactNode {
return (
<div className={styles.projectsummary}>
Expand Down Expand Up @@ -82,17 +114,7 @@ export default function ProjectSummary(props: ProjectSummaryProps): ReactNode {
&& (
<tr>
<th>Issues</th>
<td>
{projectData.issueLinks.map(({ link, title }) => (
<div key={title}>
<Link
to={link}
>
{title}
</Link>
</div>
))}
</td>
<td>{getIssueLinks(projectData)}</td>
</tr>
)}
</tbody>
Expand Down
1 change: 0 additions & 1 deletion src/components/ProjectSummary/styles.module.css
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
.projectsummary {
float: right;
clear: both;
font-family: monospace;
padding-left: 1rem;
}
Loading