ashutoshkrris / Random-APIs

A place for new contributors to learn how to consume their APIs and contribute to open-source. Part of Hacktoberfest.
https://ashutoshkrris.github.io/Random-APIs/
MIT License
20 stars 28 forks source link

Add loader #11

Closed ashutoshkrris closed 2 years ago

ashutoshkrris commented 2 years ago

Is your feature request related to a problem? Please describe.

A clear and concise description of what the problem is. There is no way to understand if some data is loading

Describe the solution you'd like

A clear and concise description of what you want to happen. While the data is being fetched, a loader should be there

Describe how this feature will be useful to our readers.

A clear and concise description of how this feature will be useful for our other readers.

Which Program are you part of?

Additional context

Add any other context or screenshots about the feature request here.

everly-gif commented 2 years ago

I would like to work on this, please assign me.

quick question:

however , whenever I refresh the website , I don't see any loading issues it seems fine and the APIs are displaying the relevant output. Particularly where is a loading delay?

ashutoshkrris commented 2 years ago

As the project continues to grow, a lot of APIs need to be fetched simultaneously. In that case, we may require a loader.

everly-gif commented 2 years ago

Okay got it ! Thanks. I would like to work on this !

ashutoshkrris commented 2 years ago

Great @everly-gif Assigning it to you!

everly-gif commented 2 years ago

hey I have a question. So since you have used query selector and are appending the responses to the selected div. How can I go about this. I have created loading animation with CSS and before you call fetch I have set the response.innerHTML to the loader. when you append the response, ie: the line : responsesBody.innerHTML += response; I need to remove the loader from it. In that case all the fetch calls will need an additional code of line. Am I going right about this?

ashutoshkrris commented 2 years ago

Hey @everly-gif I am that good in frontend, so won't be able to help you much! The thing is I wish to have individual spinners for each fetch call. Is that possible? You are free to change how the fetch call is working.

everly-gif commented 2 years ago

okay, I'll figure it out