Skip to content

Commit

Permalink
Merge pull request #60 from wp-graphql/issue-31-custom-buttons
Browse files Browse the repository at this point in the history
Allow registration of custom buttons
  • Loading branch information
josephfusco authored Mar 4, 2024
2 parents 591c1ea + aa06897 commit 9c44cc9
Show file tree
Hide file tree
Showing 25 changed files with 23,286 additions and 22,458 deletions.
68 changes: 34 additions & 34 deletions .github/workflows/wordpress-coding-standards.yml
Original file line number Diff line number Diff line change
@@ -1,44 +1,44 @@
name: WordPress Coding Standards

on:
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main
push:
branches:
- develop
- main
pull_request:
branches:
- develop
- main

jobs:
run:
runs-on: ubuntu-latest
name: PHPCS
strategy:
matrix:
php: [ 8.1 ]
run:
runs-on: ubuntu-latest
name: PHPCS
strategy:
matrix:
php: [8.1]

steps:
- name: Cancel previous runs of this workflow (pull requests only)
if: ${{ github.event_name == 'pull_request' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
steps:
- name: Cancel previous runs of this workflow (pull requests only)
if: ${{ github.event_name == 'pull_request' }}
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}

- name: Checkout
uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3

- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer:v2
coverage: none

- name: Install dependencies
uses: ramsey/composer-install@v2
with:
composer-options: "--no-progress"
- name: Install dependencies
uses: ramsey/composer-install@v2
with:
composer-options: '--no-progress'

- name: Run PHPCS
run: composer run-script check-cs
- name: Run PHPCS
run: composer run-script check-cs
11 changes: 9 additions & 2 deletions ACTIONS_AND_FILTERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

-> [Original documentation](https://www.wpgraphql.com/docs/customizing-wpgraphiql)

_legend_ 🎉 = new
_legend_ 🎉 = new functionality

## PHP Actions

Expand All @@ -21,4 +21,11 @@ _legend_ 🎉 = new

## JavaScript Filters

...
- `wpgraphqlide_toolbar_buttons` ([graphiql_toolbar_buttons](https://www.wpgraphql.com/docs/customizing-wpgraphiql#graphiql_toolbar_buttons))

## Legacy Hooks

Not all actions/filters were ported over from the legacy WPGraphQL IDE.

- `graphiql_toolbar_before_buttons`
- `graphiql_toolbar_after_buttons`
15 changes: 15 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Contributing

## Commands

### development

```sh
npm start
```

### production

```sh
npm run build
```
16 changes: 2 additions & 14 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,21 +16,9 @@ When this plugin is active, a new link "GraphQL IDE" will appear to the right of

GraphiQL IDE has intentionally been updated to read "GraphQL IDE", which feels more inline with the colloquial reference to the editor when inside of WordPress, and simply "WPGraphQL IDE" when not in a WordPress context.

## Development
## Contributing

1. Install project dependencies.

```sh
npm install
```

2. Compile JavaScript assets.

```sh
npm run build
```

Builds are only required for JS updates as the plugin's CSS is directly enqueued.
See [CONTRIBUTING.md](CONTRIBUTING.md)

## Custom Hooks

Expand Down
72 changes: 36 additions & 36 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,38 +1,38 @@
{
"name": "josephfusco/wpgraphql-ide",
"description": "A next-gen query editor for WPGraphQL.",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
"authors": [
{
"name": "Joseph Fusco",
"homepage": "https://github.com/josephfusco",
"role": "Developer"
}
],
"require": {
"php": "^8.0"
},
"require-dev": {
"automattic/vipwpcs": "^3.0",
"slevomat/coding-standard": "^8.9",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"phpcompatibility/php-compatibility": "dev-develop as 9.9.9"
},
"scripts": {
"phpcs-i": [
"php ./vendor/bin/phpcs -i"
],
"check-cs": [
"php ./vendor/bin/phpcs"
],
"fix-cs": [
"php ./vendor/bin/phpcbf"
]
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
"name": "josephfusco/wpgraphql-ide",
"description": "A next-gen query editor for WPGraphQL.",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
"authors": [
{
"name": "Joseph Fusco",
"homepage": "https://github.com/josephfusco",
"role": "Developer"
}
],
"require": {
"php": "^8.0"
},
"require-dev": {
"automattic/vipwpcs": "^3.0",
"slevomat/coding-standard": "^8.9",
"phpcompatibility/phpcompatibility-wp": "^2.1",
"phpcompatibility/php-compatibility": "dev-develop as 9.9.9"
},
"scripts": {
"phpcs-i": [
"php ./vendor/bin/phpcs -i"
],
"check-cs": [
"php ./vendor/bin/phpcs"
],
"fix-cs": [
"php ./vendor/bin/phpcbf"
]
},
"config": {
"allow-plugins": {
"dealerdirect/phpcodesniffer-composer-installer": true
}
}
}
Loading

0 comments on commit 9c44cc9

Please sign in to comment.