Skip to content

Commit 005893f

Browse files
committed
update IA and images
1 parent ae4a135 commit 005893f

17 files changed

+42
-50
lines changed

.changeset/fifty-oranges-warn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'polaris.shopify.com': patch
3+
---
4+
5+
Updated the Locations pattern documentation to document resource picking

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

Lines changed: 34 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,44 @@
11
---
22
name: Resource picking
33
keywords:
4-
- breakpoint
4+
- customer segments
55
- locations
66
- location picker
7-
- segment picker
7+
- multiselect
8+
- multi-select
9+
- multi select
810
- picker
11+
- resource picker
12+
- searchable listbox
13+
- searchable list
14+
- segment picker
915
- segments
1016
- segementation
11-
- customer segments
12-
- searchable list
1317
- single select
14-
- multiselect
15-
- multi-select
16-
- multi 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.
1728
---
1829

1930
# Resource picking
2031

2132
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.
2233

34+
![Searchable listbox pattern disected to illustrate how it's composed](/images/foundations/patterns/resource-picking/searchable-listbox.png)
35+
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.
37+
38+
CODE SAMPLE
39+
40+
Include guidance about how to pick what container: The searchable listbox should be rendered directly.
41+
2342
---
2443

2544
## Principles
@@ -58,17 +77,15 @@ While there are many ways to treat a resource depending on the use case, two com
5877

5978
The number of locations a merchant has can range dramatically, and the location experience should adapt to that number. Using progressive disclosure, we can introduce features as merchants need them.
6079

61-
#### Popover list
62-
6380
The location picker popover allows a merchant to select any location they have added in the admin.
6481

65-
![1 location](/images/foundations/patterns/resource-picking/1-location@2x.png)
82+
![1 location](/images/foundations/patterns/resource-picking/locations-1.png)
6683

6784
#### 1 location
6885

6986
When a merchant only has one location, the button that opens the location picker should be hidden. There’s no need to access the experience when they can’t switch locations.
7087

71-
![2–10 locations](/images/foundations/patterns/resource-picking/2-10-locations@2x.png)
88+
![2–10 locations](/images/foundations/patterns/resource-picking/locations-2-to-10.png)
7289

7390
#### 2–10 locations
7491

@@ -80,7 +97,7 @@ In the location picker:
8097
- Show “All locations” at the top of the list.
8198
- List all other locations in alphabetical order. Each location item shows the location name only.
8299

83-
![11 or more locations](/images/foundations/patterns/resource-picking/11-or-more-locations-picker@2x.png)
100+
![11 or more locations](/images/foundations/patterns/resource-picking/locations-11-or-more.png)
84101

85102
#### 11 or more locations
86103

@@ -90,55 +107,25 @@ When a merchant has 11 or more locations:
90107
- Add text search at the top of the location picker. This allows merchants to search for locations by specific criteria (location name, city, province, postal code, address, etc.).
91108
- Directly below the search, show a section with the 5 most recently used locations. If there are none, show the first 5 locations from the full list.
92109
- Below recently used locations, show an option to view all locations. Clicking this will show the inactive search state, displaying the full list of locations.
93-
94-
#### Location list
95-
96-
The location list allows merchants to view all locations they have added in the admin.
97-
98-
![1–10 locations list](/images/foundations/patterns/resource-picking/[email protected])
99-
100-
##### 1–10 locations
101-
102-
When a merchant has 1–10 locations, show all locations in a simple list. As notated in the image above:
103-
104-
1. Each list item should include the location name and address
105-
2. The indicator at the bottom shows the total number of locations
106-
107-
![11 or more locations list](/images/foundations/patterns/resource-picking/[email protected])
108-
109-
##### 11 or more locations
110-
111-
When a merchant has 11 or more locations:
112-
113-
- Apply the same features as 1–10 locations
114-
- Show text search, filters, and sorting at the top of the list
115-
116-
Notated in the image above, location list functionality at this level includes:
117-
118-
1. **Search**. Allow merchants to find locations via specific criteria (location name, city, province, postal code, address, etc.).
119-
2. **Sort**. This will be contextual to the use case (alphabetical sort, date created, date edited, etc.).
120-
3. **Filter**. This is also contextual to the use case. For example, merchants could filter by subscription type.
121-
4. **Pagination**. Allow the merchant to load and view additional sets of locations. Trigger loading with a “Load more” button.
110+
-
122111

123112
### Customer segments
124113

125114
The number of locations a merchant has can range dramatically, and the location experience should adapt to that number. Using progressive disclosure, we can introduce features as merchants need them.
126115

127-
#### Popover list
128-
129116
The location picker popover allows a merchant to select any location they have added in the admin.
130117

131-
![1 location](/images/foundations/patterns/resource-picking/1-location@2x.png)
118+
![1 location](/images/foundations/patterns/resource-picking/customer-segments-1-to-10.png)
132119

133120
#### 1 - 10 segments
134121

135-
When a merchant only has one location, the button that opens the location picker should be hidden. There’s no need to access the experience when they can’t switch locations.
122+
When a merchant less than 11 segments, ...
136123

137-
![2–10 locations](/images/foundations/patterns/resource-picking/2-10-locations@2x.png)
124+
![2–10 locations](/images/foundations/patterns/resource-picking/customer-segments-11-or-more.png)
138125

139126
#### 11 or more segments
140127

141-
When a merchant has 11 or more locations:
128+
When a merchant has 11 or more customer segments:
142129

143130
- Apply the same features as 2–10 locations.
144131
- Add text search at the top of the location picker. This allows merchants to search for locations by specific criteria (location name, city, province, postal code, address, etc.).
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
138 KB
Loading
136 KB
Loading

0 commit comments

Comments
 (0)