Skip to content

Commit a4f5e7d

Browse files
mrcthmsjesstelford
andauthored
[TextField] Remove disable1Password prop (#10744)
Removes the deprecated `disable1Password` prop. ### 🎩 checklist - [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: Jess Telford <jess.telford@shopify.com>
1 parent a95ed6c commit a4f5e7d

File tree

5 files changed

+6
-24
lines changed

5 files changed

+6
-24
lines changed

.changeset/fifty-wombats-battle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@shopify/polaris': major
3+
---
4+
5+
Removed deprecated `disable1Password` prop from `TextField`.

polaris-react/src/components/Tabs/components/CreateViewModal/CreateViewModal.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,6 @@ export function CreateViewModal({
111111
)
112112
: undefined
113113
}
114-
disable1Password
115114
/>
116115
</div>
117116
</FormLayout>

polaris-react/src/components/TextField/TextField.stories.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -882,7 +882,6 @@ export function With1PasswordDisabled() {
882882
value={value}
883883
onChange={handleChange}
884884
autoComplete="off"
885-
disable1Password
886885
/>
887886
);
888887
}

polaris-react/src/components/TextField/TextField.tsx

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -175,11 +175,6 @@ interface NonMutuallyExclusiveProps {
175175
onFocus?: (event?: React.FocusEvent) => void;
176176
/** Callback fired when input is blurred */
177177
onBlur?(event?: React.FocusEvent): void;
178-
/**
179-
* @deprecated Turning off 1Password and LastPass password manager autofill is done automatically when `autocomplete` is set to `off`.
180-
* Disables the 1password extension on the text field.
181-
*/
182-
disable1Password?: boolean;
183178
}
184179

185180
export type MutuallyExclusiveSelectionProps =
@@ -246,7 +241,6 @@ export function TextField({
246241
onSpinnerChange,
247242
onFocus,
248243
onBlur,
249-
disable1Password,
250244
}: TextFieldProps) {
251245
const i18n = useI18n();
252246
const [height, setHeight] = useState<number | null>(null);
@@ -565,7 +559,7 @@ export function TextField({
565559
onChange: !suggestion ? handleChange : undefined,
566560
onInput: suggestion ? handleChange : undefined,
567561
// 1Password disable data attribute
568-
'data-1p-ignore': autoComplete === 'off' || disable1Password || undefined,
562+
'data-1p-ignore': autoComplete === 'off' || undefined,
569563
// LastPass disable data attribute
570564
'data-lpignore': autoComplete === 'off' || undefined,
571565
// Dashlane disable data attribute

polaris-react/src/components/TextField/tests/TextField.test.tsx

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -85,21 +85,6 @@ describe('<TextField />', () => {
8585
});
8686
});
8787

88-
it('adds the 1Password disable prop if disable1Password is set', () => {
89-
const textField = mountWithApp(
90-
<TextField
91-
label="TextField"
92-
onChange={noop}
93-
autoComplete="off"
94-
disable1Password
95-
/>,
96-
);
97-
98-
expect(textField).toContainReactComponent('input', {
99-
'data-1p-ignore': true,
100-
} as any);
101-
});
102-
10388
it('adds the password manager disabled props if autoComplete="off" is set', () => {
10489
const textField = mountWithApp(
10590
<TextField label="TextField" onChange={noop} autoComplete="off" />,

0 commit comments

Comments
 (0)