-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Feature request] Implement page transitions (spec: Choreography) #4117
Comments
@owencm if you've got any good references, that'd be wicked 👍 https://www.google.com/design/spec/animation/meaningful-transitions.html etc etc |
PS: I've almost got an implementation ready using react transition group for this material design enter/exit animation of a grid: |
I'm actually more concerned with whole page transitions - If you open any app and tap buttons you'll notice that the title bar and content all fade in or move in from some direction in some smooth way. I'd love to make it easy to do that with Material UI. See this example for one very specific set of navigation transitions done in React Native. Something like this that supports a general set would be awesome: https://youtu.be/3W58KampkXc?t=19m3s I note that some Routers have transition support, for example see https://github.com/maisano/react-router-transition. For that reason I'm not 100% sure yet where these transitions should be implemented. I presume if we want more intelligent transitions that have e.g. different effect on title bar to the contents it will need to be in Material UI directly? |
I'm also quite interested in this topic. That's definitely something missing to compete with a native app.
We have tried using this lib at @doctolib without any luck. The approach used is too simple.
From my point of view, we should be focusing on addressing the point 2. |
I agree. Focusing on applying transitions is a problem more coupled to this library too. I can imagine a far future where we utilize something like FLIP.js to allow devs to specify an element in the 'before' state and one in the 'after' state and then have us ensure those transition nicely, while using a standard transition for the rest of the screen. It is my understanding that this is roughly how these transitions are implemented in Android (although I've not verified that myself and am not an expert). For now I'd rather focus on the simpler page transitions since that's far lower hanging fruit. Something close to what you describe in your talk with a bunch of preset transitions would be a great start. I would personally be super happy if we can create an API (with flexibility for adding complexity in the future) with initial support for the following:
|
Hello, i'd like to know if the v1-alpha branch would have need for transitions such as the ones located here: Note: Continuity closely resembles the transitions achieved with the Popover component however with Modals, the origin of the transition is from the top instead of the bottom as shown in the demo on the page. Would this require a change? |
Hi @oliviertassinari! I develop a library called yubabajs (see: yubabajs.com) - which is primarily inspired by material animations. I think it would fit lovely with material ui (the landing example is built with it, actually!). These days you don't want to re-make everything yourself - yubaba has been made to be small (within reason, its tree shakeable at least - if its not small enough lets talk), performant, and powerfully customisable - let's talk? |
@Madou Thanks for sharing your work. I like that: https://twitter.com/olivtassinari/status/1126261655124496389. We have no plans to work on the transitions for v5 (6-12 months from now). |
thanks!
so the it's transition based - but it's all dynamic based on how big the elements are, how far they're moving, and if they're expanding or collapsing. i take the base values from https://material.io/design/motion/speed.html#duration, implementation here https://github.com/madou/yubaba/blob/master/packages/yubaba/src/lib/duration/index.tsx#L36 it's quite simple atm. currently the dynamic stuff can't be tweaked via a public api but anything can be changed if it's more correct.
tbh right now i have a roadmap going through the material motion catalog to implement new animations (and changing the core of the library if it needs) here itsdouges/element-motion#49 which i'll be slowly working through. i've already shown one example of a transition working with the library - considering material-ui isn't planning on working on transitions for the next major version perhaps i can do more examples using public apis? a cookbook showing how a consumer of material-ui could get motion today which would be a page on the material ui website or something. i think the holy grail though would be out of the box motion using yubaba though, for consumers. what to do you think? cheers 😄 |
Looks really nice from skimming the demos. I have to agree on the speed issue though. Perhaps something to look at. I believe that following the spec, a particular type of transition takes a certain amount of time, regardless of the size; so it is time, not speed that counts. I might be wrong though. Does the name 'yubaba' hold special meaning? You might find more traction with a more descriptive name like 'material-motion'. |
all fair points! it can be very easily tweaked - the main thing i'd want personally is something out of the box that works great. no configuration needed ideally. as a rough feel how faster do you think it should be?
ohh that's a good suggestion! "yubaba" doesn't hold any special meaning that i wouldn't want to let go of tbh. always struggled with names. oof it's a google lib though haha https://www.npmjs.com/package/material-motion
maybe |
Ah, sorry, I didn't check. I was just throwing out a random suggestion. There will be something along those lines available I'm sure! |
As I understand it, you are scaling the transition time according to the size of the element / distance to be moved. If I am interpreting the spec correctly, you should instead be using fixed durations regardless of the size or distance. If that's too rigid, the scaling factor should still be minimal. |
yeah that's right - ill make a issue to investigate it over here itsdouges/element-motion#121 to reduce to noise here ✌️ |
so it turns out that example had a fixed duration of anyway my question to you both - do you think |
Sounds good to me! |
@owencm I've made a library react-tiger-transition that implements whole page transitions, but it also allow to define specific transitions for each component. As @oliviertassinari defined it on #18392:
It's easy to implement, here is an example preview of animated tabs, available on the documentation. This example leverages the transitions of the module without using other components, although these other component actually make the navigation easier, because they provide the necessary css layers to build these transitions and integrate with react-router-dom. Here is an example of whole page transitions: |
I'm closing the issue, it has been open for +3 years but didn't get a lot of traction. I think that we can defer the concern to a third-party library. |
I've noticed is that when building an app with material-ui there is no obvious way to do page transitions which are an important part of the overall UX.
Can we add page transitions in to backlog for future releases, or is there a recommended complementary library?
The text was updated successfully, but these errors were encountered: