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

WIP Release notes 2 #8833

Closed
wants to merge 67 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
67 commits
Select commit Hold shift + click to select a range
b01cf28
a release note about release notes
stevector Dec 14, 2023
b913994
a release note about release notes
stevector Dec 14, 2023
441a713
adding another sample
stevector Dec 14, 2023
aecdfff
rename dir
stevector Dec 14, 2023
9744350
trying to get release notes pages generating
stevector Dec 14, 2023
bb2f193
starting to get release notes loading
stevector Dec 14, 2023
1225a00
releaseNotesListing
stevector Dec 14, 2023
1f7f50d
bring back deleted stuff
stevector Dec 14, 2023
ef9e33b
more progress on release notes
stevector Dec 14, 2023
b382559
adding a note
stevector Dec 14, 2023
8a4d7e0
updates
stevector Dec 14, 2023
1c64f89
release notes
stevector Dec 14, 2023
a86b85e
getting categories partially working
stevector Dec 14, 2023
1920864
starting on a separate category component
stevector Dec 14, 2023
7822081
more release notes cleanup
stevector Dec 14, 2023
8d284e5
listing all
stevector Dec 14, 2023
b2319aa
category listing
stevector Dec 15, 2023
3e0d46c
moar templating
stevector Dec 15, 2023
016065f
getting tests passing
stevector Dec 18, 2023
7e7e457
adding playwright examples
stevector Dec 18, 2023
3c1ea9e
Add first pass at script to auto create releasenotes based on past ch…
rachelwhitton Dec 21, 2023
c7c3972
Merge branch 'release-notes' of github.com:pantheon-systems/documenta…
stevector Dec 21, 2023
08ad240
Backfill changelog entries as release notes Sep - Dec 2023
rachelwhitton Dec 22, 2023
73ba9b3
Revert "adding playwright examples"
stevector Jan 2, 2024
189d54d
some cleanup
stevector Jan 2, 2024
87fe8f0
react refactoring
stevector Jan 2, 2024
ec6291d
more cleanup
stevector Jan 2, 2024
923eaf8
react cleanup
stevector Jan 2, 2024
1b70163
refactor
stevector Jan 2, 2024
f4460a0
release notes cat handling
stevector Jan 2, 2024
b77039e
using color
stevector Jan 2, 2024
324f6e6
moving around code block
stevector Jan 2, 2024
eef1741
whitespace
stevector Jan 2, 2024
c825dae
more clean up
stevector Jan 3, 2024
031bfd2
date component
stevector Jan 3, 2024
37248a8
release notes are kind of working
stevector Jan 3, 2024
4bce369
a sort of working fragment
stevector Jan 3, 2024
ed01dc7
fragment cleanup
stevector Jan 3, 2024
e3b73f1
trying to make fragment a fragment in a different file
stevector Jan 3, 2024
983b619
moving fragment to other file
stevector Jan 3, 2024
5315280
breakthrough
stevector Jan 3, 2024
a3e91c6
fragment again
stevector Jan 3, 2024
8a84152
Define attributes for all 'Release Notes' categories in JSON
rachelwhitton Jan 4, 2024
95d9dd5
adding todo about description
stevector Jan 4, 2024
dfc995c
merging release notes
stevector Jan 4, 2024
5f4a60d
fixing merge error
stevector Jan 4, 2024
6c646d2
starting category selector component
stevector Jan 4, 2024
48f6b30
menu
stevector Jan 4, 2024
1cbc0d5
switching to NavMenu
stevector Jan 4, 2024
fe33cd4
two ways to do category selection
stevector Jan 4, 2024
1d57add
some whitespace cleanup
stevector Jan 4, 2024
dbc0047
more category cleanup
stevector Jan 4, 2024
2e3e294
pure json
stevector Jan 4, 2024
c82e6b3
adding json
stevector Jan 4, 2024
64b65db
sourcing json
stevector Jan 4, 2024
cb6729d
updating selector to use json object
stevector Jan 4, 2024
0ffa01a
working
stevector Jan 5, 2024
ad4644a
simplify categories
stevector Jan 5, 2024
c65455e
loader
stevector Jan 5, 2024
91fbf5f
render categories as tags
stevector Jan 5, 2024
632cfa8
selecto separator
stevector Jan 5, 2024
7bc0a6d
Merge remote-tracking branch 'origin/main' into release-notes
stevector Jan 5, 2024
560957c
trying navigate()
stevector Jan 5, 2024
0055025
trying different callback construction
stevector Jan 5, 2024
f1af2a8
Update package-lock.json
mel-miller Jan 18, 2024
a84a964
Merge branch 'main' into release-notes-2
mel-miller Jan 18, 2024
5d4d34f
update PDS version, testing
mel-miller Jan 18, 2024
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
15 changes: 15 additions & 0 deletions gatsby-config.js
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,13 @@ module.exports = {
name: `data`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/source/releasenotescategories`,
name: `releasenotescategories`,
},
},
{
// Converts Markdown into HTML
resolve: `gatsby-transformer-remark`, // https://www.gatsbyjs.com/plugins/gatsby-transformer-remark/
Expand Down Expand Up @@ -97,6 +104,14 @@ module.exports = {
name: `changelogs`,
},
},

{
resolve: `gatsby-source-filesystem`,
options: {
path: `${__dirname}/source/releasenotes`,
name: `releasenotes`,
},
},
{
resolve: `gatsby-source-filesystem`,
options: {
Expand Down
158 changes: 138 additions & 20 deletions gatsby-node.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ The contents of this file define how the source content is converted
into web pages. It is prime for refactoring.
*/


/** This helper function determines what slug a piece of content will use */
const calculateSlug = (node, getNode) => {
const fileName = getNode(node.parent).name // Sets the filename from GraphQL
Expand All @@ -31,6 +30,14 @@ const calculateSlug = (node, getNode) => {
const split = fileName.split('-'); // split the file name where hyphenated...
return `changelog/${split[0]}/${split[1]}` // and return a slug of changelog/YYYY/MM
}
// This section creates the releasenotes slug based on the YYYY-MM-DD-slug.md template
if (getNode(node.parent).absolutePath.includes("releasenotes")) { // If the file is in the releasenotes directory...
// split the file name where hyphenated.
const split = fileName.split('-');
// set a const to remaining slug based on the keys from split that are not the date.
const remainingSlug = split.slice(3).join('-');
return `release-notes/${split[0]}/${split[1]}/${remainingSlug}` // and return a slug of releasenotes/YYYY/MM/slug
}

return `${fileName}` // Otherwise, as long as there is a filename in GraphQL, use it as the slug.
}
Expand Down Expand Up @@ -127,7 +134,7 @@ exports.createPages = ({ graphql, actions }) => {
{
allDocs: allMdx(
filter: {
fileAbsolutePath: { regex: "/content(?!/(partials|changelog|guides)/)/"}
fileAbsolutePath: { regex: "/content(?!/(partials|changelog|guides|releasenotes)/)/"}
frontmatter: {
draft: {ne: true}
}
Expand Down Expand Up @@ -184,6 +191,41 @@ exports.createPages = ({ graphql, actions }) => {
}
}

allReleaseNotes: allMdx(
filter: {
fileAbsolutePath: { regex: "/releasenotes/"}
},
sort: { fields: [fileAbsolutePath], order: DESC }
) {
edges {

previous {
fields {
slug
}
}

node {
id
frontmatter {
title,
categories,
published_date
}
fields {
slug
}
}

next {
fields {
slug
}
}

}
}

allChangelogs: allMdx(
filter: {
fileAbsolutePath: { regex: "/changelogs/"}
Expand Down Expand Up @@ -234,7 +276,6 @@ exports.createPages = ({ graphql, actions }) => {
}
}
}

dataJson {
commands {
description
Expand All @@ -243,7 +284,11 @@ exports.createPages = ({ graphql, actions }) => {
usage
}
}

releasenotescategoriesJson {
categories {
slug
}
}
}
`).then(result => {
if (result.errors) {
Expand Down Expand Up @@ -309,21 +354,6 @@ exports.createPages = ({ graphql, actions }) => {
})
})

// Create Terminus Command pages
const terminusCommands = result.data.dataJson.commands
terminusCommands.forEach(command => {
const slugRegExp = /:/g
const slug = command.name.replace(slugRegExp, "-")
createPage({
path: `terminus/commands/${slug}`,
component: path.resolve(`./src/templates/terminusCommand.js`),
context: {
slug: slug,
name: command.name
}
})
})

// Create changelog pagination.
const postsPerPage = 6
const numPages = Math.ceil(changelogs.length / postsPerPage)
Expand All @@ -345,6 +375,90 @@ exports.createPages = ({ graphql, actions }) => {
})
})

// Create Terminus Command pages
const terminusCommands = result.data.dataJson.commands
terminusCommands.forEach(command => {
const slugRegExp = /:/g
const slug = command.name.replace(slugRegExp, "-")
createPage({
path: `terminus/commands/${slug}`,
component: path.resolve(`./src/templates/terminusCommand.js`),
context: {
slug: slug,
name: command.name
}
})
})

// Create release notes without pagination. At a later date, we may want to add pagination.
// And can reused the code above.
createPage({
path: `/release-notes/`,
component: path.resolve("./src/templates/releaseNotesListing.js"),
})
// @todo, switch to "../data/releaseNoteCategories.js"
const allowedReleaseNoteCategories = {
"security": {
"Display Name": "Security",
"color": "red"
},
"documentation": {
"Display Name": "Documentation",
"color": "purple"
},
};

// Loop through all allowed categories and create a page for each one.
Object.keys(allowedReleaseNoteCategories).forEach((category) => {
createPage({
path: `/release-notez/${category}`,
component: path.resolve("./src/templates/releaseNotesListingByCategory.js"),
context: {
category: category,
},
})
})


// // Create Terminus Command pages
const allReleaseNoteCategories = result.data.releasenotescategoriesJson.categories
console.log(allReleaseNoteCategories)
allReleaseNoteCategories.forEach(category => {
createPage({
path: `/release-notes/${category.slug}`,
component: path.resolve("./src/templates/releaseNotesListingByCategory.js"),
context: {
category: category.slug,
},
})
})

// terminusCommands.forEach(command => {
// const slugRegExp = /:/g
// const slug = command.name.replace(slugRegExp, "-")
// createPage({
// path: `terminus/commands/${slug}`,
// component: path.resolve(`./src/templates/terminusCommand.js`),
// context: {
// slug: slug,
// name: command.name
// }
// })
// })

// Create each release note page.
const releaseNotes = result.data.allReleaseNotes.edges;
releaseNotes.forEach(releaseNote => {
const template = calculateTemplate(releaseNote.node, "releaseNotePage");
createPage({
path: releaseNote.node.fields.slug,
component: path.resolve(`./src/templates/${template}.js`),
context: {
slug: releaseNote.node.fields.slug,
},
})
})

// Create contributor pages.
const contributors = result.data.allContributorYaml.edges
contributors.forEach(contributor => {
Expand Down Expand Up @@ -433,7 +547,7 @@ exports.onCreateNode = ({ node, getNode, actions }) => {
}
}

if (sourceInstanceName === 'changelogs') {
if (sourceInstanceName === 'changelogs' || sourceInstanceName === 'releasenotes') {
const content = matter(node.internal.content, { excerpt: true, excerpt_separator: '<!-- excerpt -->' } );
const excerpt = content.excerpt || "";

Expand Down Expand Up @@ -507,3 +621,7 @@ exports.onPreBootstrap = () => {

fs.copySync(scriptsCopyFrom, scriptsCopyTo)
}


/* todo should there be an error thrown if a release note category is set that is not allowed */
/* todo, infer published date from file name. And throw an error if there are files that don't follow the pattern. */
17 changes: 10 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": {
"@mdx-js/mdx": "^1.6.22",
"@mdx-js/react": "^1.6.22",
"@pantheon-systems/pds-toolkit-react": "^1.0.0-dev.44",
"@pantheon-systems/pds-toolkit-react": "^1.0.0-dev.69",
"algoliasearch": "^4.14.3",
"babel-plugin-remove-graphql-queries": "^4.25.0",
"bootstrap": "^3.4.1",
Expand Down
3 changes: 2 additions & 1 deletion source/data/commands.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"name": "Terminus",
"version": "3.3.0"
},

"commands": [
{
"name": "aliases",
Expand Down Expand Up @@ -16690,4 +16691,4 @@
]
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "Pantheon Advanced Page Cache WordPress Plugin Updates"
published_date: "2023-08-08"
---


We released an update for the [Pantheon Advanced Page Cache](https://wordpress.org/plugins/pantheon-advanced-page-cache/) WordPress plugin which adds a filter to allow disabling surrogate keys for posts' taxonomy terms. This can be especially helpful for posts with large numbers of taxonomies (such as WooCommerce products with a large number of global attributes).

For more information, see [Pantheon documentation](/guides/wordpress-configurations/plugins#disable-surrogate-keys-for-taxonomy-terms).
9 changes: 9 additions & 0 deletions source/releasenotes/2023-08-18-php-security-updates.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
---
title: "PHP Security Updates"
published_date: "2023-08-18"
---


Pantheon has deployed PHP versions [8.2.9](https://www.php.net/ChangeLog-8.php#8.2.9), [8.1.22](https://www.php.net/ChangeLog-8.php#8.1.22), and [8.0.30](https://www.php.net/ChangeLog-8.php#8.0.30) to customer sites running on the platform. These releases address vulnerabilities disclosed in [CVE-2023-3823](https://nvd.nist.gov/vuln/detail/CVE-2023-3823) and [CVE-2023-3824](https://nvd.nist.gov/vuln/detail/CVE-2023-3824).

If you are using PHP 8.2, 8.1 or 8.0, there is nothing further that you need to do. If you are still on PHP 7.4 or earlier, though, you should schedule some time to upgrade to a supported version.While the vulnerabilities patched in these latest releases are not reported to affect PHP 7.4, the fact remains that there could be (and probably are) unpatched vulnerabilities in the end-of-life versions. Read more about it in Greg Anderson’s [blog post](https://pantheon.io/blog/php-829-security-release-demonstrates-pantheons-commitment-protecting-your-sites).
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Early Access: Customer Scheduled Jobs"
published_date: "2023-09-01"
categories: [new-feature, tools-apis]
---
[The Terminus Scheduled Jobs Plugin](/customer-scheduled-cron-jobs) allows you to schedule and automate specific cron jobs according to site requirements without affecting performance.

You can specify the desired frequency (e.g., daily, weekly, monthly, hourly), and the actions to be performed. The system then executes the scheduled jobs automatically based on the provided instructions. Helps with long running jobs by granting a total budget of 300 mins (in a 24 hr period) to run jobs.
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: "Early Access: Streamlined User Offboarding"
published_date: "2023-09-01"
categories: [account-management, user-interface]
---
Helps Workspace Admins more effectively manage user access by providing the ability to offboard users from multiple sites in a single click.

For more information, see Pantheon’s documentation on [Workspace Offboarding](/workspace-offboarding). Or join the [#WordPress Slack Channel](http://slackin.pantheon.io) to connect with other Pantheon customers & super-users.
17 changes: 17 additions & 0 deletions source/releasenotes/2023-09-01-front-end-sites-enhancements.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
title: "Front-End Sites Enhancements"
published_date: "2023-09-01"
categories: [front-end-sites, user-interface]
---
We released version 1.0.5 of the [WP Decoupled Preview plugin](https://wordpress.org/plugins/decoupled-preview/) which contains a bug fix specific to WordPress 6.3. WP Decoupled Preview enables content editors to see their changes in the context of a front-end framework (served through [Pantheon's Front-End Sites](/guides/decoupled/overview)) like Next.js. To try this functionality, request access to Front-End Sites and [follow our tutorial for spinning up our WordPress + Next.js starter](/guides/decoupled/wp-nextjs-frontend-starters).

Can you tell we want more teams to sign up for Front-End Sites? If you don't yet have access, as of the last month you'll now see callouts in the site creation flow that lead to Front-End Sites Access:

![Sign up page in the Pantheon dashboard for decoupled Early Access](../images/decoupled/ea-decoupled-signup.png)

Thanks to efforts in the last month, once you spin up new codebases in Front-End Sites, you will also find:
- Newly improved readme files in your fresh projects.
- Health checks that fire early in the build process if your Front-End Site may be likely to fail due to missing variables for a back-end CMS
- A better navigation and search functionality for [the Decoupled Kit project documentation](https://decoupledkit.pantheon.io/docs).

Want to chat more about these kinds of sites? Join the [#front-end-frameworks](https://pantheon-community.slack.com/archives/C01DXGMFZFB) Slack Channel.
8 changes: 8 additions & 0 deletions source/releasenotes/2023-09-01-new-php-defaults.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: New PHP Defaults
published_date: "2023-09-01"
categories: [infrastructure, wordpress, drupal, action-required]
---
Pantheon has pushed an update to WordPress and Drupal 7 core upstreams which sets PHP 8.1 as the new default PHP version, rather than 7.4.

Please test this core update thoroughly before deploying to the Live environment. If your site requires an older version of PHP, or if you'd like to upgrade to PHP 8.2, see [Pantheon’s documentation on how to manage PHP versions via the pantheon.yml configuration file](/guides/php/php-versions).
8 changes: 8 additions & 0 deletions source/releasenotes/2023-09-01-object-cache-pro.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
title: Object Cache Pro
published_date: "2023-09-01"
categories: [wordpress, action-required, performance, new-feature]
---
WordPress sites can now leverage an upgraded object caching solution on Pantheon! Object Cache Pro is a highly optimized premium WordPress plugin that integrates with Redis for business class performance. [Find out more about our perspective Object Caching from Steve Persch, Director of Developer Experience](https://pantheon.io/blog/pantheon-includes-object-cache-pro-painless-improved-performance).

See Pantheon’s documentation for instructions on [how to enable Object Cache Pro](/object-cache/wordpress). Or join the [#WordPress Slack Channel](http://slackin.pantheon.io) to connect with other customers using Object Cache Pro.
Loading
Loading