Skip to content

Commit

Permalink
Merge branch 'develop' into fix/1503-reset-large-tables
Browse files Browse the repository at this point in the history
  • Loading branch information
tharsheblows committed Aug 6, 2024
2 parents 12ca190 + a0bcd4f commit 554b51c
Show file tree
Hide file tree
Showing 188 changed files with 18,924 additions and 22,336 deletions.
8 changes: 6 additions & 2 deletions .distignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@
.distignore
.editorconfig
.eslintignore
.eslintrc.json
.eslintrc.playwright.json
.eslintrc.js
.gitignore
.nvmrc
.phpunit.result.cache
composer.lock
docker-compose.build.yml
docker-compose.yml
Expand All @@ -26,7 +26,11 @@ node_modules
tests

# Playwright generated files.
/artifacts/
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/

# JS and SCSS source files.
/src/
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/ui/lib/
**/*.min.js
/vendor/
/node_modules/
/build/
Expand Down
18 changes: 18 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
module.exports = {
extends: [
'plugin:@wordpress/eslint-plugin/recommended-with-formatting',
],
env: {
browser: true,
es6: true,
},
rules: {
'@wordpress/no-global-event-listener': 'off',
'jsdoc/check-indentation': 'error',
'@wordpress/dependency-group': 'error',
'import/order': [ 'error', { groups: [ 'builtin', [ 'external', 'unknown' ], 'internal', 'parent', 'sibling', 'index' ] } ],
'jsdoc/require-param': 'off',
'jsdoc/require-param-type': 'off',
'jsdoc/check-param-names': 'off',
},
};
17 changes: 0 additions & 17 deletions .eslintrc.json

This file was deleted.

8 changes: 0 additions & 8 deletions .eslintrc.playwright.json

This file was deleted.

6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,11 +54,11 @@ jobs:
- name: Lint
run: npm run lint

- name: Build
run: npm run build

- name: Pull custom Docker images
run: docker compose pull wordpress

- name: Test
run: npm run test

- name: Build
run: npm run build
6 changes: 1 addition & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ debug.log
package.lock
.phpunit.result.cache

# Compiled files
ui/js/*.min.js
ui/css/*.min.css
alerts/js/*.min.js

# Generated test data
/artifacts/
tests/data/tmp/*
/test-results/
/playwright-report/
Expand Down
68 changes: 0 additions & 68 deletions Gruntfile.js

This file was deleted.

35 changes: 11 additions & 24 deletions alerts/class-alert-type-highlight.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ class Alert_Type_Highlight extends Alert_Type {

/**
* Main JS file script handle.
*
* @deprecated 4.1.0 Constant is not used anymore and will be removed.
*/
const SCRIPT_HANDLE = 'wp-stream-alert-highlight-js';

Expand Down Expand Up @@ -307,34 +309,19 @@ public function ajax_remove_highlight() {
* @param string $page WP admin page.
*/
public function enqueue_scripts( $page ) {
if ( 'toplevel_page_wp_stream' === $page ) {
$min = wp_stream_min_suffix();

wp_register_script(
self::SCRIPT_HANDLE,
$this->plugin->locations['url'] . 'alerts/js/alert-type-highlight.' . $min . 'js',
array(
'jquery',
),
$this->plugin->get_version(),
false
);
if ( 'toplevel_page_wp_stream' !== $page ) {
return;
}

$exports = array(
$this->plugin->enqueue_asset(
'alert-type-highlight',
array(),
array(
'ajaxUrl' => admin_url( 'admin-ajax.php' ),
'removeAction' => self::REMOVE_ACTION,
'security' => wp_create_nonce( self::REMOVE_ACTION_NONCE ),
);

wp_scripts()->add_data(
self::SCRIPT_HANDLE,
'data',
sprintf( 'var _streamAlertTypeHighlightExports = %s;', wp_json_encode( $exports ) )
);

wp_add_inline_script( self::SCRIPT_HANDLE, 'streamAlertTypeHighlight.init();', 'after' );
wp_enqueue_script( self::SCRIPT_HANDLE );
}
)
);
}

/**
Expand Down
83 changes: 0 additions & 83 deletions alerts/js/alert-type-highlight.js

This file was deleted.

1 change: 1 addition & 0 deletions alerts/js/alert-type-highlight.min.js

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

File renamed without changes
File renamed without changes
3 changes: 3 additions & 0 deletions assets/stream.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes
Loading

0 comments on commit 554b51c

Please sign in to comment.