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

Add constructor option to build the card with the back face #24

Closed
Delgan opened this issue Mar 14, 2020 · 13 comments · Fixed by #56
Closed

Add constructor option to build the card with the back face #24

Delgan opened this issue Mar 14, 2020 · 13 comments · Fixed by #56
Labels
enhancement New feature or request

Comments

@Delgan
Copy link
Contributor

Delgan commented Mar 14, 2020

Hey!

Your library is very useful and the animation is really nice, thanks for sharing your work. 👍

I had one suggestion: would it be possible to add a new parameter to the FlipCard() widget to enable the card displaying the back face while first being built?
Sometimes, I need to re-create a whole page of my application using a past state, and being able to initialize the card based on its previous state would be pretty useful.

What do you think?

@fedeoo
Copy link
Collaborator

fedeoo commented Mar 17, 2020

Sorry, I am not sure I get your point. Do you mean?
You have built a FlipCard:

FlipCard(front: A, back: B)

And sometimes you wanna render

FlipCard(front: B, back: A)

Or

FlipCard(front: A, back: B, side: previous_state)

@Delgan
Copy link
Contributor Author

Delgan commented Mar 17, 2020

@fedeoo I'm interested by:

FlipCard(front: A, back: B, side: previous_state)

I can already reverse the constructor using FlipCard(front: B, back: A) but this implies the animation will be executed in the wrong direction.

@BrunoJurkovic
Copy link
Owner

@Delgan Is there still a need for this feature or can I close this issue?

@Delgan
Copy link
Contributor Author

Delgan commented Oct 7, 2021

Hi @BrunoJurkovic. I still believe that this would be quite a useful feature to add to this library. 👍

But it's not a big deal, I can live without it. ;)

@BrunoJurkovic
Copy link
Owner

Hi @BrunoJurkovic. I still believe that this would be quite a useful feature to add to this library. 👍

But it's not a big deal, I can live without it. ;)

Thanks for letting me know, would you be interested in making a pull request with the said feature or do you want me to write it? Either way works for me :)

@Delgan
Copy link
Contributor Author

Delgan commented Oct 7, 2021

@BrunoJurkovic Ok, I'll try to take a look at it and (hopefully) open a PR this week-end. 😄

@BrunoJurkovic
Copy link
Owner

Perfect, thanks for your interest and I assure you it is much appreciated! Feel free to message here if you have any issues with implementing this :))

@BrunoJurkovic BrunoJurkovic added the enhancement New feature or request label Oct 9, 2021
@BrunoJurkovic
Copy link
Owner

@Delgan Hey there, are you still planning to make this change or should I do it myself? Let me know :)

@mchilvers
Copy link

Hiya, Great package - thanks for the work on it! I would also like this feature, for the same reasons i.e. at build time I want the side that is initially showing to be determined by saved state.

@BrunoJurkovic
Copy link
Owner

Thanks for letting me know, expect a update soon @mchilvers :)

@mchilvers
Copy link

Thanks for letting me know, expect a update soon @mchilvers :)

Brilliant - thanks!

@Delgan
Copy link
Contributor Author

Delgan commented Oct 28, 2021

@BrunoJurkovic Sorry I hadn't the time to look at it. 😬

Please give me a second chance this weekend (unless you really want to implement it yourself). 😁

@BrunoJurkovic
Copy link
Owner

Sure! Go ahead!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants