Skip to content

[API] Use onClose over onRequestClose#9451

Merged
oliviertassinari merged 1 commit intomui:v1-betafrom
oliviertassinari:onclose
Dec 10, 2017
Merged

[API] Use onClose over onRequestClose#9451
oliviertassinari merged 1 commit intomui:v1-betafrom
oliviertassinari:onclose

Conversation

@oliviertassinari
Copy link
Copy Markdown
Member

@oliviertassinari oliviertassinari commented Dec 9, 2017

Breaking change

Most of our components are stateless by default. It wasn't the case with v0.x. Let's translate this default behavior in the property names of v1.

-onRequestClose
-onRequestOpen
-onRequestDelete
+onClose
+onOpen
+onDelete

@oliviertassinari oliviertassinari added the breaking change Introduces changes that are not backward compatible. label Dec 9, 2017
@oliviertassinari oliviertassinari force-pushed the onclose branch 3 times, most recently from bcd2b65 to 11f17c3 Compare December 9, 2017 14:47
@oliviertassinari
Copy link
Copy Markdown
Member Author

cc @mui-org/core-contributors

Copy link
Copy Markdown
Contributor

@rosskevin rosskevin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes please.

Copy link
Copy Markdown
Collaborator

@kgregory kgregory left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a nice improvement to the API.

@oliviertassinari oliviertassinari merged commit b9da111 into mui:v1-beta Dec 10, 2017
@oliviertassinari oliviertassinari deleted the onclose branch December 10, 2017 09:20
Giners added a commit to Giners/mui-places-autocomplete that referenced this pull request Mar 22, 2018
This commit revs the 'material-ui' package version from 1.0.0-beta.22 to
1.0.0-beta.38. After reading the release docs there were some breaking
changes we had to account for but only in the demo code.

The <Snackbar> we use in the demo code needs to now use 'onClose'
instead of 'onRequestClose'. This is a result of the 1.0.0-beta.24
release of 'material-ui'. Here are the release notes/PR that describe
the changes:
* https://github.com/mui-org/material-ui/releases/tag/v1.0.0-beta.24
* mui/material-ui#9451

The <Button> we use in the dmeo code needs to now use the 'variant' prop
instead of the 'raised' prop to describe what type of <Button> it is.
This is a result of the 1.0.0-beta.32 release of 'material-ui'. Here are
the release notes/API guide that explains the changes:
* https://github.com/mui-org/material-ui/releases/tag/v1.0.0-beta.32
* https://material-ui-next.com/guides/api/#boolean-vs-enum

After accounting for the breaking changes functionality in both the demo
code and <MUIPlacesAutocomplete> code appears okay. Tests are also
passing.
	modified:   demo/DemoBasic.jsx
	modified:   demo/DemoControlledInput.jsx
	modified:   test/test.jsx.snap
	modified:   yarn.lock
Giners added a commit to Giners/mui-places-autocomplete that referenced this pull request Mar 28, 2018
* Upgrade: Rev 'downshift' from 1.22.5 to 1.31.2

This commit revs the 'downshift' package version form 1.22.5 to 1.31.2.
After reading the release docs it didn't appear that there was any
breaking changes. Tests passed and functionality appears okay.
	modified:   test/api-key.js
	modified:   test/test.jsx.snap
	modified:   yarn.lock

* Upgrade: Rev 'react-popper' from 0.7.4 to 0.8.3

This commit revs the 'react-popper' package version from 0.7.4 to 0.8.3.
After reading the release docs it didn't appear that there were any
breaking changes. Tests passed and functionality appears okay.
	modified:   package.json
	modified:   yarn.lock

* Upgrade: Rev 'autosuggest-highlight' from 3.1.0 to 3.1.1

This commit revs the 'autosuggest-highlight' package version from 3.1.0
to 3.1.1. After reading the release docs it didn't appear that there
were any breaking changes. Tests passed and functionality appears okay.
	modified:   yarn.lock

* Upgrade: Rev 'material-ui' from 1.0.0-beta.22 to 1.0.0-beta.38

This commit revs the 'material-ui' package version from 1.0.0-beta.22 to
1.0.0-beta.38. After reading the release docs there were some breaking
changes we had to account for but only in the demo code.

The <Snackbar> we use in the demo code needs to now use 'onClose'
instead of 'onRequestClose'. This is a result of the 1.0.0-beta.24
release of 'material-ui'. Here are the release notes/PR that describe
the changes:
* https://github.com/mui-org/material-ui/releases/tag/v1.0.0-beta.24
* mui/material-ui#9451

The <Button> we use in the dmeo code needs to now use the 'variant' prop
instead of the 'raised' prop to describe what type of <Button> it is.
This is a result of the 1.0.0-beta.32 release of 'material-ui'. Here are
the release notes/API guide that explains the changes:
* https://github.com/mui-org/material-ui/releases/tag/v1.0.0-beta.32
* https://material-ui-next.com/guides/api/#boolean-vs-enum

After accounting for the breaking changes functionality in both the demo
code and <MUIPlacesAutocomplete> code appears okay. Tests are also
passing.
	modified:   demo/DemoBasic.jsx
	modified:   demo/DemoControlledInput.jsx
	modified:   test/test.jsx.snap
	modified:   yarn.lock

* Docs: Add a "preview" .gif of component in action to README.md
	modified:   README.md

* Docs: Fix Travis CI image/badge link
	modified:   README.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Introduces changes that are not backward compatible.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants