diff --git a/jekyll/_components/devtools-search-filter.md b/jekyll/_components/devtools-search-filter.md new file mode 100644 index 000000000..88ce2059b --- /dev/null +++ b/jekyll/_components/devtools-search-filter.md @@ -0,0 +1,261 @@ +--- +layout: page +title: DevTools Search & Filter +order: 14 +draft: true +--- + +DevTools search and filter input fields provide panel or pane specific search and filtering capabilities. + +## Usage + +
+![Filter bar example](../images/components/devtools-search-filter/search-and-filter-usage.png) + +
+Provide a search or filter input field for users when a panel or pane specific action is capable of producing a large quantity of data of varying types or categories. Typically, the data would be formatted as a list of entries similar to logs in the Console or requests in the Network Monitor. +
+
+ + + + +## Styles + +### DevTools search and filter bars + +Search and filter bars in DevTools appear within panel toolbars and are often signified by a magnifying glass or filter funnel icon within the field. + +
+![Filter and search bar example](../images/components/devtools-search-filter/search-and-filter-bar.png) + +
+ +Padding inline start: `22px` + +Padding inline end: `23px` + +Background size: `11px 11px` (icon) + +Font size: `11px` + +Font weight `400` + +#### Icons + +[Magnifying glass](https://design.firefox.com/icons/viewer/#search) + +[Filter funnel](https://design.firefox.com/icons/viewer/#filter) + +
+
+ +#### Color + +
+ + +
+ + +
+![Filter bar in light mode](../images/components/devtools-search-filter/search-and-filter-light.png) + +
+ +Border: Grey 25 `#e0e0e2` + +Background: White `#ffffff` + +Placeholder Text: Grey 90 `#0c0c0d` with opacity: `0.54` + +Input text: Grey 90 `#0c0c0d` + +
+
+ +
+ + + +
+ + +
+![Filter bar in dark mode](../images/components/devtools-search-filter/search-and-filter-dark.png) + +
+ +Border: `#3c3c3d` *Photon color needed* + +Background: `#141416` *Photon color needed* + +Placeholder Text: Grey 20 `#ededf0` with opacity: `0.54` + +Input text: Grey 20 `#ededf0` + +
+
+ + +
+
+ + + +
+![Filter focus ring](../images/components/devtools-search-filter/search-and-filter-focus.png) + +
+ +#### Focus + +Border color: `#0675d3` *Photon color needed* + +Shadow color: `rgba(97,181,255,.75)` *Photon color needed* + +#### Mac variation + +On macOS the search bars are given rounded edges. + +Border radius: `20px` +
+
+ + +### Console filter + +
+![Console filter bar](../images/components/devtools-search-filter/search-and-filter-console.png) + +
+The console toolbar provides users with a “Toggle filter bar” button which toggles the visibility of a secondary toolbar containing category filter buttons. + +The “Toggle filter bar” button is illustrated with the filter funnel icon, as such this icon is not repeated within the filter input field. +
+
+ +### Network Monitor filter + +
+![Network filter bar](../images/components/devtools-search-filter/search-and-filter-network.png) + +
+Upon hover, The filter input bar within the Network Monitor reveals a “Learn more about filtering” button (illustrated with the [help](https://design.firefox.com/icons/viewer/#help)/question mark icon), clicking this button directs users to an MDN article which examines Network Monitor filtering and other Network Monitor exclusive topics. +
+
+ +## Behaviour + +### Filter feedback + +
+![Filter color change on input](../images/components/devtools-search-filter/search-and-filter-change.gif) +{:.animated} + +
+The filter input bar provides visual feedback to the user depending on whether a text match is found. + +In addition to the color changes below, the clear search icon within the input field also changes to a red variant in the event that no match is discovered. +
+
+ +#### Color + +
+ + +
+ + +
+![Filter match and no match colors, light mode](../images/components/devtools-search-filter/search-and-filter-match-light.png) + +
+ +#### Match found + +Background: `#FFF89E` *photon color needed* + +Border: `#ffbf00` *photon color needed* + +#### No match found + +Background: `#ffe5e5` *photon color needed* + +Border: `#e52e2e` *photon color needed* + +
+
+ +
+ + + +
+ + +
+![Filter match and no match colors, dark mode](../images/components/devtools-search-filter/search-and-filter-match-dark.png) + +
+ +#### Match found + +Background: `#4d4222` *photon color needed* + +Border: `#d99f2b` *photon color needed* + +#### No match found + +Background: `#402325` *photon color needed* + +Border: `#cc3d3d` *photon color needed* +
+
+ + +
+
+ + +### Clear field "X" button + +
+![Clear button example](../images/components/devtools-search-filter/search-and-filter-clear.png) + +
+When text is entered into either a search or filter input bar, a “search clear” button should appear within the input area illustrated by a cross enclosed in a circle. + +Clicking the button should immediately clear any entered contents of the input field, revealing the initial placeholder text. +
+
+ +### Autocomplete box + +
+![Search bar with autocomplete popup](../images/components/devtools-search-filter/search-and-filter-autocomplete.gif) +{:.animated} + +
+Search input bars can provide the user with an optional autocomplete popup when text entered matches one or more existing patterns. + +In the Inspector, the search autocomplete box presents matches for tag and class names. +
+
+ +## Future Improvements + +### Standardising and combining + +The console requires a search interface to be exposed, this project which is currently in discussion on [Github](https://github.com/devtools-html/ux/issues/38) raises questions regarding the future of the filter interface. + +Suggestions include a custom filter doorhanger menu, a combination search/filter interface and button to reveal an additional filter input below the search bar. + +Work carried out in the console should also be considered for application to the Network Monitor in an effort to further standardise the toolbar behaviour across panels. + + + + + + diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-autocomplete.gif b/jekyll/images/components/devtools-search-filter/search-and-filter-autocomplete.gif new file mode 100644 index 000000000..dcfbd797d Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-autocomplete.gif differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-bar.png b/jekyll/images/components/devtools-search-filter/search-and-filter-bar.png new file mode 100644 index 000000000..6dfd37307 Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-bar.png differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-change.gif b/jekyll/images/components/devtools-search-filter/search-and-filter-change.gif new file mode 100644 index 000000000..7ec3d4d0c Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-change.gif differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-clear.png b/jekyll/images/components/devtools-search-filter/search-and-filter-clear.png new file mode 100644 index 000000000..0a5548018 Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-clear.png differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-console.png b/jekyll/images/components/devtools-search-filter/search-and-filter-console.png new file mode 100644 index 000000000..a45cd9cc5 Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-console.png differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-dark.png b/jekyll/images/components/devtools-search-filter/search-and-filter-dark.png new file mode 100644 index 000000000..f8f1a4139 Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-dark.png differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-focus.png b/jekyll/images/components/devtools-search-filter/search-and-filter-focus.png new file mode 100644 index 000000000..f6a63841a Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-focus.png differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-light.png b/jekyll/images/components/devtools-search-filter/search-and-filter-light.png new file mode 100644 index 000000000..40d197894 Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-light.png differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-match-dark.png b/jekyll/images/components/devtools-search-filter/search-and-filter-match-dark.png new file mode 100644 index 000000000..166575b33 Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-match-dark.png differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-match-light.png b/jekyll/images/components/devtools-search-filter/search-and-filter-match-light.png new file mode 100644 index 000000000..6d53666c4 Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-match-light.png differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-network.png b/jekyll/images/components/devtools-search-filter/search-and-filter-network.png new file mode 100644 index 000000000..60f208358 Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-network.png differ diff --git a/jekyll/images/components/devtools-search-filter/search-and-filter-usage.png b/jekyll/images/components/devtools-search-filter/search-and-filter-usage.png new file mode 100644 index 000000000..427c7bb4f Binary files /dev/null and b/jekyll/images/components/devtools-search-filter/search-and-filter-usage.png differ