Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: application store architecture #135

Merged
merged 47 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
43eea79
Refactor application store architecture
josephfusco Apr 29, 2024
23e1b0e
Use name as key
josephfusco Apr 30, 2024
8c50257
Handle attempted registration of duplicate names
josephfusco Apr 30, 2024
6c1feee
Merge branch 'main' into poc-3rd-party-plugin
josephfusco May 8, 2024
04dfda4
save
josephfusco May 8, 2024
a2a30bc
save
josephfusco May 9, 2024
37528f1
Pull in third-party-plugin from separate repo
josephfusco May 9, 2024
ff69c3b
save
josephfusco May 9, 2024
2ac7be8
save
josephfusco May 9, 2024
7a93015
save
josephfusco May 10, 2024
00fb344
save
josephfusco May 10, 2024
7aba26f
- update third-party-plugin.php to not fatal if dependencies have not…
jasonbahl May 10, 2024
ba43a12
- update .gitignore
jasonbahl May 10, 2024
79dbb90
- update app-store.js to support prettify action
jasonbahl May 10, 2024
8bba62c
- remove store/app-store.js in favor of store/app-store/index.js
jasonbahl May 11, 2024
c8e262f
Port merge fragments button to new API
josephfusco May 13, 2024
710d73d
Add merge fragments button
josephfusco May 13, 2024
d697ef3
save but broken
josephfusco May 13, 2024
2061c98
- import selectors from selectors, not from actions
jasonbahl May 14, 2024
ed45477
- update path to EditorToolbar component
jasonbahl May 14, 2024
0eae15a
- move buttons from third-party-plugin into core plugin under registry
jasonbahl May 14, 2024
3fc123b
save
josephfusco May 14, 2024
f061bb3
save
josephfusco May 14, 2024
f5ab722
Revert package changes
josephfusco May 15, 2024
a37aa78
flush permalinks
josephfusco May 15, 2024
ecfa96b
Fix broken test path
josephfusco May 15, 2024
779113e
Linting fixes
josephfusco May 15, 2024
154924e
Update package.lock file
josephfusco May 15, 2024
9ecd6f7
Remove unessary deps
josephfusco May 15, 2024
787f731
Implement npm cache
josephfusco May 15, 2024
7cf4eab
Cached up
josephfusco May 15, 2024
9e11366
Clean up unused command
josephfusco May 16, 2024
71b6df5
Use Node 20
josephfusco May 16, 2024
5b41661
test for grayscale
josephfusco May 16, 2024
90291ac
Clean up console.logs
josephfusco May 16, 2024
bf11b1e
Refactor toolbar button tests
josephfusco May 16, 2024
4c115ff
scaffold prettify button tests
josephfusco May 16, 2024
c4c13cb
scaffold prettify button tests
josephfusco May 16, 2024
9045f69
save
josephfusco May 16, 2024
0a0f6c6
no message
jasonbahl May 17, 2024
ea1b8d4
Merge branch 'main' into poc-3rd-party-plugin
josephfusco May 17, 2024
b39201b
Output. chromium version to debug e2e
josephfusco May 17, 2024
2502f3a
Remove chromium output
josephfusco May 17, 2024
693dcb1
Handle pre-release releases
josephfusco May 17, 2024
6a802b6
Update target branch name
josephfusco May 17, 2024
f41b4be
remove changeset pre mode from local run
josephfusco May 17, 2024
4ecf114
Update GitHub org
josephfusco May 17, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/few-coins-design.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"wpgraphql-ide": major
---

Refactored stores, including renaming 'wpgraphql-ide' to 'wpgraphql-ide/app', and adding additional stores such as 'wpgraphql-ide/editor-toolbar
8 changes: 3 additions & 5 deletions .github/workflows/e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: ['18']
node-version: ['20']
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -23,22 +23,20 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci

- name: Build Assets
run: npm run build

- name: Install Playwright dependencies
run: |
npx playwright install chromium firefox webkit --with-deps

- name: Start WordPress Environment
run: npm run wp-env -- start

- name: Run E2E tests
run: npm run test:e2e

- name: Stop WordPress Environment
if: always()
run: npm run wp-env -- stop
55 changes: 55 additions & 0 deletions .github/workflows/prerelease-plugin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Pre-Release

on:
push:
branches:
- beta

jobs:
pre-release:
name: Pre-Release
runs-on: ubuntu-22.04
steps:
- name: Checkout Repository
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm

- name: Install Dependencies
run: npm ci

- name: Enter Prerelease Mode
run: npx changeset pre enter beta

- name: Create Prerelease Version
run: npm run version

- name: Commit Changes
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "chore: prerelease version bump"

- name: Push Changes
run: |
git push --follow-tags

- name: Build and Publish
run: npm run release

- name: Exit Prerelease Mode
run: npx changeset pre exit

- name: Upload Release Artifact
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "wpgraphql-ide.zip"
asset_name: wpgraphql-ide.zip
tag: ${{ format('v{0}', fromJSON(steps.changesets.outputs.publishedPackages)[0].version) }}
overwrite: true
1 change: 1 addition & 0 deletions .github/workflows/release-plugin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: 18.x
cache: npm

- name: Install Dependencies
run: npm ci
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: npm

- name: Install dependencies
run: npm ci
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "josephfusco/wpgraphql-ide",
"name": "wp-graphql/wpgraphql-ide",
"description": "A next-gen query editor for WPGraphQL.",
"type": "wordpress-plugin",
"license": "GPL-3.0-or-later",
Expand Down
67 changes: 67 additions & 0 deletions plugins/third-party-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# Hidden files on Windows machines
.DS_Store

# Hidden files for users using JetBrains IDEs (PHPStorm, WebStorm, etc)
.idea

# Hidden files for users using VSCode as their IDE.
.vscode

# Composer dependencies. These should be installed on the users machine
vendor

# We _do_ want to version our tests!
!/tests

# PHPCS cached files.
/tests/_output/*.json

# Directory used to generate the .zip for deploying to WordPress.org
plugin-build

# Output of testing code coverage
coverage/*

# Generated Schema used in some tooling. Versioned Schema is uploaded as a Release artifact to Github.
schema.graphql

# Used to override phpcs.xml.dist
phpcs.xml

# Config for phpunit. Used to override phpunit.xml.dist
phpunit.xml

# Files output by Docker
docker-output

# JavaScript dependencies. Should be installed locally on the machine, not versioned
node_modules

# Config for Codeception. Used to override the codeception.dist.yml
codeception.yml

# Used to send code coverage to Coveralls
php-coveralls.phar

# Log files
.log

# File used for Codeception to track test coverage
c3.php

# Used for setting local environment variables when testing
.env
.env.testing

# output from e2e tests
artifacts

# build/release artifacts
build/
third-party-plugin/
third-party-plugin.php
/test-results/
/playwright-report/
/blob-report/
/playwright/.cache/
/@wpgraphql/
Loading