-
Notifications
You must be signed in to change notification settings - Fork 3.1k
feat(settings): add loading state to save buttons #11639
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
base: main
Are you sure you want to change the base?
Conversation
Introduce a loading state to SaveButton and SaveAndCancelButtons components to enhance user feedback during save operations. Update SettingsNewObject to manage the loading state while submitting the form.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
Added loading state functionality to save buttons in the settings pages to provide better user feedback during form submissions.
- Added
isLoading
state management inpackages/twenty-front/src/pages/settings/data-model/SettingsNewObject.tsx
to handle API call states - Implemented
isLoading
prop inpackages/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveButton.tsx
for visual feedback - Extended
SaveAndCancelButtons
component to propagate loading state to child components
3 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings | Greptile
packages/twenty-front/src/pages/settings/data-model/SettingsNewObject.tsx
Outdated
Show resolved
Hide resolved
...s/twenty-front/src/modules/settings/components/SaveAndCancelButtons/SaveAndCancelButtons.tsx
Show resolved
Hide resolved
Screen.Recording.2025-04-17.at.18.43.46.mov |
@@ -19,12 +19,13 @@ import { useNavigateSettings } from '~/hooks/useNavigateSettings'; | |||
import { getSettingsPath } from '~/utils/navigation/getSettingsPath'; | |||
import { H2Title } from 'twenty-ui/display'; | |||
import { Section } from 'twenty-ui/layout'; | |||
import { useState } from 'react'; | |||
|
|||
export const SettingsNewObject = () => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we want this for Field creation as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AMoreaux seems the ticket says Object & Field 🙂 twentyhq/core-team-issues#572
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is unnecessary to include it during field creation, as there is no loading time; the experience is immediate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Field takes time to appear after redirect, maybe we prefer to have a similar experience than object creation and wait for creation completion before redirection. Wdyt @charlesBochet ?
Discussed offline, we will fix it in another PR since this one is simply reusing the existing component (FYI @charlesBochet) |
Replaced the tertiary font color fallback with a CSS variable (--tw-button-color) for better consistency with the design system and theming. Ensures more predictable and customizable styling.
The issue is about the space between the ellipsis and the letter S. |
Introduce a loading state to SaveButton and SaveAndCancelButtons components to enhance user feedback during save operations. Update SettingsNewObject to manage the loading state while submitting the form.
Fix twentyhq/core-team-issues#572