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 web buttons in forms after onClick #977

Merged
merged 2 commits into from
May 12, 2022
Merged

Disable web buttons in forms after onClick #977

merged 2 commits into from
May 12, 2022

Conversation

ParthS007
Copy link
Contributor

@ParthS007 ParthS007 commented May 5, 2022

ref #975

  • Add disable functionality on Submit the rerun and Login component

  • Now the user will not be able to send multiple request to Connect(Login) before receiving the response from server by adding the disabled in input.

  • Before Rerun

Before.RERUN.mov
  • After Rerun
After_RERUN.mov

@rush-skills rush-skills added this to the 3.7.0 milestone May 5, 2022
@rush-skills rush-skills added this to In progress in StackStorm v3.8.0 via automation May 5, 2022
@rush-skills
Copy link
Member

@ParthS007 Thanks for the PR. Can you add a CHANGELOG entry, and maybe a GIF showing the changes before/after?

@rush-skills rush-skills requested review from amanda11 and arm4b May 5, 2022 12:10
@amanda11 amanda11 closed this May 5, 2022
StackStorm v3.8.0 automation moved this from In progress to Done May 5, 2022
@amanda11 amanda11 reopened this May 5, 2022
StackStorm v3.8.0 automation moved this from Done to In progress May 5, 2022
@amanda11
Copy link
Contributor

amanda11 commented May 5, 2022

Sorry - accidentally hit the close button...

@amanda11
Copy link
Contributor

amanda11 commented May 5, 2022

How long is the re-run disabled for? So if it's a long running workflow for instance, when does the button get re-enabled?

@amanda11
Copy link
Contributor

amanda11 commented May 5, 2022

Note. We are currently in code review, so we will need to save merging this until after 3.7 is released. I would like to see some tests with some long-running actions, as couldn't really tell from video when the button is getting re-enabled.
I will try and do some testing with it, unless someone can expand on the detail of how the disable is working.

@rush-skills rush-skills removed this from the 3.7.0 milestone May 5, 2022
@ParthS007
Copy link
Contributor Author

Hello @amanda11, thanks for your comments.

How long is the re-run disabled for? So if it's a long running workflow for instance, when does the button get re-enabled?

I am starting to go through the code, I am not familiar with functionalities yet. Please let me know what should be the ideal time for the button being disabled.

For now, The Submit button gets disabled on onClick event on button and it goes back to rerun page. To be more clear, the rerun button is not getting disabled, its the submit button inside the rerun details form.

I can add tests for testing the disabled.

@rush-skills
Copy link
Member

@amanda11 From my understanding, the login button is disabled till a response is received (if success, it redirects anyway, if failed, it re-enables the button). For the action re-run form, I guess the button is disabled after the execution is launched, and since that component disappears, it should be okay (any new instance of re-run action should start with button not disabled).

The idea is to prevent sending multiple requests by double clicking on the button.

The buttons that lead to a redirection response, should be disabled on click (and need not be enabled manually?)
The buttons that wait for an async response should be disabled till the response is received in general.

@amanda11 amanda11 added this to the 3.8.0 milestone May 10, 2022
@amanda11
Copy link
Contributor

amanda11 commented May 10, 2022

@ParthS007 This looks great, I had a play with it, and it all looks great. Thanks for the contribution. I went through our manual regression, and all looked good as well.

Could you do an update so that it picks up the master branch changes, this should build it as a 3.8 artifiact, and I can give it another quick spin, and then I'll be happy to merge.

@ParthS007
Copy link
Contributor Author

@amanda11 Thanks for your time for reviewing. I rebased the PR, please let me know if I need to add anything else. 👍

@CLAassistant
Copy link

CLAassistant commented May 11, 2022

CLA assistant check
All committers have signed the CLA.

@amanda11
Copy link
Contributor

@ParthS007 If you get a chance, could you sign the contributor agreement and then I can merge. Thanks so much for the change.

@ParthS007
Copy link
Contributor Author

@amanda11 Signed. Thanks 👍

Copy link
Contributor

@amanda11 amanda11 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - thanks for the contribution.

@amanda11 amanda11 merged commit 62f5016 into StackStorm:master May 12, 2022
StackStorm v3.8.0 automation moved this from In progress to Done May 12, 2022
@amanda11
Copy link
Contributor

@ParthS007 Many thanks for the PRs, that's all merged and will be available in StackStorm 3.8.

@rush-skills rush-skills linked an issue May 12, 2022 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

Disable web buttons on forms after clicks on request send
4 participants