-
Notifications
You must be signed in to change notification settings - Fork 194
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: remove ClassicEditor from window.givewp.form.components and use the new @givewp/form-builder-library npm package #7122
Conversation
@glaubersilva is any currently released add-on using this component? technically this was released in the latest version of GiveWP so we need to be extra careful about removing it. |
@jonwaldstein Only the FFM and Tributes addon was using it, but the PRs that implemented it still weren't released, so we are safe. The other addon that uses a component with the same name is the PDF Receipts, but it also uses its own version of this component. You can double-check it here: https://github.com/search?q=org%3Aimpress-org%20ClassicEditor&type=code |
@glaubersilva just to be safe, let's hold off merging this until the add-ons are not referencing this component through the window on their develop branches. |
…givewp/form-builder-library folder
@jonwaldstein This is ready for re-review. |
src/FormBuilder/resources/js/form-builder/src/blocks/fields/amount/inspector/index.tsx
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Beautiful! ready for QA 🌈
This reverts commit 88785ea.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Passed manual QA tests.
Resolves GIVE-140
Description
The
ClassicEditor
was previously mounted in the window global object to prevent code duplication in the addons.But it also introduces a few problems like forcing bumping the minimum Give core version in the addons, and other problems related to possible changes of the components in the core that can break functionalities in the addons.
In the future, a JS package will be released to share the components between the addon without major issuesBut for now, was decided to remove this component from the global window object and fork it in each addon that needs to use it.So, this PR removes this component from the global window object and also replaces some components with the ones shipped with the
@givewp/form-builder-library
npm package.This PR also changes the
OptionsPanel
component used in the donations levels and name title prefixes to the version shipped with the new package.Affects
window.givewp.form.components
property.Testing Instructions
To test the addons that were using the ClassicEditor component mounted in the window global object, check out these two PRs:
https://github.com/impress-org/give-tributes/pull/324
https://github.com/impress-org/give-form-field-manager/pull/416
Pre-review Checklist
@unreleased
tags included in DocBlocks