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

New command: add client-side web part to modern page #366

Closed
waldekmastykarz opened this issue Mar 13, 2018 · 8 comments

Comments

3 participants
@waldekmastykarz
Copy link
Member

commented Mar 13, 2018

Add client-side web part to modern page

  • command: spo page clientsidewebpart add -n|--pageName <pageName> -u|--webUrl <webUrl> --standardWebPart [standardWebPart] --webPartId [webPartId] --webPartProperties [webPartProperties] --section [section] --column [column] --order [order]
  • pageName: name of the page to add the web part to
  • webURL: URL of the site where the page to edit is located
  • standardWebPart: set to add one of the standard SharePoint web parts. Available values: ThirdParty|ContentRollup|BingMap|ContentEmbed|DocumentEmbed|Image|ImageGallery|LinkPreview|NewsFeed|NewsReel|PowerBIReportEmbed|QuickChart|SiteActivity|VideoEmbed|YammerEmbed|Events|GroupCalendar|Hero|List|PageTitle|People|QuickLinks|CustomMessageRegion|Divider|MicrosoftForms|Spacer
  • webPartId: set to add a custom web part
  • webPartProperties: JSON string with web part properties to set on the web part
  • section: number of section to which the text should be added (1 or higher)
  • column: number of column in which the text should be added (1 or higher)
  • order: order of the section
  • specify standardWebPart or webPartId but not both

For more information see the Add-PnPClientSideWebPart cmdlet.

@rdorrani

This comment has been minimized.

Copy link

commented May 24, 2018

Hi @waldekmastykarz

Is there an option coming to add the Stream web part?

@waldekmastykarz

This comment has been minimized.

Copy link
Member Author

commented May 25, 2018

@rdorrani Using the Office 365 CLI you mean?

@ypcode

This comment has been minimized.

Copy link
Collaborator

commented Jun 20, 2018

Hi @waldekmastykarz,

Since I am pretty familiar with the PnP Sites core/PowerShell implementation, I can start working on a portage.
However I can see the #364 is in progress, since it is highly related, Should I wait for it to be completed ?

Regards,
Yannick

@ypcode

This comment has been minimized.

Copy link
Collaborator

commented Jun 20, 2018

Actually, If I go with the existing @pnp/js methods, that would be fine, I'll come up with something, just tell me if I need to espcially care about anything :)

[EDIT] I just noticed the @pnp/js is not in the dependencies, is there a will not to use it, or just that is not been used yet?

@waldekmastykarz

This comment has been minimized.

Copy link
Member Author

commented Jun 20, 2018

@ypcode we're trying to keep the dependencies to the minimum and have consistent implementation across all commands. We borrowed some code from PnPJS for parsing the field contents but not for calling the API, that will stay implemented as a REST call.

@waldekmastykarz

This comment has been minimized.

Copy link
Member Author

commented Jun 20, 2018

Regarding #364, I don't think you'd need to wait for the implementation of that command. Using the available pieces, you should be able to implement this command by itself.

@ypcode

This comment has been minimized.

Copy link
Collaborator

commented Jun 20, 2018

@waldekmastykarz

This comment has been minimized.

Copy link
Member Author

commented Jun 20, 2018

Perfect! Looking forward to the PR and please, don't hesitate to reach out if you have any questions, either here or on gitter

@waldekmastykarz waldekmastykarz moved this from Backlog to In progress in New CLI Commands Jun 20, 2018

@waldekmastykarz waldekmastykarz moved this from In progress to In review (done / not merged) in New CLI Commands Jul 4, 2018

@waldekmastykarz waldekmastykarz added this to the v1.5.0 milestone Jul 19, 2018

@waldekmastykarz waldekmastykarz moved this from In review (done / not merged) to Done (merged) in New CLI Commands Jul 19, 2018

phawrylak added a commit to phawrylak/office365-cli that referenced this issue Sep 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.