Skip to content

Commit 410f6f9

Browse files
authored
Merge pull request #887 from Automattic/release/0.10.3
2 parents 0492e90 + cddcb5a commit 410f6f9

File tree

17 files changed

+758
-173
lines changed

17 files changed

+758
-173
lines changed

.claude/CLAUDE.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Edit Flow
2+
3+
Editorial workflow plugin with custom statuses, editorial comments, and notifications.
4+
5+
## Plugin Details
6+
7+
| Property | Value |
8+
|----------|-------|
9+
| **Main file** | `edit_flow.php` |
10+
| **Text domain** | `edit-flow` |
11+
| **Function prefix** | `ef_` |
12+
| **Namespace** | Global (legacy) |
13+
| **Source directory** | `modules/` |
14+
| **Version** | 0.10.3 |
15+
16+
## Architecture
17+
18+
- Modular architecture in `modules/` directory
19+
- Each feature is a separate module
20+
- Main class: `edit_flow` (note underscore in filename)
21+
22+
## Testing
23+
24+
```bash
25+
composer test:unit # Unit tests
26+
composer test:integration # Integration tests
27+
npm run test-e2e # Playwright E2E tests
28+
```
29+
30+
## Notes
31+
32+
- Tier 1 plugin (well-maintained)
33+
- WordPress.org hosted
34+
- Has E2E tests with Playwright
35+
36+
## Standards
37+
38+
Follow the standards documented in `~/code/plugin-standards/`.
Lines changed: 34 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,36 @@
1-
name: E2E and JS tests
1+
name: E2E Tests
22

33
on:
4-
pull_request:
54
push:
6-
branches-ignore:
7-
- develop
8-
- main
5+
paths:
6+
- '**.js'
7+
- '**.jsx'
8+
- '**.ts'
9+
- '**.tsx'
10+
- '**.scss'
11+
- '**.css'
12+
- 'package.json'
13+
- 'package-lock.json'
14+
- 'webpack.config.js'
15+
- '.wp-env.json'
16+
- 'tests/e2e/**'
17+
- '.github/workflows/e2e-tests.yml'
18+
pull_request:
19+
branches: [develop, main]
20+
paths:
21+
- '**.js'
22+
- '**.jsx'
23+
- '**.ts'
24+
- '**.tsx'
25+
- '**.scss'
26+
- '**.css'
27+
- 'package.json'
28+
- 'package-lock.json'
29+
- 'webpack.config.js'
30+
- '.wp-env.json'
31+
- 'tests/e2e/**'
32+
- '.github/workflows/e2e-tests.yml'
33+
workflow_dispatch:
934

1035
# Disable all permissions by default; grant minimal permissions per job
1136
permissions: {}
@@ -16,7 +41,7 @@ concurrency:
1641

1742
jobs:
1843
build:
19-
name: Build and Lint
44+
name: Build
2045
runs-on: ubuntu-latest
2146
permissions:
2247
contents: read
@@ -60,9 +85,6 @@ jobs:
6085
echo "| custom-status-block.js | $(du -h build/custom-status-block.js | cut -f1) |" >> $GITHUB_STEP_SUMMARY
6186
echo "| calendar-react.js | $(du -h build/calendar-react.js | cut -f1) |" >> $GITHUB_STEP_SUMMARY
6287
63-
- name: Run Lint JS
64-
run: npm run lint-js
65-
6688
- name: Upload build artifacts
6789
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
6890
with:
@@ -71,7 +93,7 @@ jobs:
7193
retention-days: 1
7294

7395
test:
74-
name: E2E and Jest tests
96+
name: E2E Tests
7597
# Pin to ubuntu-22.04 for Playwright compatibility
7698
# ubuntu-latest (24.04) has library version mismatches with Playwright's WebKit dependencies
7799
runs-on: ubuntu-22.04
@@ -106,5 +128,5 @@ jobs:
106128
- name: Install WordPress with wp-env
107129
run: npm run wp-env start
108130

109-
- name: Run tests
110-
run: npm run test
131+
- name: Run E2E tests
132+
run: npm run test-e2e

.github/workflows/integration.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,24 @@
11
name: Integration Tests
22

33
on:
4-
pull_request:
54
push:
6-
branches-ignore:
7-
- develop
8-
- main
5+
paths:
6+
- '**.php'
7+
- 'composer.json'
8+
- 'composer.lock'
9+
- 'phpunit.xml.dist'
10+
- '.wp-env.json'
11+
- '.github/workflows/integration.yml'
12+
pull_request:
13+
branches: [develop, main]
14+
paths:
15+
- '**.php'
16+
- 'composer.json'
17+
- 'composer.lock'
18+
- 'phpunit.xml.dist'
19+
- '.wp-env.json'
20+
- '.github/workflows/integration.yml'
21+
workflow_dispatch:
922

1023
# Disable all permissions by default; grant minimal permissions per job
1124
permissions: {}

.github/workflows/js-tests.yml

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: JS Tests
2+
3+
on:
4+
push:
5+
paths:
6+
- '**.js'
7+
- '**.jsx'
8+
- '**.ts'
9+
- '**.tsx'
10+
- 'package.json'
11+
- 'package-lock.json'
12+
- 'jest.config.js'
13+
- '.github/workflows/js-tests.yml'
14+
pull_request:
15+
branches: [develop, main]
16+
paths:
17+
- '**.js'
18+
- '**.jsx'
19+
- '**.ts'
20+
- '**.tsx'
21+
- 'package.json'
22+
- 'package-lock.json'
23+
- 'jest.config.js'
24+
- '.github/workflows/js-tests.yml'
25+
workflow_dispatch:
26+
27+
# Disable all permissions by default; grant minimal permissions per job
28+
permissions: {}
29+
30+
concurrency:
31+
group: ${{ github.workflow }}-${{ github.ref }}
32+
cancel-in-progress: true
33+
34+
jobs:
35+
lint-and-test:
36+
name: Lint and Jest Tests
37+
runs-on: ubuntu-latest
38+
permissions:
39+
contents: read
40+
41+
steps:
42+
- name: Checkout code
43+
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
44+
with:
45+
persist-credentials: false
46+
47+
- name: Set up NodeJS 20
48+
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6.1.0
49+
with:
50+
node-version: '20'
51+
cache: npm
52+
53+
- name: Install dependencies
54+
run: npm ci
55+
56+
- name: Run Lint JS
57+
run: npm run lint-js
58+
59+
- name: Run Jest tests
60+
run: npm run test-jest

.github/workflows/php-lint.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,22 @@
11
name: PHP Lint
22

33
on:
4-
pull_request:
54
push:
6-
branches-ignore:
7-
- develop
8-
- main
5+
paths:
6+
- '**.php'
7+
- 'composer.json'
8+
- 'composer.lock'
9+
- '.phpcs.xml.dist'
10+
- '.github/workflows/php-lint.yml'
11+
pull_request:
12+
branches: [develop, main]
13+
paths:
14+
- '**.php'
15+
- 'composer.json'
16+
- 'composer.lock'
17+
- '.phpcs.xml.dist'
18+
- '.github/workflows/php-lint.yml'
19+
workflow_dispatch:
920

1021
# Disable all permissions by default; grant minimal permissions per job
1122
permissions: {}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
{
2+
"$schema": "https://playground.wordpress.net/blueprint-schema.json",
3+
"landingPage": "/wp-admin/index.php?page=calendar",
4+
"preferredVersions": {
5+
"php": "8.2",
6+
"wp": "latest"
7+
},
8+
"phpExtensionBundles": [
9+
"kitchen-sink"
10+
],
11+
"steps": [
12+
{
13+
"step": "installPlugin",
14+
"pluginData": {
15+
"resource": "wordpress.org/plugins",
16+
"slug": "edit-flow"
17+
},
18+
"options": {
19+
"activate": true
20+
}
21+
},
22+
{
23+
"step": "runPHP",
24+
"code": "<?php /* Initialize Edit Flow modules and capabilities */ require_once 'wordpress/wp-load.php'; if ( function_exists( 'EditFlow' ) ) { if ( isset( EditFlow()->custom_status ) ) { EditFlow()->custom_status->install(); } if ( isset( EditFlow()->calendar ) ) { EditFlow()->calendar->install(); } } $role = get_role( 'administrator' ); if ( $role ) { $role->add_cap( 'ef_view_calendar' ); } ?>"
25+
},
26+
{
27+
"step": "runPHP",
28+
"code": "<?php /* Create editor user */ require_once 'wordpress/wp-load.php'; $user_id = wp_create_user( 'editor', 'password', 'editor@example.com' ); if ( ! is_wp_error( $user_id ) ) { $user = new WP_User( $user_id ); $user->set_role( 'editor' ); update_user_meta( $user_id, 'first_name', 'Sarah' ); update_user_meta( $user_id, 'last_name', 'Editor' ); wp_update_user( array( 'ID' => $user_id, 'display_name' => 'Sarah Editor' ) ); } ?>"
29+
},
30+
{
31+
"step": "runPHP",
32+
"code": "<?php /* Create writer user */ require_once 'wordpress/wp-load.php'; $user_id = wp_create_user( 'writer', 'password', 'writer@example.com' ); if ( ! is_wp_error( $user_id ) ) { $user = new WP_User( $user_id ); $user->set_role( 'author' ); update_user_meta( $user_id, 'first_name', 'James' ); update_user_meta( $user_id, 'last_name', 'Writer' ); wp_update_user( array( 'ID' => $user_id, 'display_name' => 'James Writer' ) ); } ?>"
33+
},
34+
{
35+
"step": "runPHP",
36+
"code": "<?php /* Create sample posts with various statuses */ require_once 'wordpress/wp-load.php'; $writer = get_user_by( 'login', 'writer' ); $editor = get_user_by( 'login', 'editor' ); wp_insert_post( array( 'post_title' => 'New Feature: AI-Powered Content Suggestions', 'post_content' => 'This article explores how AI can help content creators brainstorm and refine their ideas.', 'post_status' => 'pitch', 'post_author' => $writer->ID, 'post_date' => date( 'Y-m-d H:i:s', strtotime( '+3 days' ) ), ) ); wp_insert_post( array( 'post_title' => 'Guide to Remote Team Collaboration', 'post_content' => 'Remote work has transformed how editorial teams collaborate.', 'post_status' => 'assigned', 'post_author' => $writer->ID, 'post_date' => date( 'Y-m-d H:i:s', strtotime( '+5 days' ) ), ) ); $progress_post = wp_insert_post( array( 'post_title' => '10 Tips for Better Editorial Workflows', 'post_content' => 'Streamlining your editorial workflow can save hours each week.', 'post_status' => 'in-progress', 'post_author' => $writer->ID, 'post_date' => date( 'Y-m-d H:i:s', strtotime( '+1 day' ) ), ) ); update_option( 'ef_demo_progress_post_id', $progress_post ); wp_insert_post( array( 'post_title' => 'The Future of Digital Publishing', 'post_content' => 'Digital publishing continues to evolve rapidly.', 'post_status' => 'pending', 'post_author' => $editor->ID, 'post_date' => date( 'Y-m-d H:i:s', strtotime( '+2 days' ) ), ) ); wp_insert_post( array( 'post_title' => 'Interview: Leading Through Change', 'post_content' => 'In this exclusive interview, we speak with industry leaders.', 'post_status' => 'draft', 'post_author' => 1, 'post_date' => date( 'Y-m-d H:i:s', strtotime( '+7 days' ) ), ) ); wp_insert_post( array( 'post_title' => 'Weekly Roundup: Content Strategy Insights', 'post_content' => 'This week in content strategy: new research on reader engagement.', 'post_status' => 'future', 'post_author' => $editor->ID, 'post_date' => date( 'Y-m-d H:i:s', strtotime( '+4 days' ) ), ) ); ?>"
37+
},
38+
{
39+
"step": "runPHP",
40+
"code": "<?php /* Add editorial comments to demonstrate collaboration */ require_once 'wordpress/wp-load.php'; $post_id = get_option( 'ef_demo_progress_post_id' ); if ( $post_id ) { $editor = get_user_by( 'login', 'editor' ); $writer = get_user_by( 'login', 'writer' ); wp_insert_comment( array( 'comment_post_ID' => $post_id, 'comment_content' => 'Great start! Could you expand on tip #3 about visual calendars?', 'comment_type' => 'editorial-comment', 'user_id' => $editor->ID, 'comment_author' => $editor->display_name, 'comment_author_email' => $editor->user_email, 'comment_approved' => 'editorial-comment', ) ); wp_insert_comment( array( 'comment_post_ID' => $post_id, 'comment_content' => 'Thanks Sarah! I will add a calendar screenshot and expand that section.', 'comment_type' => 'editorial-comment', 'user_id' => $writer->ID, 'comment_author' => $writer->display_name, 'comment_author_email' => $writer->user_email, 'comment_approved' => 'editorial-comment', ) ); delete_option( 'ef_demo_progress_post_id' ); } ?>"
41+
},
42+
{
43+
"step": "login",
44+
"username": "admin",
45+
"password": "password"
46+
}
47+
]
48+
}

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,26 @@ All notable changes to this project will be documented in this file.
44

55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## [0.10.3] - 2026-01-12
8+
9+
### Added
10+
11+
* feat: add WordPress Playground blueprint for live preview by @GaryJones in [#885](https://github.com/Automattic/Edit-Flow/pull/885)
12+
13+
### Fixed
14+
15+
* fix: prevent Edit Flow nonce checks from killing unrelated forms by @GaryJones in [#883](https://github.com/Automattic/Edit-Flow/pull/883)
16+
* fix: add missing imports for Extended Post Status block editor panel by @GaryJones in [#884](https://github.com/Automattic/Edit-Flow/pull/884)
17+
18+
### Documentation
19+
20+
* docs: move Development section from README to CONTRIBUTING by @GaryJones in [#880](https://github.com/Automattic/Edit-Flow/pull/880)
21+
22+
### Maintenance
23+
24+
* ci: optimise CI workflows with path filters and split tests by @GaryJones in [#881](https://github.com/Automattic/Edit-Flow/pull/881)
25+
* test: add integration test for revision nonce handling by @GaryJones in [#879](https://github.com/Automattic/Edit-Flow/pull/879)
26+
727
## [0.10.2] - 2026-01-07
828

929
### Fixed
@@ -395,6 +415,7 @@ This is a major update with significant bug fixes, new features, and modernised
395415

396416
* Ability to assign custom statuses to posts.
397417

418+
[0.10.3]: https://github.com/Automattic/Edit-Flow/compare/0.10.2...0.10.3
398419
[0.10.2]: https://github.com/Automattic/Edit-Flow/compare/0.10.1...0.10.2
399420
[0.10.1]: https://github.com/Automattic/Edit-Flow/compare/0.10.0...0.10.1
400421
[0.10.0]: https://github.com/Automattic/Edit-Flow/compare/0.9.9...0.10.0

CONTRIBUTING.md

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,43 @@ Here's a sample of what a great summary looks like:
4646

4747
Screenshots: *screenshot of behavior/error goes here*
4848

49+
Development Setup
50+
------
51+
52+
This plugin uses `wp-env` for development and is required to run the tests written for the plugin. `wp-env` requires Docker so please ensure you have that installed on your system first. To install `wp-env`, use the following command:
53+
54+
```
55+
npm -g i @wordpress/env
56+
```
57+
58+
Read more about `wp-env` [here](https://www.npmjs.com/package/@wordpress/env).
59+
60+
This plugin also uses Composer to manage PHP dependencies. Composer can be downloaded [here](https://getcomposer.org/download/).
61+
62+
###### Getting started
63+
64+
1. Clone the plugin repo: `git clone git@github.com:Automattic/Edit-Flow.git`
65+
2. Change to cloned directory: `cd /path/to/repo`
66+
3. Install PHP dependencies: `composer install`
67+
4. Install NPM dependencies: `npm install`
68+
5. Start dev environment: `wp-env start`
69+
70+
###### Running tests
71+
72+
Ensure that the dev environment has already been started with `wp-env start`.
73+
74+
**PHP Integration Tests:**
75+
1. Integration test: `composer run integration`
76+
2. Multi-site integration test: `composer run integration-ms`
77+
78+
**E2E Tests (Playwright):**
79+
1. Run E2E tests: `npm run test-e2e`
80+
2. Run with visible browser: `npm run test-e2e:headed`
81+
3. Debug mode: `npm run test-e2e:debug`
82+
83+
**JavaScript Tests:**
84+
1. Run Jest tests: `npm run test-jest`
85+
4986
Creating and submitting Patches
5087
------
5188

0 commit comments

Comments
 (0)