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

Remove dependency on Fieldmanager and manually create admin pages #97

Open
nikkifurls opened this issue Apr 2, 2024 · 4 comments · May be fixed by #121
Open

Remove dependency on Fieldmanager and manually create admin pages #97

nikkifurls opened this issue Apr 2, 2024 · 4 comments · May be fixed by #121
Assignees
Labels
enhancement New feature or request gutenberg Requires understanding Gutenberg php Requires understanding PHP

Comments

@nikkifurls
Copy link
Contributor

nikkifurls commented Apr 2, 2024

Description

Currently, Fieldmanager is used to generate the admin settings pages for WP Newsletter Builder.

We should remove the dependency on Fieldmanager and manually create the settings pages in the admin.

Use Case

When a developer installs WP Newsletter Builder they should not need to install any other plugins.

Comments

We could explore using Gutenberg for this edit page.

@nikkifurls nikkifurls added the enhancement New feature or request label Apr 2, 2024
@nikkifurls nikkifurls self-assigned this Apr 2, 2024
@kevinfodness kevinfodness added php Requires understanding PHP gutenberg Requires understanding Gutenberg labels May 1, 2024
@kevinfodness
Copy link
Member

For Alley folks, here is an example of where we did something similar (building an admin interface using Gutenberg on a settings page): https://l.alley.dev/2cdafe0d6c

@kevinfodness
Copy link
Member

Would be good to use the useOption hook: https://github.com/alleyinteractive/alley-scripts/tree/main/packages/block-editor-tools/src/hooks/use-option

If we need to develop other hooks or helpers for working with settings pages using the Gutenberg editor, this would be a good opportunity to build those out in block-editor-tools (create additional issues in that repo to handle, then use them here).

@nikkifurls
Copy link
Contributor Author

I expect a solution for this to be ready to review within the next couple of weeks! 👍

@nikkifurls
Copy link
Contributor Author

The PR for this is updated, but is not ready for review.

I am working through an issue on the "Email Types" page, where the call to onChange(), which is defined in the useOption() hook, is not causing the component to refresh, which results in form values being unable to be updated. This functionality normally works properly if the value being updated is a scalar type. But in this case, the value is an array, and it isn't working properly. (@mboynes or @kevinfodness if you have any ideas on this issue, I'd love to hear them!)

In addition to resolving that issue, in order to get this across the finish line, we also need to:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request gutenberg Requires understanding Gutenberg php Requires understanding PHP
Projects
None yet
2 participants