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/disable cancel button on save #6204

Merged
merged 3 commits into from
Jul 11, 2024

Conversation

pacyL2K19
Copy link
Contributor

This PR

Similarly to #5673 I have improved the field creation time by re-fetching data on page redirection to the object page

Screenshot 2024-07-10 at 16 06 37

@FellipeMTX @Bonapara

- add a `isCancelDisabled` prop to the `CancelButton` component
- update the prop in related pages: new object, edit object, new field and edit field pages
Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

  • Introduced disabled prop to CancelButton in /packages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/CancelButton.tsx
  • Added isCancelDisabled prop to SaveAndCancelButtons in /packages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveAndCancelButtons.tsx
  • Disabled cancel button during form submission in /packages/twenty-front/src/pages/settings/data-model/SettingsNewObject.tsx
  • Disabled cancel button during form submission in /packages/twenty-front/src/pages/settings/data-model/SettingsObjectEdit.tsx
  • Disabled cancel button during form submission in /packages/twenty-front/src/pages/settings/data-model/SettingsObjectFieldEdit.tsx

6 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

PR Summary

(updates since last review)

  • Refetch queries after navigating to the object page for data consistency (/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx)
  • Disable cancel button during form submission to prevent user actions (/packages/twenty-front/src/pages/settings/data-model/SettingsObjectNewField/SettingsObjectNewFieldStep2.tsx)

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

Copy link
Member

@FelixMalfait FelixMalfait left a comment

Choose a reason for hiding this comment

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

Great work again!!! Thanks a lot

@FelixMalfait FelixMalfait merged commit 9917fb0 into twentyhq:main Jul 11, 2024
8 checks passed
Copy link

Thanks @pacyL2K19 for your contribution!
This marks your 1st PR on the repo. You're top 18% of all our contributors 🎉
See contributor page - Share on LinkedIn - Share on Twitter

Contributions

@pacyL2K19 pacyL2K19 deleted the fix/disable-cancel-btn-on-save branch July 16, 2024 16:41
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.

Reduce Field Creation Time The "Cancel" Button should be disabled on Object creation
2 participants