@czi-sds/mcp 0.2.2 → 0.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (50) hide show
  1. package/data/zeroheight-cache.json +5195 -0
  2. package/data/zeroheight-exports/Accordion.md +675 -0
  3. package/data/zeroheight-exports/Banner.md +576 -0
  4. package/data/zeroheight-exports/Borders.md +118 -0
  5. package/data/zeroheight-exports/Buttons.md +2260 -0
  6. package/data/zeroheight-exports/Callout.md +756 -0
  7. package/data/zeroheight-exports/Colors.md +633 -0
  8. package/data/zeroheight-exports/Content-Card.md +162 -0
  9. package/data/zeroheight-exports/Contributing-to-SDS.md +99 -0
  10. package/data/zeroheight-exports/Control-Inputs.md +2066 -0
  11. package/data/zeroheight-exports/Corners.md +112 -0
  12. package/data/zeroheight-exports/Cover-page.md +4 -0
  13. package/data/zeroheight-exports/Dialog.md +1133 -0
  14. package/data/zeroheight-exports/Downloads.md +121 -0
  15. package/data/zeroheight-exports/Drop-Shadows.md +80 -0
  16. package/data/zeroheight-exports/Dropdown-Input.md +1149 -0
  17. package/data/zeroheight-exports/Dropdown-Menu.md +3787 -0
  18. package/data/zeroheight-exports/Element-Status-Tracker.md +268 -0
  19. package/data/zeroheight-exports/Field-Inputs.md +965 -0
  20. package/data/zeroheight-exports/Filters.md +868 -0
  21. package/data/zeroheight-exports/Getting-Started.md +1296 -0
  22. package/data/zeroheight-exports/Hero.md +256 -0
  23. package/data/zeroheight-exports/Icons.md +432 -0
  24. package/data/zeroheight-exports/Intent.md +47 -0
  25. package/data/zeroheight-exports/Introduction-to-Bases.md +36 -0
  26. package/data/zeroheight-exports/Introduction-to-Cells.md +36 -0
  27. package/data/zeroheight-exports/Introduction-to-DNA.md +36 -0
  28. package/data/zeroheight-exports/Introduction-to-Genes.md +36 -0
  29. package/data/zeroheight-exports/Introduction.md +116 -0
  30. package/data/zeroheight-exports/Link.md +373 -0
  31. package/data/zeroheight-exports/Lists.md +617 -0
  32. package/data/zeroheight-exports/Loading-Indicator.md +38 -0
  33. package/data/zeroheight-exports/Navigation.md +853 -0
  34. package/data/zeroheight-exports/Notification.md +858 -0
  35. package/data/zeroheight-exports/Panel.md +862 -0
  36. package/data/zeroheight-exports/README.md +124 -0
  37. package/data/zeroheight-exports/Responsive-Design.md +275 -0
  38. package/data/zeroheight-exports/Search-Input.md +54 -0
  39. package/data/zeroheight-exports/Search.md +609 -0
  40. package/data/zeroheight-exports/Segmented-Control.md +561 -0
  41. package/data/zeroheight-exports/Spacing.md +298 -0
  42. package/data/zeroheight-exports/Table.md +4832 -0
  43. package/data/zeroheight-exports/Tabs.md +773 -0
  44. package/data/zeroheight-exports/Tags.md +1025 -0
  45. package/data/zeroheight-exports/Text-Link.md +185 -0
  46. package/data/zeroheight-exports/Theming.md +313 -0
  47. package/data/zeroheight-exports/Tooltips.md +1564 -0
  48. package/data/zeroheight-exports/Typography.md +769 -0
  49. package/dist/stdio.js +188 -0
  50. package/package.json +4 -3
@@ -0,0 +1,609 @@
1
+ # Search
2
+
3
+ Search is a flexible way for users to find data of interest or filter down their data by a keyword. This allows users to take action on the available data without the distraction of irrelevant information.
4
+
5
+ ## Overview
6
+
7
+ ## Search Flow Types
8
+
9
+ | There are three general flow patterns recommended when considering adding search or filter functionality to products. Each of these follows the same four basic steps: 1. User types in a keyword 2. Search is initiated 3. Results are displayed 4. User takes action on the results Although the general steps followed are universal, the implementation choices made on how each step is accomplished, most notably how the results are displayed, are what differentiate each flow type. | | **Jump to flow type:** On-page Results flow Results Page flow |
10
+ | --- | --- | --- |
11
+
12
+ ### Flow Types
13
+
14
+ | **On-page Results** | | **Results Page** |
15
+ | --- | --- | --- |
16
+
17
+ | The content on the page automatically updates to reflect the search result. | | The results of the search are displayed on a separate "search results" page. |
18
+ | --- | --- | --- |
19
+
20
+ ---
21
+
22
+ ## On-page Results
23
+
24
+ Search results are displayed on the current page by filtering down the visible content within the searchable area(s) to show matches only. This search is the most common pattern; it is used both at the component and the page levels.
25
+
26
+  
27
+
28
+ ---
29
+
30
+ #### 1. User types keyword into Search Input
31
+
32
+ It is recommended to position your Search Input at the top level of the content the user will be searching.
33
+
34
+ For example, if the search will display results for a list of plugins (1), position the Search Input at the top of the list (2).
35
+
36
+ #### **2. Search Initiated by User**
37
+
38
+ Search is initiated when the user clicks a button, hits “enter”, or completes some other user action.
39
+
40
+ This method is recommended when search results must be fetched from the backend, or when the user needs to set up other specifications before initiating the search.
41
+
42
+  
43
+
44
+
45
+
46
+ #### **3.** Results Displayed in Searched Content Area
47
+
48
+ Results are displayed by filtering the content in the searchable area (1) so that only search results are visible.
49
+
50
+ If there are no results, it is recommended that a “No Results” blank state is displayed in the content area instead.
51
+
52
+ #### 4. User Takes Action on Results
53
+
54
+ Depending on the product and the user’s workflow, users may take a number of next actions on the results, possibly including:
55
+
56
+ * Refine search results (1); re-starts this flow.
57
+ * Sort search results (2).
58
+ * Filter search results (3).
59
+ * Interact with results, such as selecting a single result (4).
60
+
61
+ ---
62
+
63
+ ### Use Case Examples
64
+
65
+ Below are links to example use cases where we recommend using an On-page Results flow:
66
+
67
+ * Search within a Dropdown Menu
68
+
69
+ ### Technical Considerations
70
+
71
+ It is recommended to discuss any search approach under consideration with the engineering team to better understand the technical parameters the product can support.
72
+
73
+ That being said, for the On-page Results flow, keep in mind:
74
+
75
+ * This approach is impacted by whether the search is done on the frontend or the backend. If search is slow and has to be done on the backend, consider using the Results Page flow type instead.
76
+ * Paginated vs infinite scrolling results may have an impact on the search flow options available.
77
+
78
+ ---
79
+
80
+ ## Results Page
81
+
82
+ Search results are displayed on a different page than where the search was originally initiated. Depending on the use case, this may be a unique “Results” page, or an existing page where the data is usually located. The Results Page flow is often combined with the On-page Results flow. Learn more about Combining Search Types.
83
+
84
+  
85
+
86
+ ---
87
+
88
+ #### 1. User Types Keyword into Search Component
89
+
90
+ It is recommended to position Search Inputs at the top level of the content the search will apply to.
91
+
92
+ For example, if the search will display results from across the whole site (1), position the Search Input in a top-level navigation or outside of the page content hierarchy (2).
93
+
94
+  
95
+
96
+ #### 2. **Search Initiated by User**
97
+
98
+ Search is initiated when the user clicks a button (1), hits “enter” (2), or some other user action.
99
+
100
+ Because results will be displayed on a new page, Live Search is not recommended.
101
+
102
+  
103
+
104
+ #### 3. Results Displayed on the Results page
105
+
106
+ After the user initiates the search, they are automatically directed to a results page.
107
+
108
+ The results page format depends on the product's use case and content. In the example shown, the results page is a unique page that lists search results for pages across the entire website.
109
+
110
+ If there are no results, it is recommended to display a bank state on the results page.
111
+
112
+  
113
+
114
+ #### 4. User Takes Action on Results
115
+
116
+ Depending on the product and the user’s workflow, they may take a number of next actions on the results, possibly including:
117
+
118
+ * Refine search results (1). It is recommended to use the On-Page Results flow type; see Combining Flow Types.
119
+ * Interact with results, like drilling down into a single result (2) .
120
+ * Filter or Sort Results.
121
+
122
+  
123
+
124
+ ---
125
+
126
+ ### Technical Considerations
127
+
128
+ It is recommended to discuss any search approach under consideration with the engineering team to better understand the technical parameters the product can support.
129
+
130
+ That being said, for the Results Page flow type, keep in mind that this approach has the best performance when the search is performed on the backend. 
131
+
132
+ ## Example Use Cases
133
+
134
+ ## Example Use Cases
135
+
136
+ This section will describe search in some use cases currently used across CZI products. These can be used as guidance or inspiration for similar use cases encountered by product teams, but keep in mind that each individual product's needs may be different.
137
+
138
+ ### Searching within a Dropdown Menu
139
+
140
+ When searching the Menu Items within a Dropdown Menu, it is recommended to use the On-Page Results flow type. Why? Think of the Dropdown Menu as the “page” and the Menu Items as the content being searched. As the user searches, the content is filtered down without leaving the open Dropdown Menu.
141
+
142
+ The following behaviors are recommended for displaying search results within a Dropdown Menu.
143
+
144
+ ## Other Considerations
145
+
146
+ | Search is a complex component, and is highly subjective to each product's use case. While it's impossible to support and document every use case, here is a collection of patterns that may be useful to consider when implementing it. The patterns detailed below have not been developed by the SDS team and are simply examples pulled from products that utilize the SDS components. | | **Jump to pattern:** Combining Search Types Supporting User Behavior |
147
+ | --- | --- | --- |
148
+
149
+ ---
150
+
151
+ ## Combining Search Types
152
+
153
+ Depending on the use case, there may be a need to combine multiple flow types. How to do this is highly variable depending on each product's workflow, searched content, and user needs. Below are a few examples of combinations the CZI Science products have found useful.
154
+
155
+ ### Results Page + On-page Results Flow
156
+
157
+ In most use cases for the Results Page flow, it can be beneficial to provide users with a way to modify their search results by implementing the On-page Results flow within a Results Page design.
158
+
159
+ ---
160
+
161
+ ## Patterns to Support User Behavior
162
+
163
+ Below are some example behavior patterns worth considering to help support users in their searching. Evaluate if implementing these will help users’ workflows and if the product can support any technical requirements of implementation.
164
+
165
+ ---
166
+
167
+ Search is a flexible way for users to find data of interest or filter down their data by a keyword. This allows users to take action on the available data without the distraction of irrelevant information.
168
+
169
+ ## Overview
170
+
171
+ ## Search Flow Types
172
+
173
+ CZ GEN EPI only uses the On-page Results flow pattern for adding search or filter functionality. It follows these four basic steps:
174
+
175
+ 1. User types in a keyword
176
+ 2. Search is initiated
177
+ 3. Results are displayed
178
+ 4. User takes action on the result
179
+
180
+ ## On-page Results
181
+
182
+ Search results are displayed on the current page by filtering down the visible content within the searchable area(s) to show matches only. This search is the most common pattern; it is used both at the component and the page levels.
183
+
184
+ ---
185
+
186
+ #### **1. User types keyword into Search Input**
187
+
188
+ It is recommended to position the Search Input at the top level of the content the user will be searching within.
189
+
190
+ For example, if the search will display results for a single Table (1), position the Search Input at the top of the table (2). 
191
+
192
+ #### **2A. Search Initiated Automatically (Live Search)**
193
+
194
+ Otherwise known as "Live Search," as the user types, the app automatically initiates the search with each keystroke or after a specified delay in keystrokes.
195
+
196
+ This method is recommended in most cases of the On-page Results flow if implementation will allow it. This may not be a feasible solution if the product's search results are paginated.
197
+
198
+
199
+
200
+ #### **2B. Search Initiated by User**
201
+
202
+ Search is initiated when the user clicks a button, hits “enter”, or completes some other user action.
203
+
204
+ This method is recommended when search results must be fetched from the backend, or when the user needs to set up other specifications before initiating the search. 
205
+
206
+
207
+
208
+ #### **3. Results Displayed in Searched Content Area**
209
+
210
+ Results are displayed by filtering the content in the searchable area (1) so that only search results are visible.
211
+
212
+ If there are no results, it is recommended that a “No Results” blank state is displayed in the content area instead.
213
+
214
+  
215
+
216
+ **4. User Takes Action on Results**
217
+
218
+ Depending on the product and the user’s workflow, users may take a number of next actions on the results, possibly including:
219
+
220
+ * Refine search results (1); re-starts this flow.
221
+ * Filter search results (2).
222
+ * Sort search results (3).
223
+ * Interact with results, like drilling down into a single result, performing actions upon results, etc. (4).
224
+
225
+ ---
226
+
227
+ ### Use Case Examples
228
+
229
+ Below are links to example use cases where we recommend using an On-page Results flow:
230
+
231
+ * Search within a Dropdown Menu
232
+
233
+ ### Technical Considerations
234
+
235
+ It is recommended to discuss any search approach under consideration with the engineering team to better understand the technical parameters the product can support.
236
+
237
+ That being said, for the On-page Results flow, keep in mind that paginated vs infinite scrolling results may have an impact on the search flow options available.
238
+
239
+ ## Example Use Cases
240
+
241
+ ## Example Use Cases
242
+
243
+ This section will describe search in some use cases currently used across CZI products. These can be used as guidance or inspiration for similar use cases encountered by product teams, but keep in mind that each individual product's needs may be different.
244
+
245
+ ### Searching within a Dropdown Menu
246
+
247
+ When searching the Menu Items within a Dropdown Menu, it is recommended to use the On-Page Results flow type. Why? Think of the Dropdown Menu as the “page” and the Menu Items as the content being searched. As the user searches, the content is filtered down without leaving the open Dropdown Menu.
248
+
249
+ The following behaviors are recommended for displaying search results within a Dropdown Menu.
250
+
251
+ ## Other Considerations
252
+
253
+ ## Patterns to Support User Behavior
254
+
255
+ Below are some example behavior patterns worth considering to help support users in their searching. Evaluate if implementing these will help users’ workflows and if the product can support any technical requirements of implementation.
256
+
257
+ ---
258
+
259
+ Search is a flexible way for users to find data of interest or filter down their data by a keyword. This allows users to take action on the available data without the distraction of irrelevant information.
260
+
261
+ ## Overview
262
+
263
+ ## Search Flow Types
264
+
265
+ | There are two general flow patterns recommended when considering adding search or filter functionality to products. Both of these follow the same four basic steps: 1. User types in a keyword 2. Search is initiated 3. Results are displayed 4. User takes action on the results Although the general steps followed are universal, the implementation choices made on how each step is accomplished, most notably how the results are displayed, are what differentiate each flow type. | | **Jump to type:** On-page Results flow Results Dropdown flow |
266
+ | --- | --- | --- |
267
+
268
+ ---
269
+
270
+ ### Flow Types
271
+
272
+ | **On-page Results** | | **Results Dropdown** |
273
+ | --- | --- | --- |
274
+
275
+ | The content on the page automatically updates to reflect the search result. | | The results of the search are Menu Items in a Dropdown Menu for the user to select from. |
276
+ | --- | --- | --- |
277
+
278
+ ---
279
+
280
+ ## On-page Results
281
+
282
+ Search results are displayed on the current page by filtering down the visible content within the searchable area(s) to show matches only. This search is the most common pattern; it is used both at the component and the page levels.
283
+
284
+ ---
285
+
286
+ #### **1. User types keyword into Search Input**
287
+
288
+ It is recommended to position the Search Input at the top level of the content the user will be searching within.
289
+
290
+ For example, if the search will display results in tables across multiple tabs (1), position the Search Input in the header (2).
291
+
292
+ #### **2. Search Initiated by User**
293
+
294
+ Search is initiated when the user clicks a button, hits “enter”, or completes some other user action.
295
+
296
+ This method is recommended when search results must be fetched from the backend, or when the user needs to set up other specifications before initiating the search.
297
+
298
+
299
+
300
+ #### **3. Results Displayed in Searched Content Area**
301
+
302
+ Results are displayed by filtering the content in the searchable area (1) so that only search results are visible.
303
+
304
+ If there are no results, it is recommended that a “No Results” blank state is displayed in the content area instead.
305
+
306
+ #### **4. User Takes Action on Results**
307
+
308
+ Depending on the product and the user’s workflow, users may take a number of next actions on the results, possibly including:
309
+
310
+ * Refine search results (1); re-starts this flow.
311
+ * Filter search results (2).
312
+ * Sort search results (3).
313
+ * Interact with results, like drilling down into a single result, performing actions upon results, etc. (4).
314
+
315
+ ---
316
+
317
+ ### Use Case Examples
318
+
319
+ Below are links to example use cases where we recommend using an On-page Results flow:
320
+
321
+ * Search within a Dropdown Menu
322
+
323
+ ### Technical Considerations
324
+
325
+ It is recommended to discuss any search approach under consideration with the engineering team to better understand the technical parameters the product can support.
326
+
327
+ That being said, for the On-page Results flow, keep in mind that paginated vs infinite scrolling results may have an impact on the search flow options available.
328
+
329
+ ---
330
+
331
+ ## Results Dropdown
332
+
333
+ Search results are displayed inside a Dropdown Menu that appears below the Search Input. The user will remain on the same page until they select a result from the Dropdown Menu.
334
+
335
+ ---
336
+
337
+ #### **1. User Types Keyword into Search Component**
338
+
339
+ It is recommended to position the Search Input at the top level of the content the search will apply to.
340
+
341
+ For example, if the search will display results from across multiple tabs (1), position the Search Input in the header (2).
342
+
343
+ #### **2. Search Initiated (Live Update)**
344
+
345
+ As the user types, the app automatically initiates the search with each keystroke.
346
+
347
+ It is not recommended for user action to initiate search for this flow type.
348
+
349
+
350
+
351
+ #### **3. Results Displayed in Dropdown**
352
+
353
+ Instead of updating the searched content area, results are displayed in a Dropdown Menu below the Search Input (1).
354
+
355
+ If there are no results, it is recommended to display a bank state in the Dropdown Menu instead.
356
+
357
+ #### **4. User Takes Action on Results**
358
+
359
+ Depending on the product and the user’s workflow, they may take a number of next actions on the results, possibly including:
360
+
361
+ * Refine search results (1); re-starts this flow.
362
+ * Interact with results, such as drilling down into a single result (2) .
363
+ * Initiate a different type of search flow. For example, the user clicks “enter” to filter page by search keyword (3). See Combining Search Types section to learn more.
364
+
365
+ ## Example Use Cases
366
+
367
+ ## Example Use Cases
368
+
369
+ This section will describe search in some use cases currently used across CZI products. These can be used as guidance or inspiration for similar use cases encountered by product teams, but keep in mind that each individual product's needs may be different.
370
+
371
+ ### Searching within a Dropdown Menu
372
+
373
+ When searching the Menu Items within a Dropdown Menu, it is recommended to use the On-Page Results flow type. Why? Think of the Dropdown Menu as the “page” and the Menu Items as the content being searched. As the user searches, the content is filtered down without leaving the open Dropdown Menu.
374
+
375
+ The following behaviors are recommended for displaying search results within a Dropdown Menu.
376
+
377
+  
378
+
379
+ ## Other Considerations
380
+
381
+ | Search is a complex component, and is highly subjective to each product's use case. While it's impossible to support and document every use case, here is a collection of patterns that may be useful to consider when implementing it. The patterns detailed below have not been developed by the SDS team and are simply examples pulled from products that utilize the SDS components. **Please consider the information in this section as inspiration only.** | | **Jump to pattern:** Combining Search Types Supporting User Behavior |
382
+ | --- | --- | --- |
383
+
384
+ ---
385
+
386
+ ## Combining Search Types
387
+
388
+ Depending on the use case, there may be a need to combine multiple flow types. How to do this is highly variable depending on each product's workflow, searched content, and user needs. Below are a few examples of combinations the CZI Science products have found useful.
389
+
390
+ ### Results Dropdown + On-page Results Flow
391
+
392
+ CZ ID combines the Results Dropdown and the On-page Results flows. This allows users to jump to a specific result or filter the workspace by the search, depending on their needs.
393
+
394
+ ---
395
+
396
+ ## Patterns to Support User Behavior
397
+
398
+ Below are some example behavior patterns worth considering to help support users in their searching. Evaluate if implementing these will help users’ workflows and if the product can support any technical requirements of implementation.
399
+
400
+ ---
401
+
402
+ Search is a flexible way for users to find data of interest or filter down their data by a keyword. This allows users to take action on the available data without the distraction of irrelevant information.
403
+
404
+ ## Guidelines
405
+
406
+ ## Search Flow Types
407
+
408
+ | There are three general flow patterns recommended when considering adding search or filter functionality to products. Each of these follows the same four basic steps: 1. User types in a keyword 2. Search is initiated 3. Results are displayed 4. User takes action on the results Although the general steps followed are universal, the implementation choices made on how each step is accomplished, most notably how the results are displayed, are what differentiate each flow type. | | **Jump to flow type:** On-page Results flow Results Dropdown flow Results Page flow |
409
+ | --- | --- | --- |
410
+
411
+ ### Flow Types
412
+
413
+ | **On-page Results** | **Results Dropdown** | **Results Page** |
414
+ | --- | --- | --- |
415
+
416
+ | The content on the page automatically updates to reflect the search result. | The results of the search are Menu Items in a Dropdown Menu for the user to select from. | The results of the search are displayed on a separate "search results" page. |
417
+ | --- | --- | --- |
418
+
419
+ ---
420
+
421
+ ## On-page Results
422
+
423
+ Search results are displayed on the current page by filtering down the visible content within the searchable area(s) to show matches only. This search is the most common pattern; it is used both at the component and the page levels.
424
+
425
+ ### Example from CZ GEN EPI
426
+
427
+ The example flow below uses CZ GEN EPI to show the on-page refresh of content that occurs when using the On-page Results flow.
428
+
429
+ ---
430
+
431
+ #### 1. User types keyword into Search Input
432
+
433
+ It is recommended to position the Search Input at the top level of the content the user will be searching within.
434
+
435
+ For example, if the search will display results for a single Table (1), position the Search Input at the top of the table (2).
436
+
437
+ #### 2A. Search Initiated Automatically (Live Search)
438
+
439
+ Otherwise known as "Live Search," as the user types, the app automatically initiates the search with each keystroke or after a specified delay in keystrokes.
440
+
441
+ This method is recommended in most cases of the On-page Results flow if implementation will allow it. This may not be a feasible solution if the product's search results are paginated.
442
+
443
+
444
+
445
+ #### **2B. Search Initiated by User**
446
+
447
+ Search is initiated when the user clicks a button, hits “enter”, or completes some other user action.
448
+
449
+ This method is recommended when search results must be fetched from the backend, or when the user needs to set up other specifications before initiating the search.
450
+
451
+
452
+
453
+ #### **3.** Results Displayed in Searched Content Area
454
+
455
+ Results are displayed by filtering the content in the searchable area (1) so that only search results are visible.
456
+
457
+ If there are no results, it is recommended that a “No Results” blank state is displayed in the content area instead.
458
+
459
+ #### 4. User Takes Action on Results
460
+
461
+ Depending on the product and the user’s workflow, users may take a number of next actions on the results, possibly including:
462
+
463
+ * Refine search results (1); re-starts this flow.
464
+ * Filter search results (2).
465
+ * Sort search results (3).
466
+ * Interact with results, like drilling down into a single result, performing actions upon results, etc. (4).
467
+
468
+ ---
469
+
470
+ ### Use Case Examples
471
+
472
+ Below are links to example use cases where we recommend using an On-page Results flow:
473
+
474
+ * Search within a Dropdown Menu
475
+
476
+ ### Technical Considerations
477
+
478
+ It is recommended to discuss any search approach under consideration with the engineering team to better understand the technical parameters the product can support.
479
+
480
+ That being said, for the On-page Results flow, keep in mind:
481
+
482
+ * This approach is impacted by whether the search is done on the frontend or the backend. If search is slow and has to be done on the backend, consider using User-initiated Search (Step 2B) or the Results Page flow type instead.
483
+ * Paginated vs infinite scrolling results may have an impact on the search flow options available.
484
+
485
+ ---
486
+
487
+ ## Results Dropdown
488
+
489
+ Search results are displayed inside a Dropdown Menu that appears below the Search Input. The user will remain on the same page until they select a result from the Dropdown Menu.
490
+
491
+ ### Example from CZ ID
492
+
493
+ The example flow below uses CZ ID to show the contents of a Dropdown Menu filtering down to include only the Menu Items that match the keyword entered into the Search Input.
494
+
495
+ ---
496
+
497
+ #### 1. User Types Keyword into Search Component
498
+
499
+ It is recommended to position the Search Input at the top level of the content the search will apply to.
500
+
501
+ For example, if the search will display results from across multiple tabs (1), position the Search Input in the header (2).
502
+
503
+ #### 2. Search Initiated (Live Update)
504
+
505
+ As the user types, the app automatically initiates the search with each keystroke.
506
+
507
+ It is not recommended for user action to initiate search for this flow type.
508
+
509
+
510
+
511
+ #### 3. Results Displayed in Dropdown
512
+
513
+ Instead of updating the searched content area, results are displayed in a Dropdown Menu below the Search Input (1).
514
+
515
+ If there are no results, it is recommended to display a bank state in the Dropdown Menu instead.
516
+
517
+ #### 4. User Takes Action on Results
518
+
519
+ Depending on the product and the user’s workflow, they may take a number of next actions on the results, possibly including:
520
+
521
+ * Refine search results (1); re-starts this flow.
522
+ * Interact with results, such as drilling down into a single result (2) .
523
+ * Initiate a different type of search flow. For example, the user clicks “enter” to filter page by search keyword (3). See Combining Search Types section to learn more.
524
+
525
+ ---
526
+
527
+ ## Results Page
528
+
529
+ Search results are displayed on a different page than where the search was originally initiated. Depending on the use case, this may be a unique “Results” page, or an existing page where the data is usually located. The Results Page flow is often combined with the On-page Results flow. Learn more about Combining Flow Types.
530
+
531
+ ### Example from napari.org
532
+
533
+ The example flow below uses napari.org to show the usage of a Results Page to display the outcome of a search.
534
+
535
+ ---
536
+
537
+ #### 1. User Types Keyword into Search Component
538
+
539
+ It is recommended to position Search Inputs at the top level of the content the search will apply to.
540
+
541
+ For example, if the search will display results from across the whole site (1), position the Search Input in a top-level navigation or outside of the page content hierarchy (2).
542
+
543
+ #### 2. **Search Initiated by User**
544
+
545
+ Search is initiated when the user clicks a button (1), hits “enter” (2), or some other user action.
546
+
547
+ Because results will be displayed on a new page, Live Search is not recommended.
548
+
549
+ #### 3. Results Displayed on the Results page
550
+
551
+ After the user initiates the search, they are automatically directed to a results page.
552
+
553
+ The results page format depends on the product's use case and content. In the example shown, the results page is a unique page that lists search results for pages across the entire website.
554
+
555
+ If there are no results, it is recommended to display a bank state on the results page.
556
+
557
+ #### 4. User Takes Action on Results
558
+
559
+ Depending on the product and the user’s workflow, they may take a number of next actions on the results, possibly including:
560
+
561
+ * Refine search results (1). It is recommended to use the On-Page Results flow type; see Combining Flow Types.
562
+ * Interact with results, like drilling down into a single result (2) .
563
+ * Filter or Sort Results.
564
+
565
+ ---
566
+
567
+ ### Technical Considerations
568
+
569
+ It is recommended to discuss any search approach under consideration with the engineering team to better understand the technical parameters the product can support.
570
+
571
+ That being said, for the Results Page flow type, keep in mind that this approach has the best performance when the search is performed on the backend.
572
+
573
+ ## Example Use Cases
574
+
575
+ ## Example Use Cases
576
+
577
+ This section will describe search in some use cases currently used across CZI products. These can be used as guidance or inspiration for similar use cases encountered by product teams, but keep in mind that each individual product's needs may be different.
578
+
579
+ ### Searching within a Dropdown Menu
580
+
581
+ When searching the Menu Items within a Dropdown Menu, it is recommended to use the On-Page Results flow type. Why? Think of the Dropdown Menu as the “page” and the Menu Items as the content being searched. As the user searches, the content is filtered down without leaving the open Dropdown Menu.
582
+
583
+ The following behaviors are recommended for displaying search results within a Dropdown Menu.
584
+
585
+ ## Other Considerations
586
+
587
+ | Search is a complex component, and is highly subjective to each product's use case. While it's impossible to support and document every use case, here is a collection of patterns that may be useful to consider when implementing it. The patterns detailed below have not been developed by the SDS team and are simply examples pulled from products that utilize the SDS components. **Please consider the information in this section as inspiration only.** | | **Jump to pattern:** Combining Search Types Supporting User Behavior |
588
+ | --- | --- | --- |
589
+
590
+ ---
591
+
592
+ ## Combining Search Types
593
+
594
+ Depending on the use case, there may be a need to combine multiple flow types. How to do this is highly variable depending on each product's workflow, searched content, and user needs. Below are a few examples of combinations the CZI Science products have found useful.
595
+
596
+ ### Results Page + On-page Results Flow
597
+
598
+ In most use cases for the Results Page flow, it can be beneficial to provide users with a way to modify their search results by implementing the On-page Results flow within a Results Page design.
599
+
600
+ ### Results Dropdown + On-page Results Flow
601
+
602
+ CZ ID combines the Results Dropdown and the On-page Results flows. This allows users to jump to a specific result or filter the workspace by the search, depending on their needs.
603
+
604
+ ---
605
+
606
+ ## Patterns to Support User Behavior
607
+
608
+ Below are some example behavior patterns worth considering to help support users in their searching. Evaluate if implementing these will help users’ workflows and if the product can support any technical requirements of implementation.
609
+