Skip to content
This repository has been archived by the owner on Oct 16, 2023. It is now read-only.

Refactor: form builder to use wp-scripts #180

Merged
merged 6 commits into from
May 10, 2023

Conversation

jonwaldstein
Copy link
Contributor

@jonwaldstein jonwaldstein commented May 10, 2023

Description

This updates the form builder build process to use wp-scripts when loaded from the plugin. This is necessary to offload dependency management to WordPress for use with custom external blocks.

Affects

The form builder will not use the WordPress installation to load dependencies / gutenberg scripts. Some imports that were coming directly from a package that is not publicly exposed were relocated and/or forked.

The main noticeable difference here is the secondary sidebar / block inserter. It was too much of a rabbit hole to fork the components we were using so it is now simplified with the <Library /> component that WP core and the isolated editor are using.

Visuals

Screenshot 2023-05-10 at 11 56 50 AM Screenshot 2023-05-10 at 11 10 12 AM

Testing Instructions

  • Pull branch and run `npm install && npm run build'
  • Open or create a next gen form and use the builder
  • Everything should work the same except the block inserter/secondary sidebar which only shows child blocks when cursor is selecting section inner blocks in canvas.

Pre-review Checklist

  • Acceptance criteria satisfied and marked in related issue
  • Relevant @unreleased tags included in DocBlocks
  • Includes unit tests
  • Reviewed by the designer (if follows a design)
  • Self Review of code and UX completed

@jonwaldstein jonwaldstein marked this pull request as ready for review May 10, 2023 15:14
@jonwaldstein
Copy link
Contributor Author

@kjohnson this is ready for review.

Copy link
Member

@kjohnson kjohnson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@jonwaldstein jonwaldstein merged commit 25b01ee into develop May 10, 2023
@jonwaldstein jonwaldstein deleted the refactor/form-builder-bundle branch May 10, 2023 20:12
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants