-
Notifications
You must be signed in to change notification settings - Fork 279
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
[Next.js] XMC Forms support without BYOC #2052
base: dev
Are you sure you want to change the base?
Conversation
api={{ | ||
edge: { | ||
contextId: config.sitecoreEdgeContextId, | ||
edgeUrl: config.sitecoreEdgeUrl, | ||
}, | ||
}} |
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.
Added a new file because of this portion
@@ -14,6 +14,10 @@ const monorepoPlugin = (nextConfig = {}) => { | |||
'./node_modules/@sitecore-feaas/clientside/dist/browser/react.esm.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.
Workaround for "monorepo" setup, since we need to reference the same package
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 well thought out, considering the limitations of double SXP/XMC requirement.
I only have one concern over worst-case scenario and logging around it, please see my comment
if (isEditing) { | ||
if (error) { | ||
return ( | ||
<div className="sc-jss-placeholder-error">There was a problem loading this section</div> |
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.
Let's add some guidance to this message, i.e.
"There was a problem loading this section. Check debug logs for sitecore-jss:form
for more details"
Or perhaps we can log the caught error in console? While debug log will have entries from loadForm
exceptions, user won't know what happened if somehow context.api.edge
is undefined.
Description / Motivation
Core
Form
utilities to enable shared logic across different implementations.React Form
Form
component.SitecoreContext
to support a globalapi
configuration. This is currently necessary for theForm
component to perform requests.Angular Form
styles
andRenderingIdentifier
parameters.Form
functionality from thesitecore-jss
package.Testing Details
Types of changes