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

Support plugins directly registering React components #4875

Merged
merged 6 commits into from
Dec 15, 2018

Conversation

aldeed
Copy link
Contributor

@aldeed aldeed commented Dec 13, 2018

Impact: minor
Type: feature

Issue

Previously you had to make a Blaze template to wrap a React component in order to register it for "paymentSettings", "taxSettings", "marketplaceMerchantSettings", or "coreOrderShipmentWorkflow" UI extension.

Solution

Now a plugin can directly register template: "SomeReactTemplate" for these UI areas as long as "SomeReactTemplate" matches how it was registered with the first argument of registerComponent.

Breaking changes

None. Registering a Blaze template name still works, too.

Testing

  1. Verify that the affected UI areas still display and function properly with the standard installation.
  2. Verify that a React component name can be passed as the template option for at least one of these areas. If you alter an existing plugin to test this, you'll also need to drop the Packages collection and restart since packages that already exist aren't updated on startup.

@aldeed aldeed self-assigned this Dec 13, 2018
@aldeed aldeed added this to the 🏔 Shavano milestone Dec 13, 2018
@aldeed aldeed requested a review from kieckhafer December 13, 2018 18:06
@aldeed aldeed changed the base branch from release-2.0.0-rc.8 to develop December 14, 2018 20:10
Copy link
Member

@kieckhafer kieckhafer 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. For testing purposes, I swapped the Tax settings Blaze template with a React AccountsDashboard component, worked as it should!

👍

reaction

@kieckhafer kieckhafer merged commit 8e4fea7 into develop Dec 15, 2018
@kieckhafer kieckhafer deleted the feat-aldeed-support-react-registry branch December 15, 2018 03:40
@spencern spencern mentioned this pull request Jan 18, 2019
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.

2 participants