Skip to content

Commit 554b51c

Browse files
committed
Merge branch 'develop' into fix/1503-reset-large-tables
2 parents 12ca190 + a0bcd4f commit 554b51c

File tree

188 files changed

+18924
-22336
lines changed

Some content is hidden

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

188 files changed

+18924
-22336
lines changed

.distignore

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
.distignore
33
.editorconfig
44
.eslintignore
5-
.eslintrc.json
6-
.eslintrc.playwright.json
5+
.eslintrc.js
76
.gitignore
87
.nvmrc
8+
.phpunit.result.cache
99
composer.lock
1010
docker-compose.build.yml
1111
docker-compose.yml
@@ -26,7 +26,11 @@ node_modules
2626
tests
2727

2828
# Playwright generated files.
29+
/artifacts/
2930
/test-results/
3031
/playwright-report/
3132
/blob-report/
3233
/playwright/.cache/
34+
35+
# JS and SCSS source files.
36+
/src/

.eslintignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/ui/lib/
2-
**/*.min.js
31
/vendor/
42
/node_modules/
53
/build/

.eslintrc.js

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
module.exports = {
2+
extends: [
3+
'plugin:@wordpress/eslint-plugin/recommended-with-formatting',
4+
],
5+
env: {
6+
browser: true,
7+
es6: true,
8+
},
9+
rules: {
10+
'@wordpress/no-global-event-listener': 'off',
11+
'jsdoc/check-indentation': 'error',
12+
'@wordpress/dependency-group': 'error',
13+
'import/order': [ 'error', { groups: [ 'builtin', [ 'external', 'unknown' ], 'internal', 'parent', 'sibling', 'index' ] } ],
14+
'jsdoc/require-param': 'off',
15+
'jsdoc/require-param-type': 'off',
16+
'jsdoc/check-param-names': 'off',
17+
},
18+
};

.eslintrc.json

Lines changed: 0 additions & 17 deletions
This file was deleted.

.eslintrc.playwright.json

Lines changed: 0 additions & 8 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ jobs:
5454
- name: Lint
5555
run: npm run lint
5656

57+
- name: Build
58+
run: npm run build
59+
5760
- name: Pull custom Docker images
5861
run: docker compose pull wordpress
5962

6063
- name: Test
6164
run: npm run test
62-
63-
- name: Build
64-
run: npm run build

.gitignore

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,8 @@ debug.log
1414
package.lock
1515
.phpunit.result.cache
1616

17-
# Compiled files
18-
ui/js/*.min.js
19-
ui/css/*.min.css
20-
alerts/js/*.min.js
21-
2217
# Generated test data
18+
/artifacts/
2319
tests/data/tmp/*
2420
/test-results/
2521
/playwright-report/

Gruntfile.js

Lines changed: 0 additions & 68 deletions
This file was deleted.

alerts/class-alert-type-highlight.php

Lines changed: 11 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ class Alert_Type_Highlight extends Alert_Type {
1616

1717
/**
1818
* Main JS file script handle.
19+
*
20+
* @deprecated 4.1.0 Constant is not used anymore and will be removed.
1921
*/
2022
const SCRIPT_HANDLE = 'wp-stream-alert-highlight-js';
2123

@@ -307,34 +309,19 @@ public function ajax_remove_highlight() {
307309
* @param string $page WP admin page.
308310
*/
309311
public function enqueue_scripts( $page ) {
310-
if ( 'toplevel_page_wp_stream' === $page ) {
311-
$min = wp_stream_min_suffix();
312-
313-
wp_register_script(
314-
self::SCRIPT_HANDLE,
315-
$this->plugin->locations['url'] . 'alerts/js/alert-type-highlight.' . $min . 'js',
316-
array(
317-
'jquery',
318-
),
319-
$this->plugin->get_version(),
320-
false
321-
);
312+
if ( 'toplevel_page_wp_stream' !== $page ) {
313+
return;
314+
}
322315

323-
$exports = array(
316+
$this->plugin->enqueue_asset(
317+
'alert-type-highlight',
318+
array(),
319+
array(
324320
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
325321
'removeAction' => self::REMOVE_ACTION,
326322
'security' => wp_create_nonce( self::REMOVE_ACTION_NONCE ),
327-
);
328-
329-
wp_scripts()->add_data(
330-
self::SCRIPT_HANDLE,
331-
'data',
332-
sprintf( 'var _streamAlertTypeHighlightExports = %s;', wp_json_encode( $exports ) )
333-
);
334-
335-
wp_add_inline_script( self::SCRIPT_HANDLE, 'streamAlertTypeHighlight.init();', 'after' );
336-
wp_enqueue_script( self::SCRIPT_HANDLE );
337-
}
323+
)
324+
);
338325
}
339326

340327
/**

alerts/js/alert-type-highlight.js

Lines changed: 0 additions & 83 deletions
This file was deleted.

0 commit comments

Comments
 (0)