Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TextField] Revert #6143 and make expecting onBlur event arg optional #6224

Merged
merged 2 commits into from Jun 17, 2022

Conversation

chloerice
Copy link
Member

@chloerice chloerice commented Jun 17, 2022

WHY are these changes introduced?

#6143 exposed the event being passed into onBlur but didn't make expecting onBlur to be called with the event. That PR also took away the optionality of the expecting onFocus to be called with the event. Both of these changes cause type errors upstream in consuming TypeScript apps, making 9.17.0 an unsafe release.

WHAT is this pull request doing?

This PR reverts #6143 and makes the expecting onBlur to be called with the event optional.

How to 🎩

🖥 Local development instructions
🗒 General tophatting guidelines
📄 Changelog guidelines

Copy-paste this code in playground/Playground.tsx:
import React from 'react';
import {Page} from '../src';

export function Playground() {
  return (
    <Page title="Playground">
      {/* Add the code you want to test in here */}
    </Page>
  );
}

🎩 checklist

@chloerice chloerice added the Bug Something is broken and not working as intended in the system. label Jun 17, 2022
@chloerice chloerice self-assigned this Jun 17, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 17, 2022

size-limit report 📦

Path Size
polaris-react-cjs 196.83 KB (0%)
polaris-react-esm 132.14 KB (0%)
polaris-react-esnext 187.8 KB (0%)
polaris-react-css 42.16 KB (0%)

@chloerice
Copy link
Member Author

/snapit

@github-actions
Copy link
Contributor

🫰✨ Thanks @chloerice! Your snapshot has been published to npm.

Test the snapshot by updating your package.json with the newly published version:

yarn add @shopify/polaris@0.0.0-snapshot-release-20220617103156

@chloerice chloerice merged commit d75dff1 into main Jun 17, 2022
@chloerice chloerice deleted the revert-textfield-event branch June 17, 2022 10:43
@github-actions github-actions bot mentioned this pull request Jun 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken and not working as intended in the system.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant