Skip to content

Commit 965412f

Browse files
committed
style(ui): tighten configuration details layout and item spacing
Wraps the configuration item list and the Configure again action in a Col with a shared gap, lets the items inherit the default space-between layout with a fixed-width label column, and aligns the Issuer label width to the Sign on URL row so labels sit on a consistent column.
1 parent b190354 commit 965412f

1 file changed

Lines changed: 71 additions & 71 deletions

File tree

packages/ui/src/components/ConfigureSSO/steps/ConfirmationStep.tsx

Lines changed: 71 additions & 71 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { useOrganization, useReverification } from '@clerk/shared/react';
22
import { useState } from 'react';
33

4-
import { AlertIcon, Badge, Button, descriptors, Flex, Flow, Link, localizationKeys, Text } from '@/customizables';
4+
import { AlertIcon, Badge, Button, Col, descriptors, Flex, Flow, Link, localizationKeys, Text } from '@/customizables';
55
import { useCardState } from '@/elements/contexts';
66
import { ProfileSection } from '@/elements/Section';
77
import { Switch } from '@/elements/Switch';
@@ -167,84 +167,84 @@ const ConfigurationDetailsSection = (): JSX.Element => {
167167
title={localizationKeys('configureSSO.confirmation.configurationSection.title')}
168168
centered={false}
169169
>
170-
<ProfileSection.ItemList
171-
id='ssoConfiguration'
172-
gap={4}
173-
>
174-
<ProfileSection.Item
170+
<Col gap={4}>
171+
<ProfileSection.ItemList
175172
id='ssoConfiguration'
176-
sx={t => ({ justifyContent: 'start', gap: t.space.$4 })}
173+
sx={t => ({ gap: t.sizes.$2 })}
177174
>
178-
<Text
179-
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsLabel}
180-
colorScheme='secondary'
181-
localizationKey={localizationKeys('configureSSO.confirmation.configurationSection.ssoUrlLabel')}
182-
sx={t => ({ width: t.space.$36, flexShrink: 0, whiteSpace: 'nowrap' })}
183-
/>
184-
<Link
185-
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsLink}
186-
href={samlConnection?.idpSsoUrl ?? ''}
187-
isExternal
188-
title={samlConnection?.idpSsoUrl}
189-
sx={{ overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', minWidth: 0 }}
175+
<ProfileSection.Item
176+
id='ssoConfiguration'
177+
sx={t => ({ gap: t.space.$3, paddingInlineStart: 0 })}
190178
>
191-
{samlConnection?.idpSsoUrl}
192-
</Link>
193-
</ProfileSection.Item>
179+
<Text
180+
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsLabel}
181+
colorScheme='secondary'
182+
localizationKey={localizationKeys('configureSSO.confirmation.configurationSection.ssoUrlLabel')}
183+
sx={t => ({ width: t.space.$36, flexShrink: 0, whiteSpace: 'nowrap' })}
184+
/>
194185

195-
<ProfileSection.Item
196-
id='ssoConfiguration'
197-
sx={t => ({ justifyContent: 'start', gap: t.space.$4 })}
198-
>
199-
<Text
200-
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsLabel}
201-
colorScheme='secondary'
202-
localizationKey={localizationKeys('configureSSO.confirmation.configurationSection.issuerLabel')}
203-
sx={t => ({ width: t.space.$30, flexShrink: 0, whiteSpace: 'nowrap' })}
204-
/>
205-
<Text
206-
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsValue}
207-
truncate
208-
title={samlConnection?.idpEntityId}
209-
sx={{ minWidth: 0 }}
186+
<Link
187+
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsLink}
188+
href={samlConnection?.idpSsoUrl ?? ''}
189+
isExternal
190+
title={samlConnection?.idpSsoUrl}
191+
sx={{ display: 'block', overflow: 'hidden', whiteSpace: 'nowrap', textOverflow: 'ellipsis', minWidth: 0 }}
192+
>
193+
{samlConnection?.idpSsoUrl}
194+
</Link>
195+
</ProfileSection.Item>
196+
197+
<ProfileSection.Item
198+
id='ssoConfiguration'
199+
sx={t => ({ gap: t.space.$3, paddingInlineStart: 0 })}
210200
>
211-
{samlConnection?.idpEntityId}
212-
</Text>
213-
</ProfileSection.Item>
201+
<Text
202+
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsLabel}
203+
colorScheme='secondary'
204+
localizationKey={localizationKeys('configureSSO.confirmation.configurationSection.issuerLabel')}
205+
sx={t => ({ width: t.space.$36, flexShrink: 0, whiteSpace: 'nowrap' })}
206+
/>
207+
<Text
208+
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsValue}
209+
truncate
210+
title={samlConnection?.idpEntityId}
211+
sx={{ minWidth: 0 }}
212+
>
213+
{samlConnection?.idpEntityId}
214+
</Text>
215+
</ProfileSection.Item>
214216

215-
<ProfileSection.Item
216-
id='ssoConfiguration'
217-
sx={t => ({ justifyContent: 'start', gap: t.space.$4 })}
218-
>
219-
<Text
220-
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsLabel}
221-
colorScheme='secondary'
222-
localizationKey={localizationKeys('configureSSO.confirmation.configurationSection.certificateLabel')}
223-
sx={t => ({ width: t.space.$30, flexShrink: 0, whiteSpace: 'nowrap' })}
224-
/>
225-
<Text
226-
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsValue}
227-
truncate
228-
title={samlConnection?.idpCertificate}
229-
sx={{ minWidth: 0 }}
217+
<ProfileSection.Item
218+
id='ssoConfiguration'
219+
sx={t => ({ gap: t.space.$3, paddingInlineStart: 0 })}
230220
>
231-
{samlConnection?.idpCertificate}
232-
</Text>
233-
</ProfileSection.Item>
234-
</ProfileSection.ItemList>
221+
<Text
222+
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsLabel}
223+
colorScheme='secondary'
224+
localizationKey={localizationKeys('configureSSO.confirmation.configurationSection.certificateLabel')}
225+
sx={t => ({ width: t.space.$36, flexShrink: 0, whiteSpace: 'nowrap' })}
226+
/>
227+
<Text
228+
elementDescriptor={descriptors.configureSSOConfirmationConfigDetailsValue}
229+
truncate
230+
title={samlConnection?.idpCertificate}
231+
sx={{ minWidth: 0 }}
232+
>
233+
{samlConnection?.idpCertificate}
234+
</Text>
235+
</ProfileSection.Item>
236+
</ProfileSection.ItemList>
235237

236-
<Flex
237-
justify='start'
238-
sx={t => ({ paddingInlineStart: t.space.$2x5 })}
239-
>
240-
<Button
241-
elementDescriptor={descriptors.configureSSOConfirmationReconfigureButton}
242-
variant='outline'
243-
size='sm'
244-
onClick={() => goToStep('configure')}
245-
localizationKey={localizationKeys('configureSSO.confirmation.configurationSection.configureAgainLink')}
246-
/>
247-
</Flex>
238+
<Flex justify='start'>
239+
<Button
240+
elementDescriptor={descriptors.configureSSOConfirmationReconfigureButton}
241+
variant='outline'
242+
size='sm'
243+
onClick={() => goToStep('configure')}
244+
localizationKey={localizationKeys('configureSSO.confirmation.configurationSection.configureAgainLink')}
245+
/>
246+
</Flex>
247+
</Col>
248248
</ProfileSection.Root>
249249
);
250250
};

0 commit comments

Comments
 (0)