Skip to content

Commit

Permalink
[Button] Remove connectedDisclosure (#10182)
Browse files Browse the repository at this point in the history
<!--
  ☝️How to write a good PR title:
- Prefix it with [ComponentName] (if applicable), for example: [Button]
  - Start with a verb, for example: Add, Delete, Improve, Fix…
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

### WHY are these changes introduced?

Fixes #10126

<!--
  Context about the problem that’s being addressed.
-->

### WHAT is this pull request doing?

Removes all code related to connectedDisclosure
Updates the split example to use Popover, ActionList, and ButtonGroup
  • Loading branch information
kyledurand committed Aug 24, 2023
1 parent b585808 commit e814c0e
Show file tree
Hide file tree
Showing 38 changed files with 113 additions and 457 deletions.
5 changes: 5 additions & 0 deletions .changeset/honest-stingrays-act.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@shopify/polaris': major
---

Removed connectedDislosure prop on button
3 changes: 2 additions & 1 deletion documentation/guides/migrating-from-v11-to-v12.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,5 @@ Secondary, becomes oneThird:
`npx @shopify/polaris-migrator react-rename-component <path> --renameFrom="HorizontalGrid" --renameTo="InlineGrid" --renamePropsFrom="HorizontalGridProps" --renamePropsTo="InlineGridProps"`

**Button**
// TODO

- connectedDisclosure: [See the updated split example](https://polaris.shopify.com/components/actions/button)
3 changes: 1 addition & 2 deletions polaris-react/locales/cs.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Zavřít notifikaci"
},
"Button": {
"spinnerAccessibilityLabel": "Načítání",
"connectedDisclosureAccessibilityLabel": "Související akce"
"spinnerAccessibilityLabel": "Načítání"
},
"Common": {
"checkbox": "zaškrtávací pole",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Afvis meddelelse"
},
"Button": {
"spinnerAccessibilityLabel": "Indlæser",
"connectedDisclosureAccessibilityLabel": "Relaterede handlinger"
"spinnerAccessibilityLabel": "Indlæser"
},
"Common": {
"checkbox": "afkrydsningsfelt",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Benachrichtigung verwerfen"
},
"Button": {
"spinnerAccessibilityLabel": "Wird geladen",
"connectedDisclosureAccessibilityLabel": "Ähnliche Aktionen"
"spinnerAccessibilityLabel": "Wird geladen"
},
"Common": {
"checkbox": "Kontrollkästchen",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@
"dismissButton": "Dismiss notification"
},
"Button": {
"spinnerAccessibilityLabel": "Loading",
"connectedDisclosureAccessibilityLabel": "Related actions"
"spinnerAccessibilityLabel": "Loading"
},
"Common": {
"checkbox": "checkbox",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/es.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Descartar notificación"
},
"Button": {
"spinnerAccessibilityLabel": "Cargando",
"connectedDisclosureAccessibilityLabel": "Acciones relacionadas"
"spinnerAccessibilityLabel": "Cargando"
},
"Common": {
"checkbox": "casilla de verificación",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/fi.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Ohita ilmoitus"
},
"Button": {
"spinnerAccessibilityLabel": "Ladataan",
"connectedDisclosureAccessibilityLabel": "Aiheeseen liittyvät toimenpiteet"
"spinnerAccessibilityLabel": "Ladataan"
},
"Common": {
"checkbox": "valintaruutu",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Rejeter la notification"
},
"Button": {
"spinnerAccessibilityLabel": "Chargement en cours",
"connectedDisclosureAccessibilityLabel": "Actions associées"
"spinnerAccessibilityLabel": "Chargement en cours"
},
"Common": {
"checkbox": "case à cocher",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/it.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Elimina notifica"
},
"Button": {
"spinnerAccessibilityLabel": "Caricamento in corso",
"connectedDisclosureAccessibilityLabel": "Azioni correlate"
"spinnerAccessibilityLabel": "Caricamento in corso"
},
"Common": {
"checkbox": "casella di spunta",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "通知を閉じる"
},
"Button": {
"spinnerAccessibilityLabel": "読み込み中",
"connectedDisclosureAccessibilityLabel": "関連したアクション"
"spinnerAccessibilityLabel": "読み込み中"
},
"Common": {
"checkbox": "チェックボックス",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/ko.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "알림 무시"
},
"Button": {
"spinnerAccessibilityLabel": "로드 중",
"connectedDisclosureAccessibilityLabel": "관련 작업"
"spinnerAccessibilityLabel": "로드 중"
},
"Common": {
"checkbox": "확인란",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/nb.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Avvis varsel"
},
"Button": {
"spinnerAccessibilityLabel": "Laster inn",
"connectedDisclosureAccessibilityLabel": "Relaterte handlinger"
"spinnerAccessibilityLabel": "Laster inn"
},
"Common": {
"checkbox": "avmerkingsboks",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/nl.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Melding sluiten"
},
"Button": {
"spinnerAccessibilityLabel": "Laden",
"connectedDisclosureAccessibilityLabel": "Gerelateerde acties"
"spinnerAccessibilityLabel": "Laden"
},
"Common": {
"checkbox": "selectievakje",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/pl.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Odrzuć powiadomienie"
},
"Button": {
"spinnerAccessibilityLabel": "Ładowanie",
"connectedDisclosureAccessibilityLabel": "Powiązane czynności"
"spinnerAccessibilityLabel": "Ładowanie"
},
"Common": {
"checkbox": "pole wyboru",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/pt-BR.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Dispensar notificação"
},
"Button": {
"spinnerAccessibilityLabel": "Carregando",
"connectedDisclosureAccessibilityLabel": "Ações relacionadas"
"spinnerAccessibilityLabel": "Carregando"
},
"Common": {
"checkbox": "caixa de seleção",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/pt-PT.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Ignorar notificação"
},
"Button": {
"spinnerAccessibilityLabel": "A carregar",
"connectedDisclosureAccessibilityLabel": "Ações relacionadas"
"spinnerAccessibilityLabel": "A carregar"
},
"Common": {
"checkbox": "caixa de verificação",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/sv.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Avvisa avisering"
},
"Button": {
"spinnerAccessibilityLabel": "Laddar",
"connectedDisclosureAccessibilityLabel": "Relaterade åtgärder"
"spinnerAccessibilityLabel": "Laddar"
},
"Common": {
"checkbox": "kryssruta",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/th.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "ปิดการแจ้งเตือน"
},
"Button": {
"spinnerAccessibilityLabel": "กำลังโหลด",
"connectedDisclosureAccessibilityLabel": "การดำเนินการที่เกี่ยวข้อง"
"spinnerAccessibilityLabel": "กำลังโหลด"
},
"Common": {
"checkbox": "ช่องทำเครื่องหมาย",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/tr.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Bildirimi kapat"
},
"Button": {
"spinnerAccessibilityLabel": "Yükleniyor",
"connectedDisclosureAccessibilityLabel": "İlgili işlemler"
"spinnerAccessibilityLabel": "Yükleniyor"
},
"Common": {
"checkbox": "onay kutusu",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/vi.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "Bỏ qua thông báo"
},
"Button": {
"spinnerAccessibilityLabel": "Đang tải",
"connectedDisclosureAccessibilityLabel": "Thao tác có liên quan"
"spinnerAccessibilityLabel": "Đang tải"
},
"Common": {
"checkbox": "hộp kiểm",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/zh-CN.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "忽略通知"
},
"Button": {
"spinnerAccessibilityLabel": "正在加载",
"connectedDisclosureAccessibilityLabel": "相关操作"
"spinnerAccessibilityLabel": "正在加载"
},
"Common": {
"checkbox": "复选框",
Expand Down
3 changes: 1 addition & 2 deletions polaris-react/locales/zh-TW.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
"dismissButton": "關閉通知"
},
"Button": {
"spinnerAccessibilityLabel": "載入中",
"connectedDisclosureAccessibilityLabel": "相關動作"
"spinnerAccessibilityLabel": "載入中"
},
"Common": {
"checkbox": "核取方塊",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
}
}

&.destructive {
&.critical {
a,
button {
color: var(--p-color-text-critical) !important;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function SecondaryAction({
<div
className={classNames(
styles.SecondaryAction,
tone === 'critical' && styles.destructive,
tone === 'critical' && styles.critical,
)}
ref={secondaryActionsRef}
>
Expand Down
Loading

0 comments on commit e814c0e

Please sign in to comment.