Skip to content

Commit 784f827

Browse files
authored
Merge pull request #599 from ProgressPlanner/develop
v1.8.0
2 parents a8d2c9d + b189732 commit 784f827

132 files changed

Lines changed: 3554 additions & 1842 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/playground-merged.yml

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,35 @@ jobs:
1010
if: github.event.pull_request.merged == true
1111
runs-on: ubuntu-latest
1212
permissions:
13+
contents: read
1314
pull-requests: write
15+
actions: read
1416
steps:
17+
- name: Prepare blueprint with artifact link
18+
id: blueprint
19+
run: |
20+
set -euxo pipefail
21+
ARTIFACT_URL="${{ github.server_url }}/${{ github.repository }}/archive/refs/heads/develop.zip"
22+
23+
# Use Node.js to parse, modify, and stringify the JSON
24+
BLUEPRINT=$(node -e "
25+
const fs = require('fs');
26+
const blueprint = JSON.parse(fs.readFileSync('.wordpress-org/blueprints/playground.json', 'utf8'));
27+
blueprint.plugins = blueprint.plugins.map(plugin =>
28+
plugin === '${{ github.event.repository.name }}' ? '$ARTIFACT_URL' : plugin
29+
);
30+
console.log(JSON.stringify(blueprint));
31+
")
32+
33+
# Base64 encode the blueprint
34+
ENCODED_BLUEPRINT=$(echo -n "$BLUEPRINT" | base64 -w 0)
35+
36+
echo "blueprint=$ENCODED_BLUEPRINT" >> "$GITHUB_OUTPUT"
37+
38+
# Comment with a Playground link that installs from the artifact ZIP
1539
- uses: mshick/add-pr-comment@v2
1640
with:
1741
message: |
1842
**Test merged PR on Playground**
19-
[Test this pull request on the Playground](https://playground.wordpress.net/?blueprint-url=https%3A%2F%2Fprogressplanner.com%2Fresearch%2Fblueprint-pp.php%3Frepo%3D${{ github.repository }}) or [download the zip](${{ github.server_url }}/${{ github.repository }}/archive/refs/heads/develop.zip).
43+
[Test this pull request on the Playground](https://playground.wordpress.net/#${{ steps.blueprint.outputs.blueprint }})
44+
or [download the zip](${{ github.server_url }}/${{ github.repository }}/archive/refs/heads/develop.zip)

.github/workflows/playground.yml

Lines changed: 78 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,89 @@ on:
44
pull_request:
55

66
jobs:
7-
test:
7+
playground:
88
runs-on: ubuntu-latest
99
permissions:
10+
contents: read
1011
pull-requests: write
12+
actions: read
13+
1114
steps:
15+
- uses: actions/checkout@v4
16+
17+
# Prepare a folder named exactly like the repo as the plugin root.
18+
# If the repo already has such a folder (common for WP plugins), use it.
19+
# Otherwise, stage one and copy root files into it (excluding CI junk).
20+
- name: Prepare plugin folder
21+
id: prep
22+
run: |
23+
set -euxo pipefail
24+
REPO="${{ github.event.repository.name }}"
25+
if [ -d "$REPO" ]; then
26+
# Plugin already lives in a subfolder named like the repo
27+
echo "PKG_DIR=$REPO" >> "$GITHUB_OUTPUT"
28+
else
29+
# Create a clean staging dir to avoid copying into itself
30+
STAGE="${REPO}-pkg"
31+
mkdir -p "$STAGE/$REPO"
32+
rsync -a \
33+
--exclude='.git' \
34+
--exclude='.github' \
35+
--exclude='node_modules' \
36+
--exclude="${STAGE}" \
37+
./ "$STAGE/$REPO/"
38+
echo "PKG_DIR=$STAGE/$REPO" >> "$GITHUB_OUTPUT"
39+
40+
fi
41+
42+
- name: Update plugin version with PR number
43+
run: |
44+
set -euxo pipefail
45+
PLUGIN_FILE="${{ steps.prep.outputs.PKG_DIR }}/${{ github.event.repository.name }}.php"
46+
PR_NUMBER="${{ github.event.number }}"
47+
48+
# Extract current version and add PR number
49+
CURRENT_VERSION=$(grep -o "Version:[[:space:]]*[0-9.]*" "$PLUGIN_FILE" | sed 's/Version:[[:space:]]*//')
50+
NEW_VERSION="${CURRENT_VERSION} - PR ${PR_NUMBER}"
51+
52+
# Replace the version line
53+
sed -i "s/Version:[[:space:]]*[0-9.]*/Version: ${NEW_VERSION}/" "$PLUGIN_FILE"
54+
55+
- name: Prepare blueprint with artifact link
56+
id: blueprint
57+
run: |
58+
set -euxo pipefail
59+
ARTIFACT_URL="https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ github.event.repository.name }}.zip"
60+
61+
# Use Node.js to parse, modify, and stringify the JSON
62+
BLUEPRINT=$(node -e "
63+
const fs = require('fs');
64+
const blueprint = JSON.parse(fs.readFileSync('.wordpress-org/blueprints/playground.json', 'utf8'));
65+
blueprint.plugins = blueprint.plugins.map(plugin =>
66+
plugin === '${{ github.event.repository.name }}' ? '$ARTIFACT_URL' : plugin
67+
);
68+
console.log(JSON.stringify(blueprint));
69+
")
70+
71+
# Base64 encode the blueprint
72+
ENCODED_BLUEPRINT=$(echo -n "$BLUEPRINT" | base64 -w 0)
73+
74+
echo "blueprint=$ENCODED_BLUEPRINT" >> "$GITHUB_OUTPUT"
75+
76+
# Upload the FOLDER (not a .zip). The artifact service zips it for us,
77+
# keeping the top-level folder name inside the archive.
78+
- name: Upload plugin artifact
79+
uses: actions/upload-artifact@v4
80+
with:
81+
name: ${{ github.event.repository.name }}
82+
path: ${{ steps.prep.outputs.PKG_DIR }}
83+
# Optional: faster uploads for already-compressed assets
84+
compression-level: 0
85+
86+
# Comment with a Playground link that installs from the artifact ZIP
1287
- uses: mshick/add-pr-comment@v2
1388
with:
1489
message: |
1590
**Test on Playground**
16-
[Test this pull request on the Playground](https://playground.wordpress.net/?blueprint-url=https%3A%2F%2Fprogressplanner.com%2Fresearch%2Fblueprint-pp.php%3Frepo%3D${{ github.repository }}%26branch%3D${{ github.head_ref }}) or [download the zip](${{ github.server_url }}/${{ github.repository }}/archive/${{ github.sha }}.zip).
91+
[Test this pull request on the Playground](https://playground.wordpress.net/#${{ steps.blueprint.outputs.blueprint }})
92+
or [download the zip](https://nightly.link/${{ github.repository }}/actions/runs/${{ github.run_id }}/${{ github.event.repository.name }}.zip)
Lines changed: 12 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
{
2-
"landingPage": "\/wp-admin\/admin.php?page=progress-planner",
3-
"steps": [
4-
{
5-
"step": "login",
6-
"username": "admin",
7-
"password": "password"
8-
},
9-
{
10-
"step": "defineWpConfigConsts",
11-
"consts": {
12-
"IS_PLAYGROUND_PREVIEW": true
13-
}
14-
}
15-
]
2+
"landingPage": "/wp-admin/admin.php?page=progress-planner",
3+
"features": {
4+
"networking": true
5+
},
6+
"plugins": [
7+
"progress-planner"
8+
],
9+
"steps": [
10+
{
11+
"step": "login"
12+
}
13+
]
1614
}
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
{
2+
"landingPage": "/wp-admin/admin.php?page=progress-planner",
3+
"features": {
4+
"networking": true
5+
},
6+
"plugins": [
7+
"progress-planner",
8+
"wordpress-seo"
9+
],
10+
"steps": [
11+
{
12+
"step": "login"
13+
},
14+
{
15+
"step": "setSiteOptions",
16+
"options": {
17+
"wpseo": "a:5:{s:22:\"show_onboarding_notice\";b:0;s:36:\"dismiss_configuration_workout_notice\";b:1;s:18:\"first_time_install\";b:0;s:34:\"activation_redirect_timestamp_free\";i:1652258756;s:34:\"should_redirect_after_install_free\";b:0;}"
18+
}
19+
},
20+
{
21+
"step": "defineWpConfigConsts",
22+
"consts": {
23+
"IS_PLAYGROUND_PREVIEW": true,
24+
"WPSEO_PREMIUM_FILE": "override",
25+
"WPSEO_PREMIUM_VERSION": "24.8.1",
26+
"YOAST_ENVIRONMENT": "development",
27+
"WP_ENVIRONMENT_TYPE": "development"
28+
}
29+
}
30+
]
31+
}

CHANGELOG.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
= 1.8.0 =
2+
3+
Enhancements:
4+
5+
* Redesign of the admin pages.
6+
* Improved capability checks.
7+
* a11y improvements.
8+
9+
Added these recommendations from Ravi:
10+
11+
* Set date format.
12+
13+
Bugs we fixed:
14+
15+
* Fix redirecting to Progress Planner Dashboard after login.
116

217
= 1.7.2 =
318

assets/css/admin.css

Lines changed: 51 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
--prpl-color-notification-green: #16a34a;
3333
--prpl-color-notification-red: #e73136;
3434

35+
--prpl-color-button-primary: #dd3244;
36+
--prpl-color-button-primary-hover: #cf2441;
37+
3538
--prpl-background-orange: #fff9f0;
3639
--prpl-background-purple: #f6f5fb;
3740
--prpl-background-green: #f2faf9;
@@ -50,14 +53,34 @@
5053
--prpl-font-size-6xl: 4.5rem; /* 72px */
5154
}
5255

56+
/*------------------------------------*\
57+
Progress Planner dashboard page.
58+
\*------------------------------------*/
59+
/* stylelint-disable-next-line selector-class-pattern */
60+
body.toplevel_page_progress-planner {
61+
62+
#wpwrap {
63+
background-color: #f6f7f9;
64+
}
65+
66+
ul#adminmenu {
67+
68+
a.wp-has-current-submenu,
69+
>li.current > a.current {
70+
71+
&::after {
72+
border-right-color: #f6f7f9 !important;
73+
}
74+
}
75+
}
76+
}
77+
5378
/*------------------------------------*\
5479
Styles for the container of the page.
5580
\*------------------------------------*/
5681
.prpl-wrap {
57-
background: #fff;
58-
border: 1px solid var(--prpl-color-gray-2);
5982
border-radius: var(--prpl-border-radius);
60-
padding: var(--prpl-settings-page-gap) calc(var(--prpl-padding) * 2);
83+
padding: var(--prpl-settings-page-gap) var(--prpl-padding);
6184
max-width: var(--prpl-container-max-width);
6285
color: var(--prpl-color-text);
6386
font-size: var(--prpl-font-size-base);
@@ -97,6 +120,14 @@
97120
color: var(--prpl-color-link);
98121
}
99122

123+
.prpl-widget-width-2 {
124+
grid-column: span 2;
125+
126+
.prpl-widget-description {
127+
max-width: 640px;
128+
}
129+
}
130+
100131
.prpl-widget-title {
101132
margin-top: 0;
102133
font-size: 1.375rem;
@@ -190,6 +221,7 @@ button.prpl-info-icon {
190221
padding: 0.4em;
191222

192223
/* color: var(--prpl-color-gray-2); */
224+
background-color: #fff;
193225
border: 1px solid var(--prpl-color-gray-2);
194226
border-radius: var(--prpl-border-radius);
195227

@@ -218,6 +250,7 @@ button.prpl-info-icon {
218250
grid-template-columns: repeat(auto-fit, minmax(var(--prpl-column-min-width), 1fr));
219251
column-gap: var(--prpl-gap);
220252
grid-auto-rows: var(--prpl-gap);
253+
grid-auto-flow: dense;
221254

222255
img {
223256
max-width: 100%;
@@ -234,6 +267,7 @@ button.prpl-info-icon {
234267
Generic styles for individual widgets.
235268
\*------------------------------------*/
236269
.prpl-widget-wrapper {
270+
background-color: #fff;
237271
border: 1px solid var(--prpl-color-gray-2);
238272
border-radius: var(--prpl-border-radius);
239273
padding: var(--prpl-padding);
@@ -245,6 +279,12 @@ button.prpl-info-icon {
245279
hr {
246280
margin-top: 1.25rem;
247281
margin-bottom: 1.25rem;
282+
border-top-color: var(--prpl-color-gray-2);
283+
}
284+
285+
/* Force the last column to be the last column. */
286+
&[data-force-last-column="1"] {
287+
grid-column: -2 / -1;
248288
}
249289
}
250290

@@ -298,7 +338,7 @@ button.prpl-info-icon {
298338
text-decoration: none;
299339
cursor: pointer;
300340
font-size: var(--prpl-font-size-base);
301-
background: var(--prpl-color-accent-red);
341+
background: var(--prpl-color-button-primary);
302342
line-height: 1.25;
303343
box-shadow: none;
304344
border: none;
@@ -315,7 +355,7 @@ button.prpl-info-icon {
315355
display: block;
316356
width: 100%;
317357
height: 100%;
318-
background: var(--prpl-color-accent-red);
358+
background: var(--prpl-color-button-primary);
319359
position: absolute;
320360
top: 0;
321361
left: 0;
@@ -331,10 +371,10 @@ button.prpl-info-icon {
331371

332372
&:not([disabled]):hover,
333373
&:not([disabled]):focus {
334-
background: #cf2441;
374+
background: var(--prpl-color-button-primary-hover);
335375

336376
&::after {
337-
background: #cf2441;
377+
background: var(--prpl-color-button-primary-hover);
338378
box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.15);
339379
width: calc(100% + 4px);
340380
height: calc(100% + 4px);
@@ -418,6 +458,10 @@ button.prpl-info-icon {
418458
.prpl-welcome .inner-content .right {
419459
display: none !important;
420460
}
461+
462+
.prpl-widget-width-2 {
463+
grid-column: span 1;
464+
}
421465
}
422466

423467
/*------------------------------------*\

assets/css/page-widgets/badge-streak.css

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,48 @@
7676
.string-freeze-explain {
7777
max-width: 42em;
7878
}
79+
80+
.prpl-widget-wrapper.prpl-badge-streak,
81+
.prpl-widget-wrapper.prpl-badge-streak-content,
82+
.prpl-widget-wrapper.prpl-badge-streak-maintenance {
83+
display: flex;
84+
flex-direction: column;
85+
justify-content: space-between;
86+
87+
.progress-label {
88+
display: inline-block;
89+
}
90+
91+
.progress-wrapper {
92+
display: grid;
93+
grid-template-columns: 1fr 1fr 1fr;
94+
gap: calc(var(--prpl-gap) / 2);
95+
96+
&:not(:first-child) {
97+
margin-top: var(--prpl-padding);
98+
}
99+
100+
.prpl-badge {
101+
display: flex;
102+
flex-direction: column;
103+
align-items: center;
104+
flex-wrap: wrap;
105+
min-width: 0;
106+
}
107+
108+
p {
109+
margin: 0;
110+
font-size: var(--prpl-font-size-small);
111+
text-align: center;
112+
line-height: 1.2;
113+
}
114+
}
115+
116+
.prpl-widget-content {
117+
margin-bottom: 1em;
118+
}
119+
120+
.badge-group-monthly {
121+
background-color: transparent;
122+
}
123+
}

0 commit comments

Comments
 (0)