Skip to content

Commit af58781

Browse files
authored
Merge pull request #1538 from andrewnicols/workplaceShuffle
Workplace shuffle
2 parents 330594e + 178b67c commit af58781

12 files changed

Lines changed: 68 additions & 42 deletions

File tree

CODEOWNERS

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
# Design System
2626
/general/designsystem/ @moodle/design-system
2727

28+
# Workplace team have complete autonomy over Workplace content.
29+
/data/workplace/ @moodle/workplace
30+
/general/workplace/ @moodle/workplace
31+
/scripts/wp_version.mjs @moodle/workplace
32+
/src/components/workplace/ @moodle/workplace
33+
/src/utils/workplace/ @moodle/workplace
34+
/static/schema/workplace/ @moodle/workplace
35+
2836
# Content Guideline Owners
2937
/general/contentguidelines/ @moodle/content-authors
3038

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"$schema": "../static/schema/wp_versions.json",
2+
"$schema": "../static/schema/workplace/versions.json",
33
"versions": [
44
{
55
"name": "5.1",

general/_wp_releases/1680px-workplace_releases_timeline.png renamed to general/workplace/releases/_index/1680px-workplace_releases_timeline.png

File renamed without changes.
Lines changed: 28 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ tags:
77

88
<!-- markdownlint-disable no-inline-html -->
99

10-
import SupportedReleasesWP, { styles as ReleaseStylesWP } from '@site/src/components/SupportedReleasesWP';
11-
import ReleaseTableWP from '@site/src/components/ReleaseTableWP';
10+
import { ReleaseTable, SupportedReleases, SupportedReleasesStyles } from '@site/src/components/Workplace';
1211

1312
This page lists all official releases of Moodle Workplace, grouped by branch in reverse chronological order.
1413

@@ -24,7 +23,7 @@ These are the target dates for releases. These dates may vary slightly due to un
2423
<th colSpan="2" scope="col">
2524
Release
2625
</th>
27-
<th colSpan="2" scope="col" className={ReleaseStylesWP['moodle-workplace-release']}>
26+
<th colSpan="2" scope="col" className={SupportedReleasesStyles['moodle-workplace-release']}>
2827
Moodle Workplace
2928
</th>
3029
<th colSpan="2" scope="col">
@@ -34,23 +33,23 @@ These are the target dates for releases. These dates may vary slightly due to un
3433
<tr>
3534
<th scope="col"> Release type </th>
3635
<th scope="col"> Frequency </th>
37-
<th scope="col" className={ReleaseStylesWP['moodle-workplace-release']}> Release </th>
38-
<th scope="col" className={ReleaseStylesWP['moodle-workplace-release']}> Includes </th>
36+
<th scope="col" className={SupportedReleasesStyles['moodle-workplace-release']}> Release </th>
37+
<th scope="col" className={SupportedReleasesStyles['moodle-workplace-release']}> Includes </th>
3938
<th scope="col"> Release </th>
4039
<th scope="col"> Includes</th>
4140
</tr>
4241
</thead>
4342
<tbody>
4443
<tr>
45-
<td>[Major](./development/process.md#major-release-cycles) (eg. 3.x)</td>
44+
<td>[Major](../../development/process.md#major-release-cycles) (eg. 3.x)</td>
4645
<td>6 monthly</td>
4746
<td>3-4 weeks after Moodle LMS major</td>
4847
<td>New features, improvements and bug fixes (Moodle LMS and Workplace)</td>
4948
<td>April and October</td>
5049
<td>New features, Improvements and fixes</td>
5150
</tr>
5251
<tr>
53-
<td>[Minor](./development/process.md#stable-maintenance-cycles) (Point) (eg. 3.x.y)</td>
52+
<td>[Minor](../../development/process.md#stable-maintenance-cycles) (Point) (eg. 3.x.y)</td>
5453
<td>2 monthly</td>
5554
<td>1 day after Moodle LMS minor</td>
5655
<td>Workplace new features, improvements and bug fixes and Moodle LMS fixes</td>
@@ -65,89 +64,89 @@ Starting from 4.1 release, we package two Workplace versions in every release:
6564
- **Standard version**: no new features in minor releases, this version is supported for bug fixes and security fixes while the corresponding version of LMS is supported
6665
- **Rolling version**: features are added continuously up until the new major release of LMS, after that it has bug fixes for four more months and then support stops completely (which is approximately 3 months after the next Workplace major release).
6766

68-
![Release graph summarising the currently supported Workplace releases in a visual form](_wp_releases/1680px-workplace_releases_timeline.png)
67+
![Release graph summarising the currently supported Workplace releases in a visual form](_index/1680px-workplace_releases_timeline.png)
6968

7069
### End-of-life dates for currently supported releases
7170

72-
<SupportedReleasesWP />
71+
<SupportedReleases />
7372

7473
<!-- START RELEASES -->
7574
<br />
7675
## Moodle Workplace 5.1 Rolling
77-
<ReleaseTableWP releaseName="5.1" isRolling/>
76+
<ReleaseTable releaseName="5.1" isRolling/>
7877

7978
<br />
8079
## Moodle Workplace 5.1
81-
<ReleaseTableWP releaseName="5.1" />
80+
<ReleaseTable releaseName="5.1" />
8281

8382
<br />
8483
## Moodle Workplace 5.0 Rolling
85-
<ReleaseTableWP releaseName="5.0" isRolling/>
84+
<ReleaseTable releaseName="5.0" isRolling/>
8685

8786
<br />
8887
## Moodle Workplace 5.0
89-
<ReleaseTableWP releaseName="5.0" />
88+
<ReleaseTable releaseName="5.0" />
9089

9190
<br />
9291
## Moodle Workplace 4.5 Rolling
93-
<ReleaseTableWP releaseName="4.5" isRolling/>
92+
<ReleaseTable releaseName="4.5" isRolling/>
9493

9594
<br />
9695
## Moodle Workplace 4.5 (LTS)
97-
<ReleaseTableWP releaseName="4.5" />
96+
<ReleaseTable releaseName="4.5" />
9897

9998
<br />
10099
## Moodle Workplace 4.4 Rolling
101-
<ReleaseTableWP releaseName="4.4" isRolling/>
100+
<ReleaseTable releaseName="4.4" isRolling/>
102101

103102
<br />
104103
## Moodle Workplace 4.4
105-
<ReleaseTableWP releaseName="4.4" />
104+
<ReleaseTable releaseName="4.4" />
106105

107106
<br />
108107
## Moodle Workplace 4.3 Rolling
109-
<ReleaseTableWP releaseName="4.3" isRolling/>
108+
<ReleaseTable releaseName="4.3" isRolling/>
110109

111110
<br />
112111
## Moodle Workplace 4.3
113-
<ReleaseTableWP releaseName="4.3" />
112+
<ReleaseTable releaseName="4.3" />
114113

115114
<br />
116115
## Moodle Workplace 4.2 Rolling
117-
<ReleaseTableWP releaseName="4.2" isRolling/>
116+
<ReleaseTable releaseName="4.2" isRolling/>
118117

119118
<br />
120119
## Moodle Workplace 4.2
121-
<ReleaseTableWP releaseName="4.2"/>
120+
<ReleaseTable releaseName="4.2"/>
122121

123122
<br />
124123
## Moodle Workplace 4.1 Rolling
125-
<ReleaseTableWP releaseName="4.1" isRolling/>
124+
<ReleaseTable releaseName="4.1" isRolling/>
126125

127126
<br />
128127
## Moodle Workplace 4.1 (LTS)
129-
<ReleaseTableWP releaseName="4.1"/>
128+
<ReleaseTable releaseName="4.1"/>
130129

131130
<br />
132131
## Moodle Workplace 4.0
133-
<ReleaseTableWP releaseName="4.0"/>
132+
<ReleaseTable releaseName="4.0"/>
134133

135134
<br />
136135
## Moodle Workplace 3.11
137-
<ReleaseTableWP releaseName="3.11"/>
136+
<ReleaseTable releaseName="3.11"/>
138137

139138
<br />
140139
## Moodle Workplace 3.10
141-
<ReleaseTableWP releaseName="3.10"/>
140+
<ReleaseTable releaseName="3.10"/>
142141

143142
<br />
144143
## Moodle Workplace 3.9
145-
<ReleaseTableWP releaseName="3.9"/>
144+
<ReleaseTable releaseName="3.9"/>
146145

147146
<br />
148147
## Moodle Workplace 3.8
149-
<ReleaseTableWP releaseName="3.8"/>
148+
<ReleaseTable releaseName="3.8"/>
150149

151150
<br />
152151
## Moodle Workplace 3.7
153-
<ReleaseTableWP releaseName="3.7"/>
152+
<ReleaseTable releaseName="3.7"/>

scripts/wp_version.mjs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import { program } from 'commander';
2222
import { readFile, writeFile } from 'fs/promises';
2323
import inquirer from 'inquirer';
2424

25-
const versionData = JSON.parse(await readFile('./data/wp_versions.json'));
25+
const versionData = JSON.parse(await readFile('./data/workplace/versions.json'));
2626

2727
const getMajorVersionFromData = (majorVersion, isRollingVersion) => versionData.versions.find(
2828
(version) => version.name === majorVersion && version.isRolling === isRollingVersion,
@@ -43,7 +43,7 @@ const updateMinorVersionWithData = (majorVersion, minorVersion, data) => {
4343
};
4444

4545
const persistVersionData = async () => {
46-
await writeFile('./data/wp_versions.json', JSON.stringify(versionData, null, 4));
46+
await writeFile('./data/workplace/versions.json', JSON.stringify(versionData, null, 4));
4747
};
4848

4949
const getFormatter = (options = {}) => new Intl.DateTimeFormat('en-AU', {
@@ -410,13 +410,13 @@ const addReleaseMarkdown = async (name, isRolling, isLTS) => {
410410
releaseName = `${releaseName} Rolling`;
411411
isRollingRelease = 'isRolling';
412412
}
413-
const content = await readFile('./general/wp_releases.md', 'utf8');
413+
const content = await readFile('./general/workplace/releases/index.md', 'utf8');
414414
const pointer = '<!-- START RELEASES -->';
415415
const newRelease = content.replace(
416416
pointer,
417-
`${pointer}\n<br />\n## ${releaseName}\n<ReleaseTableWP releaseName="${name}" ${isRollingRelease}/>\n`,
417+
`${pointer}\n<br />\n## ${releaseName}\n<ReleaseTable releaseName="${name}" ${isRollingRelease}/>\n`,
418418
);
419-
await writeFile('./general/wp_releases.md', newRelease, 'utf8');
419+
await writeFile('./general/workplace/releases/index.md', newRelease, 'utf8');
420420
};
421421

422422
const addMajorRelease = async (

sidebars/general.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,7 @@ const sidebars = {
201201
},
202202
{
203203
type: 'doc',
204-
id: 'wp_releases',
204+
id: 'workplace/releases/index',
205205
label: 'Moodle Workplace Releases',
206206
},
207207
],

src/components/ReleaseTableWP/index.tsx renamed to src/components/Workplace/ReleaseTable/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import React from 'react';
1919
import { MDXProvider } from '@mdx-js/react';
2020
import {
2121
getVersion, getVersionTitle, type versionInfo, getReleaseStatus,
22-
} from '@site/src/utils/SupportedReleasesWP';
22+
} from '@site/src/utils/Workplace/SupportedReleases';
2323
import Link from '@docusaurus/Link';
2424
import Admonition from '@theme/Admonition';
2525

@@ -54,7 +54,7 @@ const releaseNoteLink = (
5454
return <Link to={linkTo}>{label}</Link>;
5555
};
5656

57-
export default function ReleaseTableWP({ releaseName, isRolling = false }: ReleaseTableProps): JSX.Element {
57+
export default function ReleaseTable({ releaseName, isRolling = false }: ReleaseTableProps): JSX.Element {
5858
const rows = getVersion(releaseName, isRolling);
5959
const impAndNewFeatEndDate = isRolling ? rows.improvementsandnewfeaturesEndDate : rows.generalEndDate;
6060

src/components/SupportedReleasesWP/index.tsx renamed to src/components/Workplace/SupportedReleases/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ import {
2525
getLatestRelease,
2626
getReleaseStatusLabel,
2727
getVersionLabel,
28-
} from '@site/src/utils/SupportedReleasesWP';
28+
} from '@site/src/utils/Workplace/SupportedReleases';
2929

3030
export {
3131
styles,
3232
};
3333

34-
export default function SupportedReleasesWP(): JSX.Element {
34+
export default function SupportedReleases(): JSX.Element {
3535
const rows = getSupportedReleases()
3636
.filter((versionData: majorVersionData) => versionData.hidden !== true)
3737
.map((versionData: majorVersionData) => {

src/components/SupportedReleasesWP/styles.module.css renamed to src/components/Workplace/SupportedReleases/styles.module.css

File renamed without changes.

src/components/Workplace/index.tsx

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
/**
2+
* Copyright (c) Moodle Pty Ltd.
3+
*
4+
* Moodle is free software: you can redistribute it and/or modify
5+
* it under the terms of the GNU General Public License as published by
6+
* the Free Software Foundation, either version 3 of the License, or
7+
* (at your option) any later version.
8+
*
9+
* Moodle is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with Moodle. If not, see <http://www.gnu.org/licenses/>.
16+
*/
17+
18+
export { default as ReleaseTable } from './ReleaseTable';
19+
export { default as SupportedReleases, styles as SupportedReleasesStyles } from './SupportedReleases';

0 commit comments

Comments
 (0)