Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Show a spinner when the API request for Star an repo is running #266

Open
tanmoysrt opened this issue Feb 27, 2023 · 14 comments · May be fixed by #274
Open

Show a spinner when the API request for Star an repo is running #266

tanmoysrt opened this issue Feb 27, 2023 · 14 comments · May be fixed by #274
Assignees
Labels
enhancement New feature or request

Comments

@tanmoysrt
Copy link
Member

tanmoysrt commented Feb 27, 2023

Is your feature request related to a problem? Please describe.
In the project details screen, we have options to star/unstar the repo. Now the issue is , we can tap the button multiple time in a short span of time. If user's internet connectivity is not too good, then this will create confusion and send many unnecessary requests to server.

Screenrecorder-2023-02-27-16-45-00-363.mp4

Describe the solution you'd like
To make that UI friendly, we can have a spinner, when the star/unstar function invoked, a spinner will be shown , as soon as the request executed successfully, we will remove spinner and update the state.
During the requesting time, we need to reject further requests.

Are you working on this? (Yes/No)
No

@vedant-jain03 vedant-jain03 moved this to Todo in fosshack'23 Feb 27, 2023
@vedant-jain03 vedant-jain03 added the enhancement New feature or request label Feb 27, 2023
@notbrood
Copy link

notbrood commented Mar 4, 2023

Can I start workiing on this?

@tanmoysrt
Copy link
Member Author

Can I start workiing on this?

cc : @vedant-jain03

@notbrood
Copy link

notbrood commented Mar 6, 2023

Hey @Tanmoy741127, do you think it would be UI friendly if there was no spinner blocking the view? I have added a bool function which checks if the request is finished, and then only allows the user to star the project again, what are your views on that?

@tanmoysrt
Copy link
Member Author

@notbrood
That will work. Try out how it will look,
if you can add a little spinner or pulse type of loader in the box of the star icon

@notbrood
Copy link

notbrood commented Mar 6, 2023

@Tanmoy741127
Just wanted to let you know that I'm not very comfortable with the get state management aspect of our project. I could try working on it, but I don't think I have the necessary skills to do it properly.

Regarding the bool function, I'm happy to create a PR for the function, and let someone else add the spinner.

@tanmoysrt
Copy link
Member Author

@notbrood in the mobile-app we are using Provider for state management solution and GetX is using for different purposes. So you can give it a try.

@notbrood
Copy link

notbrood commented Mar 6, 2023

Okay, I'll give it a try!

@notbrood
Copy link

notbrood commented Mar 7, 2023

I was able to, It looks UI Friendly as well!

@notbrood
Copy link

notbrood commented Mar 7, 2023

2023-03-08.03-56-08.mp4

Here's how it looks! What are your views?

@tanmoysrt
Copy link
Member Author

Here's how it looks! What are your views?

Great ! Try to make the size same as the star icon

@notbrood
Copy link

notbrood commented Mar 8, 2023

I did, how does this look?

2023-03-08.13-28-40.mp4

@tanmoysrt
Copy link
Member Author

I did, how does this look?

It's looking good now !

@notbrood
Copy link

notbrood commented Mar 8, 2023

Okay, I'm going to make a PR for this now!

@tanmoysrt
Copy link
Member Author

Okay, I'm going to make a PR for this now!

I did, how does this look?

cc @manjotsidhu @aman-singh7

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

Successfully merging a pull request may close this issue.

3 participants