-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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: move navigation plugin into npm #6118
Conversation
Signed-off-by: Erik Kieckhafer <[email protected]>
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.
LGTM
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
NavigationItem, | ||
NavigationTree, | ||
NavigationTreeItem | ||
} from "@reactioncommerce/plugin-navigation/src/simpleSchemas.js"; |
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.
@aldeed this works, just wondering if this is how we want to import simpleSchemas from outside packages, or if there was something else in mind?
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.
@kieckhafer This would be fine. I had kind of hoped that when we got to this we'd start moving the integration tests out of this repo and into their respective package repos, but we have some work to do yet before that can happen.
@aldeed does the failing GraphQL issue mean we need to move that part of the |
Signed-off-by: Erik Kieckhafer <[email protected]>
@kieckhafer Yes I think the correct solution in this case is to cut the following out of the shop schema file, and add it to the nav package schema file within "The default navigation tree for this shop"
defaultNavigationTree(
"Navigation tree language"
language: String!,
"Whether to include secondary navigation items"
shouldIncludeSecondary: Boolean = false
): NavigationTree
"The ID of the shop's default navigation tree"
defaultNavigationTreeId: String |
And move all related resolvers into that plugin package, too. |
…moveNavigationPlugin
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
Signed-off-by: Erik Kieckhafer <[email protected]>
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.
confirmed it still works
@spencern this is good to go, outside of the |
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.
Override approval of license failure.
@@ -28,6 +28,7 @@ | |||
"@reactioncommerce/logger": "~1.1.2", | |||
"@reactioncommerce/nodemailer": "~5.0.5", | |||
"@reactioncommerce/plugin-authentication": "~1.0.0", | |||
"@reactioncommerce/plugin-navigation": "~1.0.2", |
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.
This is the plugin that is getting flagged by snyk's license check as GPLv3. We've kept the GPLv3 license that this code was originally licensed under after migrating it to it's own package. We'll need to merge this code anyway and then add an ignore to snyk for this particular package.
Resolves #6127
This PR removes the internal
navigation
plugin, and installs the newplugin-navigation
as a replacement.The code in that npm plugin is the same, so the expected outcome of this PR is seeing nothing different than how the app currently runs.
Running this query will show you the
defaultNavigationTreeId
, which has moved into the new package. If this query works, you should be good to go: