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

Would it make sense to replace the People Directory Web part with PnP Modern Search Web parts? #673

Open
1 task done
kasperbolarsen opened this issue May 22, 2023 · 5 comments
Labels
area:provisioning Environment:SharePoint Online Environment:SharePoint Online help wanted Contributions welcome Needs: Discussion 🙋 Needs: Prototyping status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:enhancement New feature or enhancement of existing capability

Comments

@kasperbolarsen
Copy link

Category

  • Question

Question

I am wondering if it would make sense to replace the People Directory web part ( or keep both ) with a fully configured PnP Modern Search Web part like this one: https://microsoft-search.github.io/pnp-modern-search/scenarios/Create-a-useful-People-Search/

@ghost
Copy link

ghost commented May 22, 2023

Thank you for reporting this issue. We will be triaging your incoming issue as soon as possible.

@ghost ghost added the Needs: Triage 🔍 label May 22, 2023
@eoverfield
Copy link
Collaborator

Intriguing idea, it could be a great addition to the project.

  1. I'd like to see us keep the existing people search webpart as it is still a good technology demonstrator. Doesn't hurt.
  2. Creating a new page within the provisioning template that deploys the Modern Search webpart, pre-configured, would be very cool as well. It aligns well with this project as we want to demonstrate multiple approaches to provisioning customized solutions.

We would need to install the Modern Search sppkg along with the rest of the bundles, similar to our approach to MGT. That shouldn't be a concern as PnP Provisioning as used in this solution will not overwrite an existing sppkg.

@kasperbolarsen is this a PR you'd be interested in submitting?

@eoverfield eoverfield added help wanted Contributions welcome area:provisioning Needs: Discussion 🙋 Needs: Prototyping status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:enhancement New feature or enhancement of existing capability Environment:SharePoint Online Environment:SharePoint Online and removed Needs: Triage 🔍 labels May 22, 2023
@kasperbolarsen
Copy link
Author

I am deploying the PnP Modern Search almost by default as one of the steps in our Provisioning offerings, all based on the PnP Provisioning Engine.
So yes, I would be happy to promote Modern Search by adding it to the Starter Kit :-)

@kasperbolarsen
Copy link
Author

I have just deployed the starter kit on a brand new tenant, and it sure looks like the page /sites/contosoportal/SitePages/People-Directory.aspx already exists and currently isn't in use. Can I grab that page for the PnP Modern Search version of the People Directory ?

@eoverfield
Copy link
Collaborator

sounds likes a great plan to me. The provisioning template adds quite a few mostly blank pages as inspiration. Building more of these out would be a great addition.

You likely found this code, though in case you haven't or others are interested, within the provisioning template, you will find the following:

        <pnp:ClientSidePage PageName="People-Directory.aspx" Title="People Directory" Layout="Article" PromoteAsNewsArticle="false" Overwrite="true" EnableComments="false" Publish="true">
          <pnp:Header Type="Custom" ServerRelativeImageUrl="{site}/SiteAssets/page-people-directory.jpg" TranslateX="50.1336183858899" TranslateY="30" />
        </pnp:ClientSidePage>

You can add <pnp:Section /> and <pnp:Controls /> objects to the above ClientSidePage, then within a referencing the proper controlid (webpart id), you can add and configure the proper Search webparts. You will need to add the search sppkg to the app catalog within the <pnp:AppCatalog /> object, and also add the sppkg to the actual project, I suggest you follow the approach we used for mgt, i.e. ./source/mgt-spfx.

Looking forward to the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:provisioning Environment:SharePoint Online Environment:SharePoint Online help wanted Contributions welcome Needs: Discussion 🙋 Needs: Prototyping status:working-on-it Known issue / feature being addressed. Will use other "status:*" labels & comments for more detail. type:enhancement New feature or enhancement of existing capability
Projects
None yet
Development

No branches or pull requests

2 participants