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

Feature/animations #179

Merged
merged 13 commits into from Jul 3, 2020
Merged

Feature/animations #179

merged 13 commits into from Jul 3, 2020

Conversation

larsk2009
Copy link
Collaborator

@larsk2009 larsk2009 commented Jun 19, 2020

This PR adds support for animations to resolve #166. For now I have made 2 settings available: the duration and the type (fade-in, fade-out or fade-in/fade-out). The way it works is that some CSS is generated for each modal instance. It is sort of 'templated' where Blazor will add the correct values like duration to the CSS. It does feel a little hacky but it seems to work very stable. If anyone has any concerns about that, please let me know!

With this approach a lot of different settings could be added rather quickly I think. One thing I thought of is also exposing the Easing mode of the animation, like ease-in and ease-out, via an enum. Before doing that I would like some feedback on this approach and its usefulness first though.

Global animation settings as well as different animations for multi-modal scenarios are also supported.

Please have a look and see if you like it.

@larsk2009
Copy link
Collaborator Author

The tests seem to have broken, I hadn't checked those locally. I will have a look at that!

@larsk2009
Copy link
Collaborator Author

larsk2009 commented Jun 19, 2020

I have fixed the issue of the failing tests. Actually nice having those tests on a Blazor project, caught something that I missed this time. Must have a look at implementing these kind of tests on my own projects as well 😀.

Copy link
Member

@chrissainty chrissainty left a comment

Choose a reason for hiding this comment

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

Great work as always @larsk2009!

Is there anything else you want to do with this? The only missing thing I could spot was some update to the docs site. Other than that I'm happy to merge.

@larsk2009
Copy link
Collaborator Author

Yes I will add something to the docs. Other than that, I think a lot of different animations could be added but I think it is better to first merge this and see if people like it/use it. If that is the case, more animations could always be added.

@chrissainty
Copy link
Member

@larsk2009 I've merged some changes which have caused a conflict in your PR, apologies.

@larsk2009
Copy link
Collaborator Author

No problems, I will sort it out in the coming days.

@larsk2009
Copy link
Collaborator Author

@chrissainty I have incorporated the latest changes you have made and I have added something to the docs and the readme.

@chrissainty chrissainty added the Feature New feature that will be added to the project label Jul 3, 2020
Copy link
Member

@chrissainty chrissainty left a comment

Choose a reason for hiding this comment

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

Awesome stuff, thanks @larsk2009 😀

@chrissainty chrissainty merged commit cb19a4f into Blazored:main Jul 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature New feature that will be added to the project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Animation on Show & Close
2 participants