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

Merge dev to main #3491

Merged
merged 49 commits into from
Feb 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
96ef091
Include WebPartTitle for SearchBox
kachihro Dec 18, 2023
7fd7960
Include WebPart Title for Search Box
kachihro Dec 18, 2023
a23c5de
PGP
kachihro Dec 18, 2023
d78ab70
fixed build issue
kachihro Dec 18, 2023
c9b0189
Include support for im: protocol
wobba Jan 2, 2024
d87f671
Fix taxonomy filters selected tag color and radio button checked state
mbice Jan 5, 2024
11b227d
Update index.md
davemehr Jan 9, 2024
ab723df
Bump follow-redirects from 1.15.3 to 1.15.4 in /search-extensibility
dependabot[bot] Jan 11, 2024
8f06632
Bump follow-redirects from 1.15.3 to 1.15.4 in /search-parts
dependabot[bot] Jan 11, 2024
f44d7a0
Update Setup-Results-web-part-to-show-birthdays.md
HiltonGiesenow Jan 11, 2024
0b2680b
#3434 Address issues
wobba Jan 11, 2024
a17bbe2
Merge pull request #3441 from microsoft-search/fix/3434
wobba Jan 11, 2024
66241cd
Merge pull request #3436 from microsoft-search/dependabot/npm_and_yar…
wobba Jan 11, 2024
018ab99
Merge pull request #3435 from microsoft-search/dependabot/npm_and_yar…
wobba Jan 11, 2024
b474c81
Merge pull request #3432 from davemehr/develop
wobba Jan 11, 2024
1e39fe9
Update filter tag color to use theme
mbice Jan 11, 2024
ff4d4a1
Update Setup-Results-web-part-to-show-birthdays.md
HiltonGiesenow Jan 11, 2024
aea42ee
Merge pull request #3429 from mbice/bugfix/issue-3421-taxonomy-filters
wobba Jan 11, 2024
f547620
Update Setup-Results-web-part-to-show-birthdays.md
wobba Jan 11, 2024
37e91f7
Merge pull request #3438 from HiltonGiesenow/patch-3
wobba Jan 11, 2024
3078967
add breadcrumb component
Jan 15, 2024
5513368
rename classes and props
Jan 15, 2024
893c730
remove duplicate import
lauribohm Jan 15, 2024
252dba0
chnages to regex and breadcrumb creation
Jan 16, 2024
6461f32
add conditional styling for breadcrumb last item
Jan 16, 2024
95653a5
change prop default value
Jan 16, 2024
73ed45c
added documentation
Jan 16, 2024
ecc0401
removed regex check
Jan 16, 2024
0f1762a
Moved custom layout to own folder +update navigation in mkdocs.yml, …
kasperbolarsen Jan 16, 2024
37e7db6
modifications in creating the breadcrumb
Jan 17, 2024
34b3671
handle overflow index out of range
Jan 17, 2024
d3db91b
clean code
Jan 17, 2024
8ce0f08
Merge pull request #3459 from kasperbolarsen/main
wobba Jan 17, 2024
43b56a2
add root site handling and new property for that
Jan 17, 2024
8d3bbe0
update documentation
Jan 17, 2024
bff8f85
clean code
Jan 17, 2024
51d1444
remove logging
Jan 17, 2024
fa91763
rename props
Jan 25, 2024
91a48be
handle DispForms and fix root site link creation
Jan 25, 2024
b93caa6
update documentation
Jan 25, 2024
71d62d0
remove webUrl from required props
Jan 25, 2024
0cbebc2
Update templating.md
HiltonGiesenow Jan 29, 2024
56ea287
Merge pull request #3476 from HiltonGiesenow/patch-6
wobba Jan 29, 2024
07a05e0
Update custom.md
HiltonGiesenow Jan 29, 2024
f9c09e9
Update index.md
HiltonGiesenow Jan 30, 2024
29a97dc
Merge pull request #3478 from HiltonGiesenow/patch-6
wobba Jan 30, 2024
42e83ff
Merge pull request #3414 from kachihro/main
wobba Feb 5, 2024
e7d24f2
Merge pull request #3455 from lauribohm/breadcrumbs-component
wobba Feb 5, 2024
d102404
Merge pull request #3477 from HiltonGiesenow/patch-7
wobba Feb 5, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
24 changes: 24 additions & 0 deletions docs/create-custom-layouts/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@



If you are looking for inspiration, you can find a selection of custom layouts in the
[Custom layouts repository](https://github.com/microsoft-search/pnp-modern-search-layouts/blob/main/README.md)

If you have a custom layout you want to share, please submit a PR to the repository.


## [Scenario Create your first custom template](create-your-first-custom-template.md)

Create your first custom template

## [Store custom templates in SharePoint](howto-store-custom-templates-in-sharepoint.md)

Storing custom templates as files in a SharePoint site, is great when you want to use them across sites and want some control.

## [Edit custom templates in SharePoint](edit-custom-templates-in-sharepoint.md)

Storing custom templates as files in a SharePoint site, is great when you want to use them across sites and want some control.

## [Edit custom templates locally in Visual Studio Code](edit-templates-using-vscode-and-onedrive.md)

When you have your templates in SharePoint, it is easy to setup a way to edit locally on your computer and still get the result in SharePoint almost instantly.
4 changes: 2 additions & 2 deletions docs/extensibility/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ From here, you can add the manifest IDs of your libraries and decide to enable o

[!["Extensibility manifests registration"](../assets/extensibility/extensibility_configuration_manifest.png){: .center}](../assets/extensibility/extensibility_configuration_manifest.png)

> Multiple librairies can be registred for a single Web Part instance allowing you to split your extensions into multiple projects (in the end, they will be all concatenated). For instance, this could be convenient when extensions come from different IT providers.
> Multiple librairies can be registered for a single Web Part instance allowing you to split your extensions into multiple projects (in the end, they will be all concatenated). For instance, this could be convenient when extensions come from different IT providers.

### Create an extensibility library

Expand Down Expand Up @@ -179,4 +179,4 @@ export class MyCustomLibraryComponent implements IExtensibilityLibrary {
}
```

In order to run the above sample code, you will need to import in your library the following npm packages: `@microsoft/sp-component-base`, `@microsoft/sp-core-library`, and `@microsoft/sp-webpart-base`.
In order to run the above sample code, you will need to import in your library the following npm packages: `@microsoft/sp-component-base`, `@microsoft/sp-core-library`, and `@microsoft/sp-webpart-base`.
2 changes: 1 addition & 1 deletion docs/extensibility/templating.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ If no placeholder is present in the template, a default one will be loaded.

> The Microsoft Graph Toolkit is a collection of reusable, framework-agnostic web components and helpers for accessing and working with Microsoft Graph. The components are fully functional right of out of the box, with built in providers that authenticate with and fetch data from Microsoft Graph.

In the solution, you can use Graph Tookit components whitout the need to re-authenticate against Microsoft Graph because the Web Parts already use the [SharePoint provider](https://docs.microsoft.com/en-us/graph/toolkit/providers/sharepoint).
In the solution, you can use Graph Tookit components without the need to re-authenticate against Microsoft Graph because the Web Parts already use the [SharePoint provider](https://docs.microsoft.com/en-us/graph/toolkit/providers/sharepoint).

Refer to the official documentation to see [all available components](https://docs.microsoft.com/en-us/graph/toolkit/components/login). For instance, we use the Microsoft Graph Toolkit for the [people layout](../usage/search-results/layouts/people.md) via `<mgt-person>`.

Expand Down
50 changes: 49 additions & 1 deletion docs/extensibility/web_components_list.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ Here are the list of all **reusable** web components you can use to customize yo
- [&lt;pnp-collapsible&gt;](#ltpnp-collapsiblegt)
- [&lt;pnp-persona&gt;](#ltpnp-personagt)
- [&lt;pnp-img&gt;](#ltpnp-imggt)
- [&lt;pnp-breadcrumb&gt;](#ltpnp-breadcrumbgt)

> All other web components you will see in builtin layout templates are considered **internal** and are not supported for custom use.

Expand Down Expand Up @@ -216,4 +217,51 @@ Here are the list of all **reusable** web components you can use to customize yo
| Parameter | Description |
| --------- | ----------- |
|**errorImage**|URL to the fallback image
|**hideOnError**|Hide image on error
|**hideOnError**|Hide image on error

## `<pnp-breadcrumb>`
- **Description**: Render a breadcrumb path of a SharePoint entity (file, item, folder, document library etc.).

!["Breadcrumb component"](../assets/extensibility/web_components/breadcrumb_component.png){: .center}

- **Usage**:

Get started with:
```html
<pnp-breadcrumb
data-path="{{OriginalPath}}"
data-site-url="{{SPSiteURL}}"
data-web-url="{{SPWebUrl}}"
data-entity-title="{{Title}}"
data-entity-file-type="{{FileType}}"
/>
```
Use all properties:
```html
<pnp-breadcrumb
data-path="{{OriginalPath}}"
data-site-url="{{SPSiteURL}}"
data-web-url="{{SPWebUrl}}"
data-entity-title="{{Title}}"
data-entity-file-type="{{FileType}}"
data-include-site-name="false"
data-include-entity-name="true"
data-breadcrumb-items-as-links="true"
data-max-displayed-items="3"
data-overflow-index="0"
data-font-size="12"
/>
```
|Parameter|Description|
|--|--|
|data-path|Used for creating the breadcrumb path. Component is designed to receive `OriginalPath` or `Path` property. Property is required for rendering the breadcrumb path. `String`|
|data-site-url|Used for creating the breadcrumb path. Component is designed to receive `SPSiteURL` property. Property is required for rendering the breadcrumb path. `String`|
|data-web-url|Used for creating the breadcrumb path. Component is designed to receive `SPWebUrl` property. Property is required for rendering the breadcrumb path. `String`|
|data-entity-title|Used for creating the breadcrumb path. Component is designed to receive `Title` property. Property is required for rendering the breadcrumb path. `String`|
|data-entity-file-type|Used for creating the breadcrumb path. Component is designed to receive `FileType` property. Property is required for rendering the breadcrumb path. `String`|
|data-include-site-name|If the site name should be included in the breadcrumb items. Optional, default value `true`. `Boolean`|
|data-include-entity-name|If the entity name should be included in the breadcrumb items. If the value is set to `false`, not only is the entity name excluded from the breadcrumb path, but also the last item in the breadcrumb path is not highlighted in bold. Optional, default value `true`. `Boolean`|
|data-breadcrumb-items-as-links|If the breadcrumb items should be clickable links to the path they represent. Optional, default value `true`. `Boolean`|
|data-max-displayed-items|The maximum number of breadcrumb items to display before coalescing. If not specified, all breadcrumbs will be rendered. Optional, default value `3`. `Int`|
|data-overflow-index| Index where overflow items will be collapsed. Optional, default value `0`. `Int`|
|data-font-size|Font size of breadcrumb items. Optional, default value `12`. `Int`|
12 changes: 4 additions & 8 deletions docs/scenarios/Setup-Results-web-part-to-show-birthdays.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,15 @@

A common requirement for intranets is to show birthdays of employees.
And as the SharePoint User Profile Application has a property for birthdays, it is a natural choice to use search to show birthdays of employees.
A common requirement for intranets is to show birthdays of employees and as the SharePoint User Profile Application has a property for birthdays, it is a natural choice to use search to show birthdays of employees. In addition, at the time of writing (2023), the Graph API does not have a property for birthdays, so we can't use the Graph API to get the information.

(as of writing this (2023), the Graph API does not have a property for birthdays, so we can't use the Graph API to get the information)

The tricky part is that in the User profile application the birthday value is store is a rather unusual datatype: "date no year"


The tricky part is that in the User profile application the birthday value is store is a rather usual datatype "date no year"

![Birthday in the User Provisioning Service](../assets/../scenarios/assets/Setup-Results-web-part-to-show-birthdays/BirthdayUPA.png)
![Birthday in the User Provisioning Service](../scenarios/assets/Setup-Results-web-part-to-show-birthdays/BirthdayUPA.png)


In my tenant the SPS-Birthday property was mapped to RefinableDate00 and the actual value in the property is 2000-[the date]:

![Managed Property value](../assets/Setup-Results-web-part-to-show-birthdays/refinabledate00.png)
![Managed Property value](../scenarios/assets/Setup-Results-web-part-to-show-birthdays/RefinableDate00.png)

(use the magnificent [SP Editor tool](https://chrome.google.com/webstore/detail/sp-editor/ecblfcmjnbbgaojblcpmjoamegpbodhd) or [SP Search Query Tool](https://github.com/pnp/PnP-Tools/blob/master/Solutions/SharePoint.Search.QueryTool/README.md) to inspect the managed properties)

Expand Down
20 changes: 1 addition & 19 deletions docs/scenarios/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,6 @@ Most search solutions require some filters (aka refiners) to allow the user to f

Search verticals can be used to selectively search specific content per vertical. Using the SharePoint provider you can use result sources to limit the content returned, or you can add the required KQL in the web part itself. This sample shows how to set up multiple search verticals on different pages.

## [Scenario Create your first custom template](create-your-first-custom-template.md)

Create your first custom template

## [Store custom templates in SharePoint](howto-store-custom-templates-in-sharepoint.md)

Storing custom templates as files in a SharePoint site, is great when you want to use them across sites and want some control.

## [Edit custom templates in SharePoint](edit-custom-templates-in-sharepoint.md)

Storing custom templates as files in a SharePoint site, is great when you want to use them across sites and want some control.

## [Edit custom templates locally in Visual Studio Code](edit-templates-using-vscode-and-onedrive.md)

When you have your templates in SharePoint, it is easy to setup a way to edit locally on your computer and still get the result in SharePoint almost instantly.

## [Create a search page with verticals (within the same page)](Create-a-search-page-with-verticals-within-the-same-page.md)

Expand All @@ -48,17 +33,14 @@ With the Modern Search Web Parts you can create a simple and useful Department W
## [Use query rules for promoted links](Use-query-rules-for-promoted-links.md)
With the Modern Search Web Parts you can show promoted links for important results. They will be configured with query rules in the SharePoint Search Admin Center. Promoted results will show users more informations and direct links about specific, predefined, terms they searching for.

## [Use query string from url for dynamic results](use-query-string-in-url.md)
This scenario describes how to use query string as value in the URL from the current page. You can use URL query string parameters to build dynamic search pages.
Use a library with metadata that you can use the query string parameter in the URL.



## [Setup Results web part to show birthdays](Setup-Results-web-part-to-show-birthdays.md)
A common request in any intranet is to show birthdays of employees. This scenario describes how to use stock SharePoint search to show birthdays of employees in the search results.


## [Setup Results web part to show work anniversaries](Setup-Results-web-part-to-show-work-anniversaries.md)

Showing the work anniversaries of employees is a common request in any intranet. This scenario describes one way to achive this using a sleight of hand trick/cheating as the search index does not contains the information we need.

---
Expand Down
2 changes: 1 addition & 1 deletion docs/usage/search-results/layouts/custom.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The 'Custom' layout is a minimal layout to start with if you want to create your own customized UI from scratch.

You can also start from an existing layout by first selecting it, and then click `{}` next to the *Edit results tempalte* field. This will copy the selected template and allow you to make modifications as needed.
You can also start from an existing layout by first selecting it, and then click `{}` next to the *Edit results template* field. This will copy the selected template and allow you to make modifications as needed.

!["Custom layout"](../../../assets/webparts/search-results/layouts/custom_layout.png){: .center}

Expand Down
4 changes: 2 additions & 2 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ nav:
- Introduction: index.md
- Installation: installation.md
- Scenario tutorials: scenarios/index.md
- Create custom layouts: create-custom-layouts/index.md
- How to contribute?: how-to-contribute.md
- Building documentation: build-the-doc.md
- Search Results:
Expand Down Expand Up @@ -33,8 +34,7 @@ nav:
- Custom event handlers for adaptive cards actions: extensibility/adaptivecards_customizations.md
- Custom data sources: extensibility/custom_data_sources.md
- Custom query modifier: extensibility/custom_query_modifications.md
- Version 3:
- Documentation: v3/index.md

theme:
name: 'material'
features:
Expand Down
12 changes: 6 additions & 6 deletions search-extensibility/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading