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

Export / Import Capability for Web Part Configuration #761

Closed
sympmarc opened this issue Feb 9, 2021 · 12 comments
Closed

Export / Import Capability for Web Part Configuration #761

sympmarc opened this issue Feb 9, 2021 · 12 comments
Assignees
Labels
enhancement New feature or request

Comments

@sympmarc
Copy link
Contributor

sympmarc commented Feb 9, 2021

Is your feature request related to a problem? Please describe.

As I was working on the issue #759, it occurred to me that it would be great if we could somehow export the settings from one MSWP for import to another.

Describe the solution you'd like

Take my example in #759: I want to have a modern search -enabled page in each Hub Site, which is scoped to that Hub Site. I'm taking advantage of the great capabilities in the v4 Web Parts, of course. Those capabilities are myriad, and remembering exactly which settings it took to get to a particular solution is difficult.

Describe alternatives you've considered

I can open the two pages in two browser tabs and copy/paste from one to the other, of course, and that's what I will probably do. But that is error prone and I'm not that reliable. :)

I could clone the page with ShareGate or PowerShell.

But think of the Power User who doesn't have the tools or skills and would like to reproduce functionality in multiple locations.

@wobba
Copy link
Collaborator

wobba commented Feb 10, 2021

What you are looking for is the classic export web part feature, so I think getting this in the SPFx framework is a better approach.

Right now I'm more inclined to have docs describe how to use Add-PnPClientSideWebPart etc to solve it.

@wobba wobba added the documentation Improvements or additions to documentation label Feb 10, 2021
@sympmarc
Copy link
Contributor Author

I'm thinking about it a little differently. If we could export the configuration settings and then import them into another like Web Part, it would make life easier.

I see what you mean about pushing it up a level. But having an exported JSON file give up more options, IMO.

@wobba
Copy link
Collaborator

wobba commented Feb 11, 2021

@sympmarc I do see where you're coming from. I have an idea I'll explore, and then get back to you :)

@FranckyC
Copy link
Collaborator

@wobba @sympmarc something like this https://pnp.github.io/sp-dev-fx-property-controls/controls/PropertyPanePropertyEditor? In this case, we need to ensure dynamic data properties are correctly handled

@wobba
Copy link
Collaborator

wobba commented Feb 11, 2021

@FranckyC that was exactly what I was planning to explore 😅 I think we could just add this control, and if it works it works, if not for some dynamic stuff, too bad. Get's you well underway.

@FranckyC
Copy link
Collaborator

I remember have tried this long time ago but without success. Hope you will find way to get it work correctly ;)

@wobba wobba added enhancement New feature or request and removed documentation Improvements or additions to documentation labels Feb 12, 2021
@sympmarc
Copy link
Contributor Author

That's definitely along the lines I was thinking. It even gives us a way to put some source control around our settings!

@wobba
Copy link
Collaborator

wobba commented Feb 12, 2021

The control works ok.. testing on v3.18 now, but it doesn't persist the dynamic connection. I know that works using PnP templates, so probably a runtime thing which I'll look into a bit more.

@wobba
Copy link
Collaborator

wobba commented Feb 12, 2021

@wobba
Copy link
Collaborator

wobba commented Feb 12, 2021

Logged pnp/sp-dev-fx-property-controls#331 to support Page context dynamic data at least. Which means scenarios where you use query param or nav bar search box you can export/import. For connected web parts you would need to make the connection manually afterwards.

@sympmarc
Copy link
Contributor Author

sympmarc commented Jun 3, 2021

@wobba @FranckyC et al: Looks like v4.2.1 adds this? I see it listed in the v3 release notes, but not v4.2.1 Thanks for doing this!

@wobba
Copy link
Collaborator

wobba commented Jun 4, 2021

Forgot to tag this issue on the release notes when I added the code for this yesterday. Updated :)

@wobba wobba closed this as completed Jun 4, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants