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

Implementation of edit frame component for sitecore-jss-react #290

Closed
wants to merge 1 commit into from

Conversation

erzr
Copy link
Contributor

@erzr erzr commented Nov 18, 2019

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 an itemId and an array of fields 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 from core ({70C4EED5-D4CD-4D7D-9763-80C42504F5E7}) and passes in the fields 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have read the Contributing guide.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.

Copy link
Contributor

@sc-antonkulagin sc-antonkulagin left a comment

Choose a reason for hiding this comment

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

For us have it as a framework feature we need this logic also be provided for Angular and Vue. We can look into implementing it in a future, but if you could provide it implementation it would speed up this pull request.

@stale
Copy link

stale bot commented May 3, 2022

This has been automatically marked as stale because it has not had recent activity. It will be closed if there is no further activity within 30 days. You may add comments or the 'keep' label to prevent it from closing. Thank you for your contributions.

@stale stale bot added the stale label May 3, 2022
@kleinand
Copy link

kleinand commented May 3, 2022

What's the status of this ticket here?
I also faced the issue that next.js JSS is not providing any Custom Edit Frame capabilities which are often needed for component datasource subitems used in list, link lists, accordions and tabs etc.
Because of that I found this PR and used it with adaptions to provide several commands instead of using only one button for field editing!

@stale stale bot removed the stale label May 3, 2022
@mjarosch
Copy link
Contributor

mjarosch commented Nov 18, 2022

@erzr I pulled this into a project I am working on and it's great. I had to make some updates and would like to expand on it, including doing the requested angular and vue versions. Are you ok with me using this as a base for this work?

@kleinand Was supporting multiple buttons the only adaption you made? or are there others that should be included?

@erzr
Copy link
Contributor Author

erzr commented Nov 29, 2022

@mjarosch glad to hear its working well for you! i won't be doing anything further with this PR so i'm happy to close it if you would like to open a new one with the enhancements and additional versions.

@art-alexeyenko
Copy link
Contributor

art-alexeyenko commented Feb 20, 2023

Closing this, edit frame is not merged into dev. (#1342)
Thank you @erzr and @mjarosch for your contributions!

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.

5 participants