[IconButton] add purerender mixin#1545
[IconButton] add purerender mixin#1545shaurya947 merged 1 commit intomui:masterfrom oliviertassinari:iconbutton-pure
Conversation
|
@shaurya947 Done. |
src/icon-button.jsx
Outdated
[IconButton] add purerender mixin
|
Thanks @oliviertassinari! |
There was a problem hiding this comment.
@shaurya947 I was using the context props before. I completely overlook this during the rebase! Is muiTheme working?
There was a problem hiding this comment.
I would say that this doesn't work. I think that we need to pass context.muiTheme instead of context to the getRelevantContextKeys in the pure-render.
There was a problem hiding this comment.
Yup, exactly what I was thinking. The argument needs to be changed in the context-pure mixin. Could you submit a PR for this?
There was a problem hiding this comment.
and what about https://github.com/callemall/material-ui/blob/master/src/buttons/flat-button-label.jsx#L44 that doesn't use any argument?
There was a problem hiding this comment.
That also needs to be changed to look like this:
getRelevantContextKeys(muiTheme) {
return {
spacingDesktopGutterLess: muiTheme.rawTheme.spacing.desktopGutterLess,
};
},and call it using this.state.muiTheme wherever it's called in the file. Please let me know if you find any more incorrect definitions of these functions in the source. Thanks!
There was a problem hiding this comment.
Ok I'm gonna make a PR for this
There was a problem hiding this comment.
Cool, I've merged the new theming documentation in #1716. So make sure to rebase if you need to!
There was a problem hiding this comment.
It's also in src/card/card-expandable.jsx and src/text-field.jsx
There was a problem hiding this comment.
Yeap. Question. Is the context required to render a component?
There was a problem hiding this comment.
I've added you to a room in Gitter: shaurya947/context-pure-fix
Let's chat about this there.
* Rename MuiPickersUtilsPorvider => LocalizationProvider * Improve utils typings * Implement global format override * [docs] Change name of date-io customization page * Update examples to include new wording * Fix prop-types typescript error * Add daetAdapter prop for passing date-io utils directly to component * Update percy and cypress * Unskip flaky test * Fix typo in error message * Fix cypress test * One more try to fix flaky test * Remove flaky test * Fix visual regression scenarios tests with new version of cypress * Run cypress tests in chrome * Ignore dark theme change in snapshots * Try to fix example styles one more time * Fix inccorect name of cypress executor * Try weird hack to reinject styles * Optimize theme toggling for visual regression * Update scenario names to get rid of duplications * Rename `adapter` => `dateAdapter` * Rename libFormats => dateFormats, libInstance => dateLibInstance * Remove version-specific code from README.md * Fix documentation erros in installation guide * Run prettier on README.md * Use edge="end" for keyboard adornment icons, closes mui#1545
Related to #1176.