Skip to content

Commit 5b3d79c

Browse files
Merge branch 'trunk' into add-dimension-validation-to-sideload
2 parents 3a17ad8 + 9c893b1 commit 5b3d79c

26 files changed

Lines changed: 774 additions & 172 deletions
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: JavaScript Type Checking
2+
3+
on:
4+
# JavaScript type checking was introduced in 7.0.0.
5+
push:
6+
branches:
7+
- trunk
8+
- '[7-9].[0-9]'
9+
tags:
10+
- '[7-9].[0-9]'
11+
- '[7-9]+.[0-9].[0-9]+'
12+
pull_request:
13+
branches:
14+
- trunk
15+
- '[7-9].[0-9]'
16+
paths:
17+
# This workflow only scans JavaScript files.
18+
- '**.js'
19+
- '**.ts'
20+
- '**.tsx'
21+
# These files configure npm. Changes could affect the outcome.
22+
- 'package*.json'
23+
- '.nvmrc'
24+
# This file configures TypeScript. Changes could affect the outcome.
25+
- 'tsconfig.json'
26+
# This directory contains TypeScript definitions. Changes could affect the outcome.
27+
- 'typings/**'
28+
# Confirm any changes to relevant workflow files.
29+
- '.github/workflows/javascript-type-checking.yml'
30+
- '.github/workflows/reusable-javascript-type-checking.yml'
31+
workflow_dispatch:
32+
33+
# Cancels all previous workflow runs for pull requests that have not completed.
34+
concurrency:
35+
# The concurrency group contains the workflow name and the branch name for pull requests
36+
# or the commit hash for any other events.
37+
group: ${{ github.workflow }}-${{ github.event_name == 'pull_request' && github.head_ref || github.sha }}
38+
cancel-in-progress: true
39+
40+
# Disable permissions for all available scopes by default.
41+
# Any needed permissions should be configured at the job level.
42+
permissions: {}
43+
44+
jobs:
45+
# Runs JavaScript type checking.
46+
typecheck:
47+
name: JavaScript type checking
48+
uses: ./.github/workflows/reusable-javascript-type-checking.yml
49+
permissions:
50+
contents: read
51+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
52+
53+
slack-notifications:
54+
name: Slack Notifications
55+
uses: ./.github/workflows/slack-notifications.yml
56+
permissions:
57+
actions: read
58+
contents: read
59+
needs: [ typecheck ]
60+
if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
61+
with:
62+
calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
63+
secrets:
64+
SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
65+
SLACK_GHA_CANCELLED_WEBHOOK: ${{ secrets.SLACK_GHA_CANCELLED_WEBHOOK }}
66+
SLACK_GHA_FIXED_WEBHOOK: ${{ secrets.SLACK_GHA_FIXED_WEBHOOK }}
67+
SLACK_GHA_FAILURE_WEBHOOK: ${{ secrets.SLACK_GHA_FAILURE_WEBHOOK }}
68+
69+
failed-workflow:
70+
name: Failed workflow tasks
71+
runs-on: ubuntu-24.04
72+
permissions:
73+
actions: write
74+
needs: [ slack-notifications ]
75+
if: |
76+
always() &&
77+
github.repository == 'WordPress/wordpress-develop' &&
78+
github.event_name != 'pull_request' &&
79+
github.run_attempt < 2 &&
80+
(
81+
contains( needs.*.result, 'cancelled' ) ||
82+
contains( needs.*.result, 'failure' )
83+
)
84+
85+
steps:
86+
- name: Dispatch workflow run
87+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
88+
with:
89+
retries: 2
90+
retry-exempt-status-codes: 418
91+
script: |
92+
github.rest.actions.createWorkflowDispatch({
93+
owner: context.repo.owner,
94+
repo: context.repo.repo,
95+
workflow_id: 'failed-workflow.yml',
96+
ref: 'trunk',
97+
inputs: {
98+
run_id: `${context.runId}`,
99+
}
100+
});

.github/workflows/phpstan-static-analysis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ jobs:
8181
8282
steps:
8383
- name: Dispatch workflow run
84-
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
84+
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
8585
with:
8686
retries: 2
8787
retry-exempt-status-codes: 418
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
##
2+
# A reusable workflow that runs JavaScript Type Checking.
3+
##
4+
name: JavaScript Type Checking
5+
6+
on:
7+
workflow_call:
8+
9+
# Disable permissions for all available scopes by default.
10+
# Any needed permissions should be configured at the job level.
11+
permissions: {}
12+
13+
jobs:
14+
# Runs JavaScript type checking.
15+
#
16+
# Violations are reported inline with annotations.
17+
#
18+
# Performs the following steps:
19+
# - Checks out the repository.
20+
# - Sets up Node.js.
21+
# - Logs debug information.
22+
# - Installs npm dependencies.
23+
# - Configures caching for TypeScript build info.
24+
# - Runs JavaScript type checking.
25+
# - Saves the TypeScript build info.
26+
# - Ensures version-controlled files are not modified or deleted.
27+
typecheck:
28+
name: Run JavaScript type checking
29+
runs-on: ubuntu-24.04
30+
permissions:
31+
contents: read
32+
timeout-minutes: 10
33+
34+
steps:
35+
- name: Checkout repository
36+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
37+
with:
38+
show-progress: ${{ runner.debug == '1' && 'true' || 'false' }}
39+
persist-credentials: false
40+
41+
- name: Set up Node.js
42+
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
43+
with:
44+
node-version-file: '.nvmrc'
45+
cache: npm
46+
47+
- name: Log debug information
48+
run: |
49+
npm --version
50+
node --version
51+
52+
- name: Install npm dependencies
53+
run: npm ci --ignore-scripts
54+
55+
- name: Cache TypeScript build info
56+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
57+
with:
58+
path: |
59+
*.tsbuildinfo
60+
key: "ts-build-info-${{ github.run_id }}"
61+
restore-keys: |
62+
ts-build-info-
63+
64+
- name: Run JavaScript type checking
65+
run: npm run typecheck:js
66+
67+
- name: "Save result cache"
68+
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
69+
if: ${{ !cancelled() }}
70+
with:
71+
path: |
72+
*.tsbuildinfo
73+
key: "ts-build-info-${{ github.run_id }}"
74+
75+
- name: Ensure version-controlled files are not modified or deleted
76+
run: git diff --exit-code

.github/workflows/reusable-phpunit-tests-v3.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ jobs:
120120
phpunit-tests:
121121
name: ${{ ( inputs.phpunit-test-groups || inputs.coverage-report ) && format( 'PHP {0} with ', inputs.php ) || '' }} ${{ 'mariadb' == inputs.db-type && 'MariaDB' || 'MySQL' }} ${{ inputs.db-version }}${{ inputs.multisite && ' multisite' || '' }}${{ inputs.db-innovation && ' (innovation release)' || '' }}${{ inputs.memcached && ' with memcached' || '' }}${{ inputs.report && ' (test reporting enabled)' || '' }} ${{ 'example.org' != inputs.tests-domain && inputs.tests-domain || '' }}
122122
runs-on: ${{ inputs.os }}
123-
timeout-minutes: ${{ inputs.coverage-report && 120 || inputs.php == '8.4' && 30 || 20 }}
123+
timeout-minutes: ${{ inputs.coverage-report && 120 || 40 }}
124124
permissions:
125125
contents: read
126126

Gruntfile.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,6 +1556,7 @@ module.exports = function(grunt) {
15561556
grunt.registerTask( 'precommit:js', [
15571557
'webpack:prod',
15581558
'jshint:corejs',
1559+
'typecheck:js',
15591560
'uglify:imgareaselect',
15601561
'uglify:jqueryform',
15611562
'uglify:moment',
@@ -2009,6 +2010,18 @@ module.exports = function(grunt) {
20092010

20102011
grunt.registerTask( 'test', 'Runs all QUnit and PHPUnit tasks.', ['qunit:compiled', 'phpunit'] );
20112012

2013+
grunt.registerTask( 'typecheck:js', 'Runs TypeScript type checking.', function() {
2014+
var done = this.async();
2015+
2016+
grunt.util.spawn( {
2017+
cmd: 'npm',
2018+
args: [ 'run', 'typecheck:js' ],
2019+
opts: { stdio: 'inherit' }
2020+
}, function( error ) {
2021+
done( ! error );
2022+
} );
2023+
} );
2024+
20122025
grunt.registerTask( 'phpstan', 'Runs PHPStan on the entire codebase.', function() {
20132026
var done = this.async();
20142027

src/wp-admin/css/common.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ th.action-links {
10941094
.filter-links li > a:focus,
10951095
.show-filters .filter-links a.current:hover,
10961096
.show-filters .filter-links a.current:focus {
1097-
color: #135e96;
1097+
color: var(--wp-admin-theme-color);
10981098
}
10991099

11001100
.wp-filter .search-form {
@@ -1174,7 +1174,7 @@ th.action-links {
11741174
.wp-filter .button.drawer-toggle:focus,
11751175
.wp-filter .drawer-toggle:focus:before {
11761176
background-color: transparent;
1177-
color: #135e96;
1177+
color: var(--wp-admin-theme-color);
11781178
}
11791179

11801180
.wp-filter .button.drawer-toggle:hover,
@@ -1234,7 +1234,7 @@ th.action-links {
12341234

12351235
.show-filters .wp-filter .drawer-toggle:hover,
12361236
.show-filters .wp-filter .drawer-toggle:focus {
1237-
background: #2271b1;
1237+
background: var(--wp-admin-theme-color);
12381238
}
12391239

12401240
.show-filters .wp-filter .drawer-toggle:before {

src/wp-admin/css/customize-controls.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1747,6 +1747,9 @@ p.customize-section-description {
17471747
.theme-browser .theme.active .theme-actions,
17481748
.wp-customizer .theme-browser .theme .theme-actions {
17491749
padding: 9px 15px;
1750+
}
1751+
1752+
.theme-browser .theme:not(.active) .theme-actions {
17501753
box-shadow: inset 0 1px 0 rgba(0, 0, 0, 0.1);
17511754
}
17521755

@@ -1904,6 +1907,11 @@ p.customize-section-description {
19041907
bottom: 0;
19051908
}
19061909

1910+
.themes-filter-bar .feature-filter-toggle {
1911+
min-height: 32px;
1912+
line-height: 2.30769231;
1913+
}
1914+
19071915
.themes-filter-bar .feature-filter-toggle:before {
19081916
content: "\f111";
19091917
content: "\f111" / '';

src/wp-admin/css/dashboard.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -536,7 +536,7 @@
536536
}
537537

538538
.community-events li.event-none {
539-
border-left: 4px solid #72aee6;
539+
border-left: 4px solid var(--wp-admin-theme-color, #3858e9);
540540
}
541541

542542
#dashboard-widgets .community-events li.event-none a {

src/wp-admin/css/forms.css

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1279,6 +1279,10 @@ table.form-table td .updated p {
12791279
margin-top: 0;
12801280
}
12811281

1282+
.permalink-structure-optional-description code {
1283+
display: inline-block;
1284+
}
1285+
12821286
/*------------------------------------------------------------------------------
12831287
21.0 - Network Admin
12841288
------------------------------------------------------------------------------*/
@@ -1794,6 +1798,11 @@ table.form-table td .updated p {
17941798
margin-top: 4px;
17951799
}
17961800

1801+
.permalink-structure-has-blog-prefix {
1802+
display: flex;
1803+
align-items: center;
1804+
}
1805+
17971806
.form-table input.regular-text {
17981807
width: 100%;
17991808
}

src/wp-admin/css/list-tables.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1081,6 +1081,17 @@ tr.inline-edit-row td {
10811081
vertical-align: top;
10821082
}
10831083

1084+
.inline-edit-row select,
1085+
.inline-edit-row input:where(:not([type=checkbox],[type=radio],[type=submit],[type=button])) {
1086+
line-height: 2.14285714;
1087+
min-height: 32px;
1088+
padding: 0 8px 0 8px;
1089+
}
1090+
1091+
.inline-edit-row select {
1092+
padding-right: 24px;
1093+
}
1094+
10841095
#wpbody-content .bulk-edit-row fieldset .inline-edit-group label {
10851096
max-width: 50%;
10861097
}

0 commit comments

Comments
 (0)