Implementation of edit frame component for sitecore-jss-react #290
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I miss edit frames. I implemented a new component to allow the placement of edit frames in Sitecore JSS applications built with React.
Shout out @jammykam for this blog post that helped with some of the meta data: https://jammykam.wordpress.com/2017/09/11/glass-edit-frame-immediately-invoking-wrapper/.
Description
Implemented a new component named
FieldEditFrame
that allows you to pass in anitemId
and an array offields
and the component will generate the HTML markup necessary for displaying the edit frame in Experience Editor.By default this uses the standard
Edit
Sitecore command fromcore
({70C4EED5-D4CD-4D7D-9763-80C42504F5E7}
) and passes in thefields
prop values to the command, which then will build out and display the edit frame modal.Some values have defaults but can be overwritten by props on the component itself. Defaults were used to try to make this component as easy to use as possible.
Motivation
I miss edit frames and I always enjoyed using them doing traditional MVC/WebForms development and I think they still have a place even with JSS built apps.
How Has This Been Tested?
Manually, only locally.
Types of changes
Checklist: