-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
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
[utils] Add support for forwardRef components in getDisplayName #14429
Changes from all commits
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 |
---|---|---|
|
@@ -28,13 +28,13 @@ module.exports = [ | |
name: 'The size of the @material-ui/core modules', | ||
webpack: true, | ||
path: 'packages/material-ui/build/index.js', | ||
limit: '91.3 KB', | ||
limit: '91.2 KB', | ||
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. |
||
}, | ||
{ | ||
name: 'The size of the @material-ui/styles modules', | ||
webpack: true, | ||
path: 'packages/material-ui-styles/build/index.js', | ||
limit: '16.3 KB', | ||
limit: '16.4 KB', | ||
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. For some reason 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. It does not appear in the esm bundle. I would keep this for now and revisit what bundles we monitor for size later. |
||
}, | ||
{ | ||
name: 'The size of the @material-ui/system modules', | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,6 @@ describe('<MenuList />', () => { | |
}); | ||
|
||
it('should render a List', () => { | ||
assert.strictEqual(wrapper.name(), 'List'); | ||
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. Not sure why you would test here for that specific component. Would |
||
assert.strictEqual(wrapper.props()['data-test'], 'hi'); | ||
assert.strictEqual(wrapper.hasClass('test-class'), true); | ||
}); | ||
|
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.
This is also required for
react-dev-tools
to generate a meaningful display name forforwardRef
components. The correct exception would be to allow them only inforwardRef
.