Conversation
✅ Deploy Preview for moodledevdocs ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
There was a problem hiding this comment.
Pull request overview
This PR creates a comprehensive release documentation system for Moodle Workplace, following the established pattern used for LMS and Mobile releases. It includes JSON schema definitions, TypeScript utilities for release management, React components for displaying release information, a CLI tool for managing version data, and a markdown documentation page.
Changes:
- Added JSON schema and data structures for Moodle Workplace version tracking with support for rolling releases
- Created TypeScript utilities and React components to display Workplace release information
- Implemented CLI tool to simplify adding new major/minor Workplace versions
- Created dedicated Workplace releases documentation page with comprehensive release history
Reviewed changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated 12 comments.
Show a summary per file
| File | Description |
|---|---|
| static/schema/wp_versions.json | JSON schema defining the structure for Workplace version data, including rolling release support |
| data/wp_versions.json | Complete version data for all Moodle Workplace releases from 3.7 to 5.1 |
| src/utils/SupportedReleasesWP.ts | TypeScript utility functions for managing and querying Workplace release data |
| src/components/SupportedReleasesWP/index.tsx | React component displaying currently supported Workplace releases in a table |
| src/components/SupportedReleasesWP/styles.module.css | CSS styling for Workplace release components |
| src/components/ReleaseTableWP/index.tsx | React component displaying detailed release information for a specific Workplace version |
| scripts/wp_version.mjs | CLI tool for adding new major/minor versions and managing release data |
| general/wp_releases.md | Documentation page with release cycle information and comprehensive version history |
| sidebars/general.js | Added sidebar entry for Workplace Releases documentation |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| extendedSecurityEndDate?: string, | ||
| isLTS: boolean, | ||
| isRolling: boolean, | ||
| isExperimental: boolean, |
There was a problem hiding this comment.
The TypeScript interface defines isExperimental as a required boolean field, but this property is not present anywhere in the data file. This will cause TypeScript compilation errors or runtime issues. Either add isExperimental: false to all version entries in the data, or make the field optional in the interface by changing isExperimental: boolean, to isExperimental?: boolean,.
| isExperimental: boolean, | |
| isExperimental?: boolean, |
| }, | ||
| { | ||
| "name": "4.1.2", | ||
| "releaseDate": "14 March 2001", |
There was a problem hiding this comment.
The release date "14 March 2001" appears to be incorrect. Based on the surrounding releases (4.1.1 was "17 January 2023" and 4.1.3 was "25 April 2023"), this should be "14 March 2023". The version number 2023011120 also confirms this should be in 2023.
| "releaseDate": "14 March 2001", | |
| "releaseDate": "14 March 2023", |
| ## Moodle workplace 3.8 | ||
| <ReleaseTableWP releaseName="3.8"/> | ||
|
|
||
| <br /> | ||
| ## Moodle workplace 3.7 |
There was a problem hiding this comment.
"workplace" should be capitalized as "Workplace" to be consistent with all other headings in the document.
| ## Moodle workplace 3.8 | |
| <ReleaseTableWP releaseName="3.8"/> | |
| <br /> | |
| ## Moodle workplace 3.7 | |
| ## Moodle Workplace 3.8 | |
| <ReleaseTableWP releaseName="3.8"/> | |
| <br /> | |
| ## Moodle Workplace 3.7 |
| export const getRelease = (versionName: string): versionInfo | null => { | ||
| const [major, release] = versionName.split('.'); | ||
| const majorVersionName = `${major}.${release}`; | ||
| const majorVersion = getAllVersions().find((version) => version.name === majorVersionName); | ||
|
|
||
| if (!majorVersion) { | ||
| return null; | ||
| } | ||
|
|
||
| return majorVersion.releases.find((versionInfo) => versionInfo.name === versionName); | ||
| }; |
There was a problem hiding this comment.
The getRelease function doesn't consider the isRolling property when finding a release. Since the data contains both rolling and non-rolling versions with the same major version name (e.g., "5.1"), this function could return releases from the wrong version type. The function should either accept an isRolling parameter or document that it returns the first match found, which may be ambiguous.
| updateMajorVersionWithData(majorVersionName, thisVersionData, isRollingVersion); | ||
| await persistVersionData(); | ||
|
|
||
| addMinorRelease(!versionList.length, releaseDate, versionList); |
There was a problem hiding this comment.
The recursive call to addMinorRelease is missing the await keyword. Since addMinorRelease is an async function, this call should be awaited to ensure proper execution order and error handling.
| addMinorRelease(!versionList.length, releaseDate, versionList); | |
| await addMinorRelease(!versionList.length, releaseDate, versionList); |
| }, | ||
| { | ||
| "name": "4.1.9", | ||
| "releaseDate": "13 February 2023", |
There was a problem hiding this comment.
The release date "13 February 2023" appears to be incorrect. This release (4.1.9) comes after 4.1.8 which was released on "23 December 2023", so this should be "13 February 2024" instead. The chronological order of releases is inconsistent here.
| "releaseDate": "13 February 2023", | |
| "releaseDate": "13 February 2024", |
| const releaseData = versionData?.releases.find((release) => release.name === releaseName); | ||
| if (!releaseData) { | ||
| // If there is a releaseName for a minor release, but no release data for it, | ||
| // then it has not yet been added and is a future relesae. |
There was a problem hiding this comment.
Typo in comment: "relesae" should be "release".
| // then it has not yet been added and is a future relesae. | |
| // then it has not yet been added and is a future release. |
| ## Moodle workplace 3.8 | ||
| <ReleaseTableWP releaseName="3.8"/> | ||
|
|
||
| <br /> | ||
| ## Moodle workplace 3.7 |
There was a problem hiding this comment.
"workplace" should be capitalized as "Workplace" to be consistent with all other headings in the document.
| ## Moodle workplace 3.8 | |
| <ReleaseTableWP releaseName="3.8"/> | |
| <br /> | |
| ## Moodle workplace 3.7 | |
| ## Moodle Workplace 3.8 | |
| <ReleaseTableWP releaseName="3.8"/> | |
| <br /> | |
| ## Moodle Workplace 3.7 |
| hidden?: boolean, | ||
| codeFreezeDate?: string, | ||
| releaseDate: string, | ||
| improvementsandnewfeaturesEndDate: string, |
There was a problem hiding this comment.
The TypeScript interface defines improvementsandnewfeaturesEndDate as a required string field, but the data contains empty strings for this field (e.g., lines 39, 117, 219). Consider making this field optional in the interface by changing improvementsandnewfeaturesEndDate: string, to improvementsandnewfeaturesEndDate?: string, or ensuring all non-rolling versions have a meaningful value instead of empty strings.
| improvementsandnewfeaturesEndDate: string, | |
| improvementsandnewfeaturesEndDate?: string, |
|
|
||
| versionData.versions.unshift(schema); | ||
|
|
||
| addReleaseMarkdown(name, isRolling, isLTS); |
There was a problem hiding this comment.
The call to addReleaseMarkdown is missing the await keyword. Since addReleaseMarkdown is an async function that performs file I/O, this call should be awaited to ensure the markdown file is updated before proceeding.
| addReleaseMarkdown(name, isRolling, isLTS); | |
| await addReleaseMarkdown(name, isRolling, isLTS); |
Create a dedicated release documentation page for Moodle Workplace (similar to LMS and Mobile) based on https://docs.moodle.org/dev/Moodle_Workplace_releases, and provide a CLI tool to simplify adding new major or minor Workplace versions, including its specific requirements (rolling versions).