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

feat: add text slide in animation for quotes in card #243

Open
shravan20 opened this issue Sep 24, 2023 · 11 comments
Open

feat: add text slide in animation for quotes in card #243

shravan20 opened this issue Sep 24, 2023 · 11 comments
Labels
backend Backend related changes enhancement New feature or request frontend Frontend related changes / UI changes hacktoberfest Little work This task takes little time to complete. (ETA couple of days)

Comments

@shravan20
Copy link
Owner

Description:

Add slide in custom css as well for slide append to the svg created as we return with class name as additional option.

@shravan20 shravan20 added enhancement New feature or request Little work This task takes little time to complete. (ETA couple of days) hacktoberfest frontend Frontend related changes / UI changes backend Backend related changes labels Sep 24, 2023
@shravan20
Copy link
Owner Author

Refer to design 1: https://codepen.io/shravan20/pen/xxmpMBr

@ashishk1331
Copy link

Well, I would love to work on it. Can you explain more?
Do you want to add custom CSS for the slides? Like accept CSS and then apply on the slide to generate the custom slide.

@shravan20
Copy link
Owner Author

@ashishk1331 : That is an interesting thought, that would be a great add-on to add custom css. But wouldnt it make query params very dirty, or should we provide css link from some source and that can be consumed from there??

What do you think about the second approach?

@ashishk1331
Copy link

Passing css to parameters would be devastating for network bandwidths. Also, custom css would mean they want a custom structure.

A solution would be to enable POST requests to the same end-point, and the request body would contain CSS and HTML for the SVG.

However, this will alter whole process flow and needs more code. I would suggest to increase the number of themes for the quotes.

@shravan20
Copy link
Owner Author

shravan20 commented Sep 27, 2023

Passing css to parameters would be devastating for network bandwidths. Also, custom css would mean they want a custom structure.

Should we provide css link from some source and that can be consumed from there??

Yes, that is why I am suggesting passing custom css url as part of the query params.


However, this will alter whole process flow and needs more code. I would suggest to increase the number of themes for the quotes

Feel free to add themes as well. I would like to see if we can try adding custom slide animation. I have done a PoC as such which was working well, wanted to keep it as open issue to see if there would be any better approach to it.

@shraf
Copy link

shraf commented Apr 12, 2024

i would like to contribute on this, i was suggesting to pass the custom css as request body , what do you think? + how should i start contributing on this?
@shravan20

@shravan20
Copy link
Owner Author

i would like to contribute on this, i was suggesting to pass the custom css as request body , what do you think? + how should i start contributing on this? @shravan20

@shraf: Instead, we can give a custom CSS file from github gist, i.e. provide a URL that would be picked up as custom CSS for card.

@ashishk1331
Copy link

It's better to offer themes to pick from rather than get custom CSS from headers or even gist. This can lead to slower first load times, an increase in bandwidth consumption which can easily run long bills and incorrect CSS code can cause anomalies. I suggest leaving user input to a minimum.

@shravan20
Copy link
Owner Author

It's better to offer themes to pick from rather than get custom CSS from headers or even gist. This can lead to slower first load times, an increase in bandwidth consumption which can easily run long bills and incorrect CSS code can cause anomalies. I suggest leaving user input to a minimum.

How would we add it as part of GET method ? Since it would be a GET method and would be completely handled via stringified css in this case which would make unnecessary long uri

@ashishk1331
Copy link

The only way for GET requests is to query parameters. Encode the whole CSS string using base64, and add it to the query parameter like

https://github-readme-quotes-returns.vercel.app/?css=LmNvbnRhaW5lciB7CmNvbG9yOiByZWQ7Cn0=

the above code runs for

.container {
color: red;
}

https://tree.nathanfriend.io/ implements the same technique to store state while sharing custom structures.

@shravan20
Copy link
Owner Author

Sure, sounds like a good point to start with. You can start with this implementation for now and we can fix any issues we face on the way.

👏🏼

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend Backend related changes enhancement New feature or request frontend Frontend related changes / UI changes hacktoberfest Little work This task takes little time to complete. (ETA couple of days)
Projects
None yet
Development

No branches or pull requests

3 participants