The open alternative to Salesforce, designed for AI.
TypeScript crmcrm-systemcustomergood-first-issuegraphqlhacktoberfestjavascriptmarketingmonoreponestjsopen-sourcepostgresqlreactreactjssalestypescriptweb
Fix spacing between profile name fields (#24928)
Thomas des Francs61746e74e140
diff --git a/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx b/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsxindex b334d1401ed..e00a920c5af 100644--- a/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx+++ b/packages/twenty-front/src/modules/settings/profile/components/NameFields.tsx@@ -15,9 +15,7 @@ import { logError } from '~/utils/logError';const StyledComboInputContainer = styled.div`display: flex;flex-direction: row;- > * + * {- margin-left: ${themeCssVariables.spacing[4]};- }+ gap: ${themeCssVariables.spacing[4]};`;type NameFieldsProps = {diff --git a/packages/twenty-front/src/pages/settings/__stories__/SettingsProfile.stories.tsx b/packages/twenty-front/src/pages/settings/__stories__/SettingsProfile.stories.tsxindex 6ae66cb2dde..10ac499c3cc 100644--- a/packages/twenty-front/src/pages/settings/__stories__/SettingsProfile.stories.tsx+++ b/packages/twenty-front/src/pages/settings/__stories__/SettingsProfile.stories.tsx@@ -1,10 +1,14 @@import { type Meta, type StoryObj } from '@storybook/react-vite';+import { expect, within } from 'storybook/test';+import { currentWorkspaceMemberState } from '@/auth/states/currentWorkspaceMemberState';+import { jotaiStore } from '@/ui/utilities/state/jotai/jotaiStore';import {PageDecorator,type PageDecoratorArgs,} from '~/testing/decorators/PageDecorator';import { graphqlMocks } from '~/testing/graphqlMocks';+import { mockedWorkspaceMemberData } from '~/testing/mock-data/users';import { SettingsProfile } from '~/pages/settings/profile/SettingsProfile';@@ -16,6 +20,13 @@ const meta: Meta<PageDecoratorArgs> = {routePath: '/settings/profile',additionalRoutes: ['/welcome'],},+ beforeEach: () => {+ jotaiStore.set(currentWorkspaceMemberState.atom, mockedWorkspaceMemberData);++ return () => {+ jotaiStore.set(currentWorkspaceMemberState.atom, null);+ };+ },parameters: {msw: graphqlMocks,},@@ -25,4 +36,18 @@ export default meta;export type Story = StoryObj<typeof SettingsProfile>;-export const Default: Story = {};+export const Default: Story = {+ play: async ({ canvasElement }) => {+ const canvas = within(canvasElement);++ const firstName = await canvas.findByRole('textbox', {+ name: 'First Name',+ });+ const lastName = await canvas.findByRole('textbox', { name: 'Last Name' });++ expect(+ lastName.getBoundingClientRect().left -+ firstName.getBoundingClientRect().right,+ ).toBe(16);+ },+};