nishiki-tech / nishiki-frontend

Nishiki is an app for tracking and sharing food inventories within groups for better pantry management.
https://nishiki.tech
MIT License
16 stars 5 forks source link

Loading state is required for each submit. #367

Closed nick-y-ito closed 3 months ago

nick-y-ito commented 3 months ago

Description

Currently, multiple submissions are performed by tapping or clicking the submit button or mashing the [ enter/return ] key within a form.

Criteria

Notes

arthathagary commented 3 months ago

Hi,

I'm new to open-source contribution, and I'd like to work on this particular issue. I have some questions about the problem. After cloning the project and reviewing it, I'm wondering if I need to add a spinner near the button while submitting the form. If so, after submitting the form, basic alert message triggered. I understand that the alert behavior may block the spinner animation.

Is my understanding of the problem correct about adding loading spinners?

Screenshot 2024-03-16 at 7 54 04 PM
nick-y-ito commented 3 months ago

@arthathagary Thank you for your interest :)

Honestly, we don't need the loading spinner for now because adding it affects the button size. Although we could add it to improve the UX, the main goal of this issue is only to avoid sending multiple API requests.

If you address this issue, you can start with only a single request to show an example before going in the wrong direction.

arthathagary commented 3 months ago

Ok, Now I understand the issue, can you assign this issue to me? I'll do this one 🀝

nick-y-ito commented 3 months ago

@arthathagary Sure, I have done itγ€€πŸ˜Š I appreciate your contribution!

nick-y-ito commented 3 months ago

@arthathagary The criteria in the description are just suggestions. If you have better ideas, please feel free to provide alternatives.

arthathagary commented 3 months ago

Sure Man, I put a PR to this issue, check the PR if any changes you want tell me that i'll do that one 🀝