-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Drop core-js in favour of custom fallbacks #1725
Changes from 2 commits
f04fb49
82ef6f6
d7ec692
f222575
4e85653
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -56,7 +56,7 @@ | |
"prepublishOnly": "yarn build" | ||
}, | ||
"dependencies": { | ||
"@babel/runtime-corejs2": "^7.6.3", | ||
"@babel/runtime": "^7.6.3", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. thanks for sorting this! |
||
"css-box-model": "^1.2.0", | ||
"memoize-one": "^5.1.1", | ||
"raf-schd": "^4.0.2", | ||
|
@@ -96,6 +96,7 @@ | |
"eslint-config-prettier": "^6.4.0", | ||
"eslint-plugin-cypress": "^2.7.0", | ||
"eslint-plugin-emotion": "^10.0.14", | ||
"eslint-plugin-es5": "^1.4.1", | ||
"eslint-plugin-flowtype": "^4.3.0", | ||
"eslint-plugin-import": "^2.18.2", | ||
"eslint-plugin-jest": "^22.20.0", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
// @flow | ||
// https://allyjs.io/tutorials/hiding-elements.html | ||
// Element is visually hidden but is readable by screen readers | ||
const assignVisuallyHidden = (style: Object) => { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I prefer my functions not to mutate. Are we avoiding Object.assign? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes. Object.assign need to be polyfilled. Though in this case much easier to use mutation. I think this is ok for this particular function. object assign ponyfill would mutate too. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We use spread There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Spread uses extends helpers which comes from There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. But it won’t use that if you use object.assign. Can we import extends from Babel runtime and use that for the assign? 🤔 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. My ideal is to not have a function modify the passed in object but rather to return a new object (or to do the Object.assign in place) But I am okay to not get hung up on it and merge soon |
||
style.position = 'absolute'; | ||
style.width = '1px'; | ||
style.height = '1px'; | ||
style.margin = '-1px'; | ||
style.border = '0'; | ||
style.padding = '0'; | ||
style.overflow = 'hidden'; | ||
style.clip = 'rect(0 0 0 0)'; | ||
style['clip-path'] = 'inset(100%)'; | ||
}; | ||
|
||
export default assignVisuallyHidden; |
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!