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

fix: Refactor modal submit buttons #1315

Merged
merged 3 commits into from
Dec 19, 2024
Merged

fix: Refactor modal submit buttons #1315

merged 3 commits into from
Dec 19, 2024

Conversation

minghay
Copy link
Contributor

@minghay minghay commented Dec 19, 2024

Context

The modals used in the v2 UI do not leverage forms for handling user inputs causing the displayed button state text to not properly match the async code states.

Objective

Refactor the modals to not use the modal submit when making API requests. Also refactors a couple buttons to leverage the pending and fulfilled text parameters.

References

screwdriver-cd/screwdriver#3200

License

I confirm that this contribution is made under the terms of the license found in the root directory of this repository's source tree and that I have the authority necessary to make this contribution on behalf of its copyright owner.

@jithine
Copy link
Member

jithine commented Dec 19, 2024

Any tests to update for this change ? Is there no coverage for the existing code path ?

@minghay
Copy link
Contributor Author

minghay commented Dec 19, 2024

No tests need to be updated for this change. It's mostly based around ensuring that the button component gets a Promise returned so that it can process the text properly based on the state of the returned Promise.

@minghay minghay merged commit 01eb386 into master Dec 19, 2024
2 checks passed
@minghay minghay deleted the refactor-modal-submit branch December 19, 2024 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants