From 83f740c34d2bf9b70d53db82234c8716db8f1ac3 Mon Sep 17 00:00:00 2001 From: Esteban Munoz Date: Tue, 22 Nov 2022 15:04:41 -0700 Subject: [PATCH 1/3] reverting margin fix for safari --- .../__snapshots__/Breadcrumb.test.tsx.snap | 20 -- .../components/Button/BaseButton.styles.ts | 4 +- .../src/components/Button/BaseButton.tsx | 6 +- .../Button.deprecated.test.tsx.snap | 4 - .../Button/__snapshots__/Button.test.tsx.snap | 24 --- .../__snapshots__/ComboBox.test.tsx.snap | 24 --- .../CommandBar.deprecated.test.tsx.snap | 8 - .../__snapshots__/CommandBar.test.tsx.snap | 16 -- .../ContextualMenu.test.tsx.snap | 4 - .../Dialog.deprecated.test.tsx.snap | 4 - .../__snapshots__/Dropdown.test.tsx.snap | 8 - .../__snapshots__/Facepile.test.tsx.snap | 4 - .../Nav/__snapshots__/Nav.test.tsx.snap | 12 -- .../Panel/__snapshots__/Panel.test.tsx.snap | 3 - .../Pivot.deprecated.test.tsx.snap | 6 - .../Pivot/__snapshots__/Pivot.test.tsx.snap | 60 ------ .../__snapshots__/SpinButton.test.tsx.snap | 16 -- .../SwatchColorPicker.test.tsx.snap | 48 ----- .../TeachingBubble.deprecated.test.tsx.snap | 8 - .../TeachingBubble.test.tsx.snap | 8 - .../__snapshots__/PeoplePicker.test.tsx.snap | 4 - .../__snapshots__/Suggestions.test.tsx.snap | 180 ------------------ .../__snapshots__/TagItem.test.tsx.snap | 12 -- .../__snapshots__/TagPicker.test.tsx.snap | 8 - 24 files changed, 4 insertions(+), 487 deletions(-) diff --git a/packages/react/src/components/Breadcrumb/__snapshots__/Breadcrumb.test.tsx.snap b/packages/react/src/components/Breadcrumb/__snapshots__/Breadcrumb.test.tsx.snap index 2f0986de63acd3..4ad916ae756789 100644 --- a/packages/react/src/components/Breadcrumb/__snapshots__/Breadcrumb.test.tsx.snap +++ b/packages/react/src/components/Breadcrumb/__snapshots__/Breadcrumb.test.tsx.snap @@ -82,10 +82,6 @@ exports[`Breadcrumb rendering renders correctly with custom overflow icon 1`] = font-size: 16px; font-weight: 400; height: 100%; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; overflow: hidden; padding-bottom: 0; @@ -1319,10 +1315,6 @@ exports[`Breadcrumb rendering renders correctly with maxDisplayedItems and overf font-size: 16px; font-weight: 400; height: 100%; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; overflow: hidden; padding-bottom: 0; @@ -1536,10 +1528,6 @@ exports[`Breadcrumb rendering renders correctly with maxDisplayedItems and overf font-size: 16px; font-weight: 400; height: 100%; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; overflow: hidden; padding-bottom: 0; @@ -1753,10 +1741,6 @@ exports[`Breadcrumb rendering renders correctly with overflow 1`] = ` font-size: 16px; font-weight: 400; height: 100%; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; overflow: hidden; padding-bottom: 0; @@ -2258,10 +2242,6 @@ exports[`Breadcrumb rendering renders correctly with overflow and overflowIndex font-size: 16px; font-weight: 400; height: 100%; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; overflow: hidden; padding-bottom: 0; diff --git a/packages/react/src/components/Button/BaseButton.styles.ts b/packages/react/src/components/Button/BaseButton.styles.ts index 984a7153b75cf7..a11ded5b9ec6e4 100644 --- a/packages/react/src/components/Button/BaseButton.styles.ts +++ b/packages/react/src/components/Button/BaseButton.styles.ts @@ -9,7 +9,7 @@ const noOutline: IRawStyle = { const iconStyle = (fontSize?: string | number): IRawStyle => { return { - fontSize: fontSize, + fontSize, margin: '0 4px', height: '16px', lineHeight: '16px', @@ -48,8 +48,6 @@ export const getStyles = memoizeFunction( boxSizing: 'border-box', cursor: 'pointer', display: 'inline-block', - // This removes the 2px margin Safari adds to all buttons - margin: 0, padding: '0 16px', textDecoration: 'none', textAlign: 'center', diff --git a/packages/react/src/components/Button/BaseButton.tsx b/packages/react/src/components/Button/BaseButton.tsx index f608de319dd041..57368ea0e5bbef 100644 --- a/packages/react/src/components/Button/BaseButton.tsx +++ b/packages/react/src/components/Button/BaseButton.tsx @@ -714,9 +714,9 @@ export class BaseButton extends React.Component Date: Tue, 22 Nov 2022 15:05:48 -0700 Subject: [PATCH 2/3] change file --- ...luentui-react-b1886c50-127e-4b1f-81c8-81013fd2c50a.json | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 change/@fluentui-react-b1886c50-127e-4b1f-81c8-81013fd2c50a.json diff --git a/change/@fluentui-react-b1886c50-127e-4b1f-81c8-81013fd2c50a.json b/change/@fluentui-react-b1886c50-127e-4b1f-81c8-81013fd2c50a.json new file mode 100644 index 00000000000000..20eefa817f6599 --- /dev/null +++ b/change/@fluentui-react-b1886c50-127e-4b1f-81c8-81013fd2c50a.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "fix: Revert fix for margin added by safari.", + "packageName": "@fluentui/react", + "email": "esteban.230@hotmail.com", + "dependentChangeType": "patch" +} From c7241520bb8d801b92ace133447fbe53225ad60f Mon Sep 17 00:00:00 2001 From: Esteban Munoz Date: Tue, 22 Nov 2022 15:34:22 -0700 Subject: [PATCH 3/3] updating snapshots --- .../__snapshots__/MicroFeedback.test.tsx.snap | 16 ------ .../__snapshots__/Pagination.test.tsx.snap | 56 ------------------- .../SelectedPeopleList.test.tsx.snap | 28 ---------- .../UnifiedPeoplePicker.test.tsx.snap | 7 --- 4 files changed, 107 deletions(-) diff --git a/packages/react-experiments/src/components/MicroFeedback/__snapshots__/MicroFeedback.test.tsx.snap b/packages/react-experiments/src/components/MicroFeedback/__snapshots__/MicroFeedback.test.tsx.snap index d5a3bb2ba466cc..a29bed56bb80f8 100644 --- a/packages/react-experiments/src/components/MicroFeedback/__snapshots__/MicroFeedback.test.tsx.snap +++ b/packages/react-experiments/src/components/MicroFeedback/__snapshots__/MicroFeedback.test.tsx.snap @@ -55,10 +55,6 @@ exports[`MicroFeedback renders correctly with inline prop set 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -187,10 +183,6 @@ exports[`MicroFeedback renders correctly with inline prop set 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -359,10 +351,6 @@ exports[`MicroFeedback renders correctly with no props 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -491,10 +479,6 @@ exports[`MicroFeedback renders correctly with no props 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; diff --git a/packages/react-experiments/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap b/packages/react-experiments/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap index 5af7b1fef59d20..ad6c87d4e61d84 100644 --- a/packages/react-experiments/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap +++ b/packages/react-experiments/src/components/Pagination/__snapshots__/Pagination.test.tsx.snap @@ -34,10 +34,6 @@ exports[`Pagination render buttons Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -167,10 +163,6 @@ exports[`Pagination render buttons Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -299,10 +291,6 @@ exports[`Pagination render buttons Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; min-height: 32px; min-width: 32px; outline: transparent; @@ -409,10 +397,6 @@ exports[`Pagination render buttons Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; min-height: 32px; min-width: 32px; outline: transparent; @@ -519,10 +503,6 @@ exports[`Pagination render buttons Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; min-height: 32px; min-width: 32px; outline: transparent; @@ -629,10 +609,6 @@ exports[`Pagination render buttons Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; min-height: 32px; min-width: 32px; outline: transparent; @@ -739,10 +715,6 @@ exports[`Pagination render buttons Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; min-height: 32px; min-width: 32px; outline: transparent; @@ -847,10 +819,6 @@ exports[`Pagination render buttons Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -992,10 +960,6 @@ exports[`Pagination render buttons Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -1164,10 +1128,6 @@ exports[`Pagination render comboBox Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -1297,10 +1257,6 @@ exports[`Pagination render comboBox Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -1649,10 +1605,6 @@ exports[`Pagination render comboBox Pagination correctly 1`] = ` font-weight: 400; height: 100%; line-height: 30px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -1804,10 +1756,6 @@ exports[`Pagination render comboBox Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -1935,10 +1883,6 @@ exports[`Pagination render comboBox Pagination correctly 1`] = ` font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; diff --git a/packages/react-experiments/src/components/SelectedItemsList/SelectedPeopleList/__snapshots__/SelectedPeopleList.test.tsx.snap b/packages/react-experiments/src/components/SelectedItemsList/SelectedPeopleList/__snapshots__/SelectedPeopleList.test.tsx.snap index 2db0031b981dcd..933beed0b96c6c 100644 --- a/packages/react-experiments/src/components/SelectedItemsList/SelectedPeopleList/__snapshots__/SelectedPeopleList.test.tsx.snap +++ b/packages/react-experiments/src/components/SelectedItemsList/SelectedPeopleList/__snapshots__/SelectedPeopleList.test.tsx.snap @@ -72,10 +72,7 @@ Array [ font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; margin-right: -17px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -395,10 +392,6 @@ Array [ font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -587,10 +580,7 @@ Array [ font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; margin-right: -17px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -910,10 +900,6 @@ Array [ font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -1107,10 +1093,7 @@ Array [ font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; margin-right: -17px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -1430,10 +1413,6 @@ Array [ font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -1622,10 +1601,7 @@ Array [ font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; margin-right: -17px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -1945,10 +1921,6 @@ Array [ font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; diff --git a/packages/react-experiments/src/components/UnifiedPicker/UnifiedPeoplePicker/__snapshots__/UnifiedPeoplePicker.test.tsx.snap b/packages/react-experiments/src/components/UnifiedPicker/UnifiedPeoplePicker/__snapshots__/UnifiedPeoplePicker.test.tsx.snap index 9eaedc3c7959db..c6b565fe8bab29 100644 --- a/packages/react-experiments/src/components/UnifiedPicker/UnifiedPeoplePicker/__snapshots__/UnifiedPeoplePicker.test.tsx.snap +++ b/packages/react-experiments/src/components/UnifiedPicker/UnifiedPeoplePicker/__snapshots__/UnifiedPeoplePicker.test.tsx.snap @@ -298,10 +298,7 @@ exports[`UnifiedPeoplePicker renders correctly with selected and suggested items font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; margin-right: -17px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px; @@ -811,10 +808,6 @@ exports[`UnifiedPeoplePicker renders correctly with selected and suggested items font-size: 14px; font-weight: 400; height: 32px; - margin-bottom: 0px; - margin-left: 0px; - margin-right: 0px; - margin-top: 0px; outline: transparent; padding-bottom: 0; padding-left: 4px;