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

Disable upload song button while processing request #133

Open
AntonioMrtz opened this issue May 1, 2024 · 3 comments · May be fixed by #250
Open

Disable upload song button while processing request #133

AntonioMrtz opened this issue May 1, 2024 · 3 comments · May be fixed by #250
Assignees
Labels
frontend Frontend related issues good first issue Good for newcomers help-wanted Help is wanted

Comments

@AntonioMrtz
Copy link
Owner

AntonioMrtz commented May 1, 2024

Description

Modify the behaviour of upload song button so its disabled while waiting for the song to be uploaded.

Context

In component AddSongPlayListAccordion.tsx when the user decides to upload a song the function handleSubmitSong is called. This function triggers an style change of the button so it displays a loading animation . The issues is that the user can still click it even if the upload song request is already being made.

The goal is to disable the button while still showing the loading animation so the user cannot upload the same song twice.

  • This feature of uploading songs is currently only available for artists.
  • It might be necessary to create an artist user using the interface of backend because right now theres no frontend component to register artists.

How to do it

Manage an state of the request variable that disables/enables the button.

Testing

  • Create an artist, upload a song and check if the button goes disable and has a loading animation while the request is being processed.
  • Create a test that checks if the button is disabled when the request is being made.
@AntonioMrtz
Copy link
Owner Author

@AntonioMrtz AntonioMrtz added good first issue Good for newcomers frontend Frontend related issues help-wanted Help is wanted labels May 1, 2024
@AntonioMrtz AntonioMrtz pinned this issue May 1, 2024
@AntonioMrtz AntonioMrtz unpinned this issue May 17, 2024
@AntonioMrtz AntonioMrtz pinned this issue Jun 10, 2024
@AntonioMrtz AntonioMrtz unpinned this issue Jul 7, 2024
@AntonioMrtz AntonioMrtz pinned this issue Aug 26, 2024
@ObuMan
Copy link

ObuMan commented Oct 6, 2024

If this issue still exists, I would like to try to complete it

@AntonioMrtz
Copy link
Owner Author

Hi @ObuMan , all yours. It still exists, tell me if you need anything :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend Frontend related issues good first issue Good for newcomers help-wanted Help is wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants