pnp / cli-microsoft365

Manage Microsoft 365 and SharePoint Framework projects on any platform
https://aka.ms/cli-m365
MIT License
882 stars 312 forks source link

Extends m365 spo homesite set VivaConnectionsDefaultStart #4480

Closed reshmee011 closed 1 year ago

reshmee011 commented 1 year ago

Usage

m365 spo homesite set -u siteurl --vivaConnectionsDefaultStart true

Description

Sets the home site to the provided site collection url and keeps the Viva Connections landing experience to the SharePoint home site.

Options

Option Description
--vivaConnectionsDefaultStart [vivaConnectionsDefaultStart] Boolean to turn on and off the Viva Connections Experience to the Home Site

Examples

Sets the home site to the provided site collection url and keeps the Viva Connections landing experience to the SharePoint home site.

m365 spo homesite set --siteUrl https://contoso.sharepoint.com/sites/comms --vivaConnectionsDefaultStart $true

Default properties

"The Home site has been set to [siteUrl] and the Viva Connections default experience to True. It may take some time for the change to apply. Check aka.ms/homesites for details."

Jwaegebaert commented 1 year ago

Interesting enhancement to implement @reshmee011. Before we continue with the PR, let's clarify a few more things in the specs.

-v, ----VivaConnectionsDefaultStart [VivaConnectionsDefaultStart] | Boolean to turn on and off the Viva Connections Experience to the Home Site

The option here should only use two dashes instead of four, so let's change that. Another thing for the option, it should follow the lowerCamelCase naming convention, something like this vivaConnectionsDefaultStart. I'm also not quite sure of the wording for this option. Maybe something like --enableVivaConnections could be clearer, what do you think?

The short option is not really required here, in my opinion, so let's use it without a short option.

EXAMPLE 2

We don't need a different heading for each example, so you can leave this out.

m365 spo homesite set --siteUrl https://contoso.sharepoint.com/sites/comms --VivaConnectionsDefaultStart $true

Let's use the value true instead of $true

reshmee011 commented 1 year ago

@Jwaegebaert : thanks for reviewing the specs and I have updated them accordingly. I am not sure about the suggested wording "enableVivaConnections" as it can be confusing to it's intention. More info on the suggested parameter is https://learn.microsoft.com/en-us/viva/connections/edit-viva-home. I am trying to stick to the wording MS has come with Set-SPOHomeSite, i.e. vivaConnectionsDefaultStart Yeps, the boolean value needs to be just true:).

Jwaegebaert commented 1 year ago

Good catch, let's leave it at enableVivaConnections then. 👍

martinlingstuyl commented 1 year ago

Hi @reshmee011, I've got a few small comments on the specs.

First: I'm having trouble to understand what it does :-) Could we update the description somewhat, to clarify the intent? I think we should consider adding a link to the documentation as well. We might even add two examples instead of one, so you can describe for true as well as false what this does.

Second: Don't forget adding the option to the types.booleans array. (Check out other set commands) This will mean we can use true, false, $true, $false, 1, 0 etc as boolean values.

reshmee011 commented 1 year ago

@martinlingstuyl : Hope you are doing well. Thanks for the review. A couple of links about the feature which was announced back in Oct 2022 and finally in GA beginning of this year: https://learn.microsoft.com/en-us/powershell/module/sharepoint-online/set-spohomesite?view=sharepoint-ps https://www.youtube.com/watch?v=9ibKk3rrjns https://www.youtube.com/watch?v=fHy1K0MRUiY&list=PLR9nK3mnD-OUQOW86tT5dkCRQAVGY7DlH

I can include the first link in the documentation.

I will add the additional example and look into the types.boolean array before implementing it.

martinlingstuyl commented 1 year ago

Hi @reshmee011, Ok, let's use the description for the powershell option here as well:

When set to true, the VivaConnectionsDefaultStart option will keep the Viva Connections landing experience to the SharePoint home site. If set to false, the Viva Connections home experience will be used.

reshmee011 commented 1 year ago

@martinlingstuyl : cool I will let you know when it is ready to be reviewed.:)