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

feat: implement redux #47

Merged
merged 14 commits into from
Feb 28, 2024
Merged

feat: implement redux #47

merged 14 commits into from
Feb 28, 2024

Conversation

jasonbahl
Copy link
Collaborator

@jasonbahl jasonbahl commented Feb 28, 2024

@josephfusco this expands on your Dedicated Screen PR and updates the app to render as a standalone ide or within the drawer based on the screenId passed up in localized.json.

This also converts use of useState() to useSelect and useDispatch so that the state is lifted out of individual components and tracked in the Redux store.

We should lift as much state out of components and up into the store as we can so that extensions can make use of the shared state.

Definitely need to make some styling adjustments to the standalone page as well.


related: #41

- update App.jsx to set initial state of the redux store using GET queryParams if available, and use selectors to handle state instead of local useState
- register redux store
- update Editor.jsx to useSelect and useDispatch to update the redux store and determine if the close drawer button should be shown
- add new RenderApp component to use state from the redux store to determine how the app should render (in a drawer or standalone)
- update a few tests
@jasonbahl jasonbahl mentioned this pull request Feb 28, 2024
wpgraphql-ide.php Outdated Show resolved Hide resolved
package.json Outdated Show resolved Hide resolved
src/App.jsx Outdated Show resolved Hide resolved
Signed-off-by: Joe Fusco <joe.fusco@wpengine.com>
@josephfusco
Copy link
Member

@jasonbahl I have pushed some commits to this branch that fix #50

Signed-off-by: Joe Fusco <joe.fusco@wpengine.com>
@josephfusco
Copy link
Member

josephfusco commented Feb 28, 2024

dedicated IDE page

dedicated IDE page with overlay covering all of WordPress' UI

@jasonbahl
Copy link
Collaborator Author

@josephfusco your changes for the styles look good, and I removed the duplicate "docker-compose"

Signed-off-by: Joe Fusco <joe.fusco@wpengine.com>
josephfusco
josephfusco previously approved these changes Feb 28, 2024
Signed-off-by: Joe Fusco <joe.fusco@wpengine.com>
Signed-off-by: Joe Fusco <joe.fusco@wpengine.com>
josephfusco
josephfusco previously approved these changes Feb 28, 2024
@josephfusco josephfusco merged commit 8040fa2 into main Feb 28, 2024
4 checks passed
@josephfusco josephfusco deleted the feat/implement-redux branch May 17, 2024 18:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants