Skip to content
This repository has been archived by the owner on May 5, 2020. It is now read-only.

Fix for example plugin #23

Merged
merged 7 commits into from
Nov 21, 2017

Conversation

prinzdezibel
Copy link
Contributor

The example plugin had different bugs which were fixed:

  • CartSubTotal is now a React component
  • Route permissions are no longer maintained in Shop collection, but in Groups collection
  • Header and Footer are now React components

Refactored:

  • aboutUs view is now a React component

…oken due

to refactoring. Things changed:
a) The navigation bar is now a React component
b) The default route permissions are no longer
maintained in Shop collection, but a dedicated Group collection

This closes the error reported here: https://forums.reactioncommerce.com/t/reaction-example-plugin-not-working/623
Changes:
1) Replace footer and header templates with React components that are
sourced dynamically from registry's layout definitions.
2) Static page 'AboutUs' is now a React component
3) Fix for static page /about which pulled in wrong layout because of
   non-matching workflow value in register.js

Note: This change depends on register.js changes in core to work
propertly. Also it requires to be the core's footer React component
to be existent and registered as `Footer`.
Blaze template instead of new React component CartSubTotal.
@prinzdezibel
Copy link
Contributor Author

@zenweasel I actually would retain the blue 'Debug bar' as it gives the developer a hint, what's going on under the hood.

@piizei
Copy link

piizei commented Nov 15, 2017

I'm getting a following error from this branch:
Uncaught Error: Component 'Footer' not found. Use registerComponent to create it.
at _replaceComponent (components.js:116)
at footer.js (footer.js:17)

Footer.js in the trace is the footer.js from this plugin.

I just did reaction init (with latest version of npm tool), and cloned this branch into imports/plugins/custom.

Am I doing something wrongly?

@prinzdezibel
Copy link
Contributor Author

@piizei This PR depends on another PR (reactioncommerce/reaction#3257) in core, which isn't approved yet.

Copy link
Collaborator

@brent-hoover brent-hoover left a comment

Choose a reason for hiding this comment

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

Tested. Verified fixed.

@brent-hoover brent-hoover merged commit 139b12d into master Nov 21, 2017
@brent-hoover brent-hoover deleted the michael-fix-issue-example-plugin-not-working branch November 21, 2017 03:04
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.

3 participants