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

[docs] Add utils section, document transitions #10239

Merged
merged 4 commits into from Feb 11, 2018
Merged

[docs] Add utils section, document transitions #10239

merged 4 commits into from Feb 11, 2018

Conversation

mbrookes
Copy link
Member

@mbrookes mbrookes commented Feb 11, 2018

Also move modals & popover docs to utils
Clean up API inheritance docs

Closes #10153

@mbrookes mbrookes added the docs Improvements or additions to the documentation label Feb 11, 2018
@oliviertassinari oliviertassinari added the component: transitions This is the name of the generic UI component, not the React module! label Feb 11, 2018
@oliviertassinari oliviertassinari merged commit ed76e11 into mui:v1-beta Feb 11, 2018
@oliviertassinari
Copy link
Member

@mbrookes Great job!

@mbrookes
Copy link
Member Author

@oliviertassinari One thing I realised when working on this is that the name of the Collapse component is "backwards". All the other component names describe what the transition does when it is transitioning in (or can be used bidirectionally.

I propose we rename Collapse to Expand.

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 11, 2018

I propose we rename Collapse to Expand.

Some benchmark:

Collapse seems more "into the head" of people.

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 11, 2018

ll the other component names describe what the transition does when it is transitioning in

It's that also true with Fade?

@mbrookes
Copy link
Member Author

Fade can be used bidirectionally - "fade in", "fade out". I can't think of anything better.

@mbrookes
Copy link
Member Author

mbrookes commented Feb 12, 2018

A better benchmark:

Generic:

Material Design:

JS:

CSS:

@oliviertassinari
Copy link
Member

@mbrookes
Copy link
Member Author

Then shouldn't the in prop's behaviour be reversed? At the moment when Collapse is true, the component is expanded, which is kinda backwards.

@oliviertassinari
Copy link
Member

Then shouldn't the in prop's behaviour be reversed?

Won't that makes it even more confusion? I would expect my element to be mounted when in is true, not the opposite 🤔.

@mbrookes
Copy link
Member Author

Which is why I originally proposed changing the name of the component - it does the opposite of what it says.

So, change Grow to Shrink instead ? 😄

@oliviertassinari
Copy link
Member

oliviertassinari commented Feb 13, 2018

What about Zoom? The wording should allow people to visualise the type of animation. I don't think that the "in" or "out" aspect if it matter. The in property has already this responsability. My interpretation of the current wordings:

  • Fade "out"
  • Grow "in"
  • Collapse "out"
  • Slide "in"/"out"
  • Zoom "in"

@mbrookes
Copy link
Member Author

"Fade in / out"
"Grow" (in)
"Collapse" (out)
"Slide in / out"
"Zoom in / out"

@mbrookes mbrookes deleted the docs-transitions branch September 11, 2018 22:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: transitions This is the name of the generic UI component, not the React module! docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants