[GH-ISSUE #577] [BUG] Loading State in Wrong Subscribe Button #152

Closed
opened 2026-02-26 18:45:35 +03:00 by kerem · 18 comments
Owner

Originally created by @PeterKwesiAnsah on GitHub (Oct 18, 2023).
Original GitHub issue: https://github.com/documenso/documenso/issues/577

Originally assigned to: @niranjan-official on GitHub.

Issue Description

I tried to subscribe to a plan. Upon clicking on a subscribe button, two loading states were triggered instead of one.

Steps to Reproduce

  1. Go To the Billing Page in Settings
  2. Click on a subscribe button in a Plan card

Expected Behavior

One loading state

Current Behavior

Two loading button states show

Screenshots (optional)

Screenshot (78)

Environment

  • OS: Linux
  • Browser: Chrome

Checklist

  • I have searched the existing issues to make sure this is not a duplicate.
  • I have provided steps to reproduce the issue.
  • I have included relevant environment information.
  • I have included any relevant screenshots.
  • I understand that this is a voluntary contribution and that there is no guarantee of resolution.
Originally created by @PeterKwesiAnsah on GitHub (Oct 18, 2023). Original GitHub issue: https://github.com/documenso/documenso/issues/577 Originally assigned to: @niranjan-official on GitHub. <!--- Please provide a general summary of the issue in the Title above --> ## Issue Description I tried to subscribe to a plan. Upon clicking on a subscribe button, two loading states were triggered instead of one. <!--- Please provide a clear and concise description of the problem. --> ## Steps to Reproduce <!--- Please provide step-by-step instructions to reproduce the issue. --> <!--- Include code snippets, error messages, and any other relevant information. --> 1. Go To the Billing Page in Settings 2. Click on a subscribe button in a Plan card ## Expected Behavior <!--- Describe what you expected to happen. --> One loading state ## Current Behavior Two loading button states show ## Screenshots (optional) <!--- If applicable, add screenshots to help explain the issue. --> ![Screenshot (78)](https://github.com/documenso/documenso/assets/31078314/7463c9cc-1fc6-49f1-89ae-b5361fe618cd) ## Environment <!--- Please provide information about your environment, such as operating system, browser, version, etc. --> - OS: Linux - Browser: Chrome ## Checklist <!--- Please check the boxes that apply to this issue report. --> <!--- You can add or remove items as needed. --> - [x] I have searched the existing issues to make sure this is not a duplicate. - [x] I have provided steps to reproduce the issue. - [x] I have included relevant environment information. - [x] I have included any relevant screenshots. - [x] I understand that this is a voluntary contribution and that there is no guarantee of resolution.
Author
Owner

@mittalsam98 commented on GitHub (Oct 18, 2023):

I would like to pick this up

<!-- gh-comment-id:1768872227 --> @mittalsam98 commented on GitHub (Oct 18, 2023): I would like to pick this up
Author
Owner

@PeterKwesiAnsah commented on GitHub (Oct 18, 2023):

@mittalsam98 I'm already taking a swing at it

<!-- gh-comment-id:1768874570 --> @PeterKwesiAnsah commented on GitHub (Oct 18, 2023): @mittalsam98 I'm already taking a swing at it
Author
Owner

@Mythie commented on GitHub (Oct 22, 2023):

One thing to note and a reason why I left this the way it is, we don't want a user to click a second subscription button while a checkout is loading. This means that while loading all buttons should be disabled.

A way to handle this would be to store the currently clicked item in a ref and then decide between a loading={true} or disabled={true} based on whether the button relates to the currently clicked item.

<!-- gh-comment-id:1773953710 --> @Mythie commented on GitHub (Oct 22, 2023): One thing to note and a reason why I left this the way it is, we don't want a user to click a second subscription button while a checkout is loading. This means that while loading all buttons should be disabled. A way to handle this would be to store the currently clicked item in a ref and then decide between a `loading={true}` or `disabled={true}` based on whether the button relates to the currently clicked item.
Author
Owner

@catalinpit commented on GitHub (Oct 24, 2023):

Hey @PeterKwesiAnsah, thanks for opening the issue & PR! However, we recently updated the contribution guide, which states that you should Comment on the issue with your intention to work on it and get it assigned to you before starting to work on it.

In this case, @mittalsam98 should've been assigned the issue.

The reason for this update is to bring more order and improve the contribution process. Thanks for understanding!

IMG_7832
Source: Contribution Guide #taking-issues

<!-- gh-comment-id:1776597354 --> @catalinpit commented on GitHub (Oct 24, 2023): Hey @PeterKwesiAnsah, thanks for opening the issue & PR! However, we recently updated the contribution guide, which states that you should `Comment on the issue with your intention to work on it` and get it assigned to you before starting to work on it. In this case, @mittalsam98 should've been assigned the issue. The reason for this update is to bring more order and improve the contribution process. Thanks for understanding! ![IMG_7832](https://github.com/documenso/documenso/assets/25515812/dd3e9fda-5d04-4436-9ab4-86aa715ad773) *Source: [Contribution Guide #taking-issues](https://github.com/documenso/documenso/blob/feat/refresh/CONTRIBUTING.md#taking-issues)*
Author
Owner

@PeterKwesiAnsah commented on GitHub (Oct 24, 2023):

@catalinpit Got it. Thanks Man!

<!-- gh-comment-id:1776734712 --> @PeterKwesiAnsah commented on GitHub (Oct 24, 2023): @catalinpit Got it. Thanks Man!
Author
Owner

@mittalsam98 commented on GitHub (Oct 25, 2023):

Hey @catalinpit , thanks for assigning this to me. I will try to raise a fix ASAP

<!-- gh-comment-id:1779296403 --> @mittalsam98 commented on GitHub (Oct 25, 2023): Hey @catalinpit , thanks for assigning this to me. I will try to raise a fix ASAP
Author
Owner

@catalinpit commented on GitHub (Oct 27, 2023):

Hey @mittalsam98, the issue reporter already started working on this. Normally, you would have priority since you asked first, but can we leave it like this for this one, please? To avoid confusion.

I apologize for this, but it takes a while until everyone gets familiar with the new guidelines.

<!-- gh-comment-id:1782489998 --> @catalinpit commented on GitHub (Oct 27, 2023): Hey @mittalsam98, the issue reporter already started working on this. Normally, you would have priority since you asked first, but can we leave it like this for this one, please? To avoid confusion. I apologize for this, but it takes a while until everyone gets familiar with the new guidelines.
Author
Owner

@mittalsam98 commented on GitHub (Oct 27, 2023):

Sure, no issue

<!-- gh-comment-id:1782660034 --> @mittalsam98 commented on GitHub (Oct 27, 2023): Sure, no issue
Author
Owner

@Dun-sin commented on GitHub (Nov 2, 2023):

@catalinpit can it be given an assigned label or the individual working on it be shown to be assigned

<!-- gh-comment-id:1790728565 --> @Dun-sin commented on GitHub (Nov 2, 2023): @catalinpit can it be given an assigned label or the individual working on it be shown to be assigned
Author
Owner

@mittalsam98 commented on GitHub (Nov 5, 2023):

Hey @catalinpit, it seems @PeterKwesiAnsah is not working on it, didn't hear any update from him

<!-- gh-comment-id:1793660313 --> @mittalsam98 commented on GitHub (Nov 5, 2023): Hey @catalinpit, it seems @PeterKwesiAnsah is not working on it, didn't hear any update from him
Author
Owner

@PeterKwesiAnsah commented on GitHub (Nov 5, 2023):

@mittalsam98 I have already created a PR for this 2 weeks ago.

<!-- gh-comment-id:1793660714 --> @PeterKwesiAnsah commented on GitHub (Nov 5, 2023): @mittalsam98 I have already created a PR for this 2 weeks ago.
Author
Owner

@mittalsam98 commented on GitHub (Nov 5, 2023):

Okay , my bad, I didn't check old messages

<!-- gh-comment-id:1793661301 --> @mittalsam98 commented on GitHub (Nov 5, 2023): Okay , my bad, I didn't check old messages
Author
Owner

@github-actions[bot] commented on GitHub (Dec 8, 2023):

This issue has not seen activity for a while. It will be closed in 30 days unless further activity is detected

<!-- gh-comment-id:1846729089 --> @github-actions[bot] commented on GitHub (Dec 8, 2023): This issue has not seen activity for a while. It will be closed in 30 days unless further activity is detected
Author
Owner

@niranjan-official commented on GitHub (Jan 13, 2024):

Can I get assigned to work on this issue?

<!-- gh-comment-id:1890395147 --> @niranjan-official commented on GitHub (Jan 13, 2024): Can I get assigned to work on this issue?
Author
Owner

@dguyen commented on GitHub (Jan 23, 2024):

Apologies to everyone who has put work into this, this one seemed to fall through the cracks and mishandled on our part.

Lets close this one out soon.

@niranjan-official I've assigned it to you

<!-- gh-comment-id:1905102053 --> @dguyen commented on GitHub (Jan 23, 2024): Apologies to everyone who has put work into this, this one seemed to fall through the cracks and mishandled on our part. Lets close this one out soon. @niranjan-official I've assigned it to you
Author
Owner

@niranjan-official commented on GitHub (Jan 27, 2024):

Thankyou for assigning, hope I can fix it in a couple of days.

<!-- gh-comment-id:1913022379 --> @niranjan-official commented on GitHub (Jan 27, 2024): Thankyou for assigning, hope I can fix it in a couple of days.
Author
Owner

@adithyaakrishna commented on GitHub (Apr 4, 2024):

Hey @niranjan-official,
Could you pls let us know if you have any updates on this issue?

<!-- gh-comment-id:2036885050 --> @adithyaakrishna commented on GitHub (Apr 4, 2024): Hey @niranjan-official, Could you pls let us know if you have any updates on this issue?
Author
Owner

@niranjan-official commented on GitHub (Apr 4, 2024):

Hey @niranjan-official,
Could you pls let us know if you have any updates on this issue?

I got stuck while setting up locally

<!-- gh-comment-id:2036890656 --> @niranjan-official commented on GitHub (Apr 4, 2024): > Hey @niranjan-official, > Could you pls let us know if you have any updates on this issue? > I got stuck while setting up locally
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/documenso#152
No description provided.