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: loading animation of update buttons #13131

Merged
merged 11 commits into from
Feb 13, 2024

Conversation

moulibrota-das
Copy link
Contributor

What does this PR do?

This PR fixes the loading animation in update buttons located in the appearance settings page.

Fixes #13110 (issue)

Screencast.from.09-01-24.11.32.56.PM.IST.webm

Type of change

  • Bug fix (non-breaking change which fixes an issue)

@CLAassistant
Copy link

CLAassistant commented Jan 9, 2024

CLA assistant check
All committers have signed the CLA.

Copy link

vercel bot commented Jan 9, 2024

@moulibrota-das is attempting to deploy a commit to the cal Team on Vercel.

A member of the Team first needs to authorize it.

@github-actions github-actions bot added Low priority Created by Linear-GitHub Sync ui area: UI, frontend, button, form, input ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work labels Jan 9, 2024
Copy link
Contributor

github-actions bot commented Jan 9, 2024

Thank you for following the naming conventions! 🙏 Feel free to join our discord and post your PR link.

@moulibrota-das moulibrota-das changed the title fixes loading animation of update buttons fix: loading animation of update buttons Jan 10, 2024
Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

@moulibrota-das no need to create a state variable. try to use formState.isSubmitting from react hook form. (check isBrandColorsFormSubmitting, isBookerLayoutFormSubmitting)

@keithwillcode keithwillcode added the community Created by Linear-GitHub Sync label Jan 11, 2024
@keithwillcode keithwillcode added this to the v3.8 milestone Jan 14, 2024
@moulibrota-das
Copy link
Contributor Author

@Udit-takkar I was making the suggested changes and found that the formState.isSubmitting is not working properly in those forms and always returning false value.
I have a solution in which I am checking if the mutation.isLoading and not using any extra states.

Copy link
Contributor

github-actions bot commented Jan 19, 2024

📦 Next.js Bundle Analysis for @calcom/web

This analysis was generated by the Next.js Bundle Analysis action. 🤖

This PR introduced no changes to the JavaScript bundle! 🙌

@@ -184,6 +187,7 @@ const AppearanceView = ({
</div>
<SectionBottomActions className="mb-6" align="end">
<Button
loading={mutation.isLoading}
Copy link
Contributor

Choose a reason for hiding this comment

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

Since this is a mutation, you have to use mutation.isPending.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made the suggested changes

@PeerRich PeerRich dismissed stale reviews from joeauyeung and Udit-takkar February 12, 2024 13:19

rereview please

@keithwillcode keithwillcode requested a review from a team February 13, 2024 05:13
Copy link
Contributor

@Udit-takkar Udit-takkar left a comment

Choose a reason for hiding this comment

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

LGTM

@Udit-takkar Udit-takkar enabled auto-merge (squash) February 13, 2024 06:24
@Udit-takkar Udit-takkar merged commit 74eafa5 into calcom:main Feb 13, 2024
29 of 37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
community Created by Linear-GitHub Sync Low priority Created by Linear-GitHub Sync ⚡ Quick Wins A collection of quick wins/quick fixes that are less than 30 minutes of work ui area: UI, frontend, button, form, input
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[CAL-2925] [feature] some of the buttons are not having loading animation while loading
5 participants