Skip to content

Commit 5925059

Browse files
committed
scaffold searchable listbox examples
1 parent 005893f commit 5925059

File tree

15 files changed

+932
-17
lines changed

15 files changed

+932
-17
lines changed

polaris.shopify.com/content/components/listbox.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ examples:
1919
- fileName: listbox-with-custom-element.tsx
2020
title: With custom element
2121
description: Implementation of a control with custom rendering of options
22+
- fileName: listbox-with-search.tsx
23+
title: With search
24+
description: Use to help merchants browse, filter, and choose from a list of options.
2225
---
2326

2427
# Listbox

polaris.shopify.com/content/components/popover.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@ examples:
3232
- fileName: popover-with-lazy-loaded-list.tsx
3333
title: With lazy loaded list
3434
description: Use to present merchants with a list that dynamically loads more items on scroll or arrow down.
35+
- fileName: popover-with-searchable-listbox.tsx
36+
title: With segment picker
37+
description: Use to help merchants quickly browse, find, and navigate from a list of customer segments.
3538
---
3639

3740
# Popover

polaris.shopify.com/content/components/sheet.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ examples:
1616
- fileName: sheet-default.tsx
1717
title: Default
1818
description: Use as the default option for a sheet.
19+
- fileName: sheet-with-searchable-listbox.tsx
20+
title: With searchable listbox
21+
description: Use to help merchants browse, filter, and choose from a list of options.
1922
---
2023

2124
# Sheet

polaris.shopify.com/content/foundations/patterns/resource-picking.md

Lines changed: 3 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,29 +15,17 @@ keywords:
1515
- segments
1616
- segementation
1717
- single select
18-
examples:
19-
- fileName: listbox-with-search.tsx
20-
title: Searchable listbox
21-
description: Use to help merchants browse, filter, and choose from a list of options.
22-
- fileName: popover-with-segment-picker.tsx
23-
title: Popover with segment picker
24-
description: Use to help merchants quickly browse, find, and navigate from a list of customer segments.
25-
- fileName: sheet-with-segment-picker.tsx
26-
title: Sheet with segment picker
27-
description: Use to help merchants quickly find and select from a list of customer segments.
2818
---
2919

3020
# Resource picking
3121

3222
Resource picking experiences let merchants browse, find, and select items in a list to perform an action. The picking feature can help them navigate to a new page, filter an index table, or input one or more values in a form.
3323

34-
![Searchable listbox pattern disected to illustrate how it's composed](/images/foundations/patterns/resource-picking/searchable-listbox.png)
24+
![Searchable listbox pattern disected to illustrate how it's composed using the text field, listbox, listbox option, and listbox action components.](/images/foundations/patterns/resource-picking/searchable-listbox.png)
3525

36-
The primary building blocks of a picker experience are the listbox and text field components. Depending on what merchant problem you’re solving, the components may be hidden and revealed with an overlay, such as a popover or modal, or used directly inside of a container on the page. See the [customer segment picker](#customer-segments) and [location picker](#locations) examples for resource specific implementation details.
26+
The primary building block of a picker experience is the searchable listbox pattern, composed of the listbox and text field components. Depending on what merchant problem you’re solving, the components may be used directly inside of a container on the page or hidden and revealed with an overlay, such as a popover or modal. See the [customer segment picker](#customer-segments) and [location picker](#locations) examples for context specific implementation details.
3727

38-
CODE SAMPLE
39-
40-
Include guidance about how to pick what container: The searchable listbox should be rendered directly.
28+
Display the resource picker directly on the page if picking from the list is part of the primary action merchants need to take, such as completing a form. If the purpose of the resource picker is secondary to the action merchants should take on the page, such as in page navigation or list filtering, use progressive disclosure to present the list.
4129

4230
---
4331

2 Bytes
Loading
287 Bytes
Loading
948 Bytes
Loading
-343 Bytes
Loading
1.79 KB
Loading
10.5 KB
Loading

0 commit comments

Comments
 (0)