Fix gap in object edition page (#8310)
Fixing  Note - this page design be updated in the next release (https://github.com/twentyhq/twenty/pull/7979)
This commit is contained in:
@ -63,10 +63,6 @@ const StyledInputContainer = styled.div`
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledSectionWrapper = styled.div`
|
|
||||||
margin-bottom: ${({ theme }) => theme.spacing(4)};
|
|
||||||
`;
|
|
||||||
|
|
||||||
const StyledAdvancedSettingsSectionInputWrapper = styled.div`
|
const StyledAdvancedSettingsSectionInputWrapper = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
@ -76,9 +72,10 @@ const StyledAdvancedSettingsSectionInputWrapper = styled.div`
|
|||||||
|
|
||||||
const StyledAdvancedSettingsContainer = styled.div`
|
const StyledAdvancedSettingsContainer = styled.div`
|
||||||
display: flex;
|
display: flex;
|
||||||
width: 100%;
|
|
||||||
gap: ${({ theme }) => theme.spacing(2)};
|
gap: ${({ theme }) => theme.spacing(2)};
|
||||||
|
padding-top: ${({ theme }) => theme.spacing(4)};
|
||||||
position: relative;
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
`;
|
`;
|
||||||
|
|
||||||
const StyledIconToolContainer = styled.div`
|
const StyledIconToolContainer = styled.div`
|
||||||
@ -154,84 +151,82 @@ export const SettingsDataModelObjectAboutForm = ({
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<StyledSectionWrapper>
|
<StyledInputsContainer>
|
||||||
<StyledInputsContainer>
|
<StyledInputContainer>
|
||||||
<StyledInputContainer>
|
<StyledLabel>Icon</StyledLabel>
|
||||||
<StyledLabel>Icon</StyledLabel>
|
|
||||||
<Controller
|
|
||||||
name="icon"
|
|
||||||
control={control}
|
|
||||||
defaultValue={objectMetadataItem?.icon ?? 'IconListNumbers'}
|
|
||||||
render={({ field: { onChange, value } }) => (
|
|
||||||
<IconPicker
|
|
||||||
disabled={disabled}
|
|
||||||
selectedIconKey={value}
|
|
||||||
onChange={({ iconKey }) => onChange(iconKey)}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</StyledInputContainer>
|
|
||||||
<Controller
|
<Controller
|
||||||
key={`object-labelSingular-text-input`}
|
name="icon"
|
||||||
name={'labelSingular'}
|
|
||||||
control={control}
|
control={control}
|
||||||
defaultValue={objectMetadataItem?.labelSingular}
|
defaultValue={objectMetadataItem?.icon ?? 'IconListNumbers'}
|
||||||
render={({ field: { onChange, value } }) => (
|
render={({ field: { onChange, value } }) => (
|
||||||
<TextInput
|
<IconPicker
|
||||||
label={'Singular'}
|
disabled={disabled}
|
||||||
placeholder={'Listing'}
|
selectedIconKey={value}
|
||||||
value={value}
|
onChange={({ iconKey }) => onChange(iconKey)}
|
||||||
onChange={(value) => {
|
|
||||||
onChange(value);
|
|
||||||
fillLabelPlural(value);
|
|
||||||
if (isLabelSyncedWithName === true) {
|
|
||||||
fillNameSingularFromLabelSingular(value);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
disabled={disabled || disableNameEdit}
|
|
||||||
fullWidth
|
|
||||||
maxLength={OBJECT_NAME_MAXIMUM_LENGTH}
|
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
<Controller
|
</StyledInputContainer>
|
||||||
key={`object-labelPlural-text-input`}
|
|
||||||
name={'labelPlural'}
|
|
||||||
control={control}
|
|
||||||
defaultValue={objectMetadataItem?.labelPlural}
|
|
||||||
render={({ field: { onChange, value } }) => (
|
|
||||||
<TextInput
|
|
||||||
label={'Plural'}
|
|
||||||
placeholder={'Listings'}
|
|
||||||
value={value}
|
|
||||||
onChange={(value) => {
|
|
||||||
onChange(value);
|
|
||||||
if (isLabelSyncedWithName === true) {
|
|
||||||
fillNamePluralFromLabelPlural(value);
|
|
||||||
}
|
|
||||||
}}
|
|
||||||
disabled={disabled || disableNameEdit}
|
|
||||||
fullWidth
|
|
||||||
maxLength={OBJECT_NAME_MAXIMUM_LENGTH}
|
|
||||||
/>
|
|
||||||
)}
|
|
||||||
/>
|
|
||||||
</StyledInputsContainer>
|
|
||||||
<Controller
|
<Controller
|
||||||
name="description"
|
key={`object-labelSingular-text-input`}
|
||||||
|
name={'labelSingular'}
|
||||||
control={control}
|
control={control}
|
||||||
defaultValue={objectMetadataItem?.description ?? null}
|
defaultValue={objectMetadataItem?.labelSingular}
|
||||||
render={({ field: { onChange, value } }) => (
|
render={({ field: { onChange, value } }) => (
|
||||||
<TextArea
|
<TextInput
|
||||||
placeholder="Write a description"
|
label={'Singular'}
|
||||||
minRows={4}
|
placeholder={'Listing'}
|
||||||
value={value ?? undefined}
|
value={value}
|
||||||
onChange={(nextValue) => onChange(nextValue ?? null)}
|
onChange={(value) => {
|
||||||
disabled={disabled}
|
onChange(value);
|
||||||
|
fillLabelPlural(value);
|
||||||
|
if (isLabelSyncedWithName === true) {
|
||||||
|
fillNameSingularFromLabelSingular(value);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
disabled={disabled || disableNameEdit}
|
||||||
|
fullWidth
|
||||||
|
maxLength={OBJECT_NAME_MAXIMUM_LENGTH}
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
/>
|
/>
|
||||||
</StyledSectionWrapper>
|
<Controller
|
||||||
|
key={`object-labelPlural-text-input`}
|
||||||
|
name={'labelPlural'}
|
||||||
|
control={control}
|
||||||
|
defaultValue={objectMetadataItem?.labelPlural}
|
||||||
|
render={({ field: { onChange, value } }) => (
|
||||||
|
<TextInput
|
||||||
|
label={'Plural'}
|
||||||
|
placeholder={'Listings'}
|
||||||
|
value={value}
|
||||||
|
onChange={(value) => {
|
||||||
|
onChange(value);
|
||||||
|
if (isLabelSyncedWithName === true) {
|
||||||
|
fillNamePluralFromLabelPlural(value);
|
||||||
|
}
|
||||||
|
}}
|
||||||
|
disabled={disabled || disableNameEdit}
|
||||||
|
fullWidth
|
||||||
|
maxLength={OBJECT_NAME_MAXIMUM_LENGTH}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
|
</StyledInputsContainer>
|
||||||
|
<Controller
|
||||||
|
name="description"
|
||||||
|
control={control}
|
||||||
|
defaultValue={objectMetadataItem?.description ?? null}
|
||||||
|
render={({ field: { onChange, value } }) => (
|
||||||
|
<TextArea
|
||||||
|
placeholder="Write a description"
|
||||||
|
minRows={4}
|
||||||
|
value={value ?? undefined}
|
||||||
|
onChange={(nextValue) => onChange(nextValue ?? null)}
|
||||||
|
disabled={disabled}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
/>
|
||||||
<AnimatePresence>
|
<AnimatePresence>
|
||||||
{isAdvancedModeEnabled && (
|
{isAdvancedModeEnabled && (
|
||||||
<motion.div
|
<motion.div
|
||||||
|
|||||||
Reference in New Issue
Block a user