Skip to content

Commit fcd25bf

Browse files
elisenyangElise Yangbeth-panxnmetulevsebastienlevert
authored
Add mgt-picker spec (#1334)
Co-authored-by: Elise Yang <[email protected]> Co-authored-by: Beth Pan <[email protected]> Co-authored-by: Nikola Metulev <[email protected]> Co-authored-by: Sébastien Levert <[email protected]>
1 parent 58966be commit fcd25bf

File tree

2 files changed

+84
-0
lines changed

2 files changed

+84
-0
lines changed
11.6 KB
Loading

specs/mgt-picker.md

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
# mgt-picker
2+
3+
## Overview
4+
The picker is a component that queries multiple Microosft Graph APIs to match a text string inputed by the user to allow the selection of a single resource. The picker will support a predefined list of resources and the developer will be able to specify which entities they would like each instance of the picker to query for and render results for. We will prioritize based on user scenarios and continue to add support for entities as needed to support those scenarios.
5+
6+
## User Scenarios
7+
8+
### Sharing via Teams (P0)
9+
10+
**Resources:** People (users only), Teams Channels, Teams Chats
11+
12+
<img src="./images/mgt-picker-teams-sharing-flow.png"/>
13+
14+
15+
### Other potential scenarios to be prioritized
16+
- Sharing via email (people, groups)
17+
- Sites and One Drive locations
18+
- Files
19+
- Send a Teams chat (people, chats)
20+
- Search suggestions (suggestions, people, files)
21+
22+
## Supported Resources
23+
- People (users only) - P0
24+
- Teams Channels - P0
25+
- Teams Chats - P0
26+
- People (contacts)
27+
- Groups
28+
- Sites
29+
- Files
30+
- Lists
31+
- Messages
32+
- Search Suggestions
33+
34+
## Proposed Solution
35+
36+
### Example: people, channels, chats
37+
`<mgt-picker entity-types="people,channels,chats" max-results="5"></mgt-picker>`
38+
39+
`<mgt-picker entity-types="people,channels,chats" max-results="5,3,3"></mgt-picker>`
40+
41+
### Example: people and channels
42+
`<mgt-picker entity-types="people,channels" max-results="5"></mgt-picker>`
43+
44+
### Example: channels and chats
45+
`<mgt-picker entity-types="channels,chats" max-results="5"></mgt-picker>`
46+
47+
### Example: people only
48+
`<mgt-picker entity-types="people" max-results="5"></mgt-picker>`
49+
50+
## Properties and Attributes
51+
52+
| Attribute | Property | Description | Values |
53+
| --------- | -------- | ----------- | ------ |
54+
| entity-types | entityTypes | Specify the entities to be rendered in the picker. They will be rendered in the order they are listed. | `people`, `channels`, `chats` |
55+
| show-max | showMax | Specify the number of results to show for each entity type | Number or array of number, order corresponding to entity-types |
56+
57+
## Templates
58+
59+
| Data type | Data Context | Description |
60+
| --- | --- |--- |
61+
| default | null: no data | The template used to override the rendering of the entire component. |
62+
| loading | null: no data | The template used to render the state of the picker while the request to Graph is being made |
63+
| error | null: no data | The template used if search returns no results. |
64+
| input-text | null: no data | The template used to render the default text inside of the input box. |
65+
| person | person: the person details object | The template used to render people in the dropdown. |
66+
| channel | channel: the channel object | The template used to render channels in the dropdown. |
67+
| chats | chat: the chat object | The template used to render channels in the dropdown. |
68+
| selected-item | selectedItem: the selected item object | The template used to render the selected item inside the input box. |
69+
70+
71+
## APIs and Permissions
72+
73+
| API | Use When | Permissions |
74+
| --- | --- | --- |
75+
| GET [/me/people](https://docs.microsoft.com/en-us/graph/api/user-list-people?view=graph-rest-1.0&tabs=http) | entity-types includes people | People.Read |
76+
| GET [/me/joinedTeams](https://docs.microsoft.com/en-us/graph/api/user-list-joinedteams?view=graph-rest-1.0&tabs=http) | entity-types includes channels | Team.ReadBasic.All |
77+
| GET [/teams/${id}/channels](https://docs.microsoft.com/en-us/graph/api/channel-list?view=graph-rest-1.0&tabs=http) | entity-types includes channels | Channel.ReadBasic.All |
78+
| GET [/me/chats](https://docs.microsoft.com/en-us/graph/api/chat-list?view=graph-rest-1.0&tabs=http) | entity-types includes chats | Chat.ReadBasic.All |
79+
80+
## Events
81+
82+
| Event | When it is fired |
83+
| --- | --- |
84+
| selectionChanged | Fired when the user makes a change in selection |

0 commit comments

Comments
 (0)