Skip to content

Commit

Permalink
[Filters] Add support for indicating an applied filter has unsaved ch…
Browse files Browse the repository at this point in the history
…anges (#11783)

### WHY are these changes introduced?

Part of Shopify/web#76490

### WHAT is this pull request doing?

Adds support for indicating unsaved changes have been made to the
applied filters.

![Screenshot 2024-04-04 at 4 26
23 PM](https://github.com/Shopify/polaris/assets/18447883/7133939e-c313-4cd2-bac3-8aac8e603a0d)

### How to 🎩
📚
[Storybook](https://5d559397bae39100201eedc1-fbscsztkor.chromatic.com/?path=/story/all-components-filters--with-children-content-and-unsaved-changes)
🌀
[Spinstance](https://admin.web.unsaved-indexfilter-changes.chloe-rice.us.spin.dev/store/shop1/products?selectedView=all&status=ACTIVE)

🖥 [Local development
instructions](https://github.com/Shopify/polaris/blob/main/README.md#install-dependencies-and-build-workspaces)
🗒 [General tophatting
guidelines](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md)
📄 [Changelog
guidelines](https://github.com/Shopify/polaris/blob/main/.github/CONTRIBUTING.md#changelog)

### 🎩 checklist

- [x] Tested a
[snapshot](https://github.com/Shopify/polaris/blob/main/documentation/Releasing.md#-snapshot-releases)
- [x] Tested on
[mobile](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting.md#cross-browser-testing)
- [x] Tested on [multiple
browsers](https://help.shopify.com/en/manual/shopify-admin/supported-browsers)
- [x] Tested for
[accessibility](https://github.com/Shopify/polaris/blob/main/documentation/Accessibility%20testing.md)
- [x] Updated the component's `README.md` with documentation changes
- [x] [Tophatted
documentation](https://github.com/Shopify/polaris/blob/main/documentation/Tophatting%20documentation.md)
changes in the style guide

---------

Co-authored-by: translation-platform[bot] <34770790+translation-platform[bot]@users.noreply.github.com>
  • Loading branch information
chloerice and translation-platform[bot] authored Apr 5, 2024
1 parent 99972a5 commit 0bf817a
Show file tree
Hide file tree
Showing 28 changed files with 799 additions and 71 deletions.
5 changes: 5 additions & 0 deletions .changeset/cold-windows-occur.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': minor
---

Added support to `Filters` for indicating `appliedFilters` have unsaved changes
3 changes: 2 additions & 1 deletion polaris-react/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@
"accessibilityLabel": "Ukončit režim celé obrazovky"
},
"FilterPill": {
"clear": "Vymazat"
"clear": "Vymazat",
"unsavedChanges": "Neuložené změny: {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Hledat a filtrovat",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"accessibilityLabel": "Vollbildmodus beenden"
},
"FilterPill": {
"clear": "Löschen"
"clear": "Löschen",
"unsavedChanges": "Nicht gespeicherte Änderungen – {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Suchen und filtern",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,8 @@
"searchInView": "in:{viewName}"
},
"FilterPill": {
"clear": "Clear"
"clear": "Clear",
"unsavedChanges": "Unsaved changes - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Search and filter",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"accessibilityLabel": "Poistu koko näytön tilasta"
},
"FilterPill": {
"clear": "Tyhjennä"
"clear": "Tyhjennä",
"unsavedChanges": "Tallentamattomat muutokset – {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Haku ja suodatus",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@
"accessibilityLabel": "Quitter le mode plein écran"
},
"FilterPill": {
"clear": "Effacer"
"clear": "Effacer",
"unsavedChanges": "Modifications non enregistrées - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Rechercher et filtrer",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@
"accessibilityLabel": "Esci dalla modalità schermo intero"
},
"FilterPill": {
"clear": "Cancella"
"clear": "Cancella",
"unsavedChanges": "Modifiche non salvate - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Cerca e filtra",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"accessibilityLabel": "フルスクリーンモードを閉じる"
},
"FilterPill": {
"clear": "クリア"
"clear": "クリア",
"unsavedChanges": "未保存の変更 - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "検索と絞り込み",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"accessibilityLabel": "전체 화면 모드 종료"
},
"FilterPill": {
"clear": "지우기"
"clear": "지우기",
"unsavedChanges": "저장되지 않은 변경 사항 - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "검색 및 필터링",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,8 @@
"accessibilityLabel": "Zakończ tryb pełnoekranowy"
},
"FilterPill": {
"clear": "Wyczyść"
"clear": "Wyczyść",
"unsavedChanges": "Niezapisane zmiany – {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Wyszukaj i przefiltruj",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,8 @@
"accessibilityLabel": "Sair do modo ecrã inteiro"
},
"FilterPill": {
"clear": "Limpar"
"clear": "Limpar",
"unsavedChanges": "Alterações não guardadas - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Pesquisar e filtrar",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"accessibilityLabel": "Lämna helskärmsläget"
},
"FilterPill": {
"clear": "Rensa"
"clear": "Rensa",
"unsavedChanges": "Ej sparade ändringar – {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Sök och filtrera",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"accessibilityLabel": "ออกจากโหมดเต็มหน้าจอ"
},
"FilterPill": {
"clear": "ล้าง"
"clear": "ล้าง",
"unsavedChanges": "การเปลี่ยนแปลงที่ไม่ได้บันทึก - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "ค้นหาและกรอง",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"accessibilityLabel": "Tam ekran modundan çık"
},
"FilterPill": {
"clear": "Temizle"
"clear": "Temizle",
"unsavedChanges": "Kaydedilmemiş değişiklikler - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Arama ve filtreleme",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"accessibilityLabel": "Thoát chế độ toàn màn hình"
},
"FilterPill": {
"clear": "Xóa"
"clear": "Xóa",
"unsavedChanges": "Thay đổi chưa lưu - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "Tìm kiếm và lọc",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"accessibilityLabel": "退出全屏模式"
},
"FilterPill": {
"clear": "清除"
"clear": "清除",
"unsavedChanges": "未保存的更改 - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "搜索和筛选",
Expand Down
3 changes: 2 additions & 1 deletion polaris-react/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -358,7 +358,8 @@
"accessibilityLabel": "退出全螢幕模式"
},
"FilterPill": {
"clear": "清除"
"clear": "清除",
"unsavedChanges": "尚未儲存的變更 - {label}"
},
"IndexFilters": {
"searchFilterTooltip": "搜尋及篩選",
Expand Down
Loading

0 comments on commit 0bf817a

Please sign in to comment.