-
Notifications
You must be signed in to change notification settings - Fork 327
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
Comments
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 |
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. |
@sympmarc I do see where you're coming from. I have an idea I'll explore, and then get back to you :) |
@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 |
@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. |
I remember have tried this long time ago but without success. Hope you will find way to get it work correctly ;) |
That's definitely along the lines I was thinking. It even gives us a way to put some source control around our settings! |
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. |
If you look at https://github.com/pnp/sp-dev-fx-property-controls/blob/master/src/propertyFields/propertyEditor/PropertyPanePropertyEditorHost.tsx#L46 DynamicProperties are excluded. |
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. |
Forgot to tag this issue on the release notes when I added the code for this yesterday. Updated :) |
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.
The text was updated successfully, but these errors were encountered: