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

Add SettingsCard for Config Data Type and Accounts Settings #7093

Merged
merged 8 commits into from
Sep 18, 2024

Conversation

anamarn
Copy link
Contributor

@anamarn anamarn commented Sep 17, 2024

#6950
Add new Settings Card for Config Data Type and accounts Settings
Before:
Screenshot 2024-09-11 at 17 43 16
After:
Screenshot 2024-09-17 at 14 15 18
Screenshot 2024-09-17 at 14 15 38

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

This PR introduces a new SettingsCard component and updates the field type selection UI, addressing the enhancement requests from issue #6950.

  • Renamed SettingsNavigationCard to SettingsCard in packages/twenty-front/src/modules/settings/components/SettingsCard.tsx, adding support for padding sizes, descriptions, and hover effects
  • Updated packages/twenty-front/src/modules/settings/data-model/fields/forms/components/SettingsDataModelFieldTypeSelect.tsx to use the new SettingsCard for field type options
  • Added packages/twenty-ui/src/display/icon/components/IllustrationIconArray.tsx for the new Array field type illustration
  • Modified packages/twenty-front/src/modules/settings/data-model/constants/SettingsFieldTypeConfigs.ts to use IllustrationIconArray for the Array field type
  • Created Storybook story for SettingsCard in packages/twenty-front/src/modules/settings/components/__stories__/SettingsCard.stories.tsx

7 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings

@@ -158,8 +141,8 @@ export const SettingsDataModelFieldTypeSelect = ({
{fieldTypeConfigs
.filter(([, config]) => config.category === category)
.map(([key, config]) => (
<StyledButtonContainer>
<StyledButton
<StyledCardContainer>
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Add a unique 'key' prop to the StyledCardContainer

<StyledButtonContainer>
<StyledButton
<StyledCardContainer>
<SettingsCard
key={key}
Copy link
Contributor

Choose a reason for hiding this comment

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

syntax: Remove redundant 'key' prop from SettingsCard

Copy link
Member

@charlesBochet charlesBochet left a comment

Choose a reason for hiding this comment

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

LGTM!

@Bonapara
Copy link
Member

Icons

3 things to fix:

  • Create the 24px icon size in the theme and set the new field step one icon to 24px x 24px

  • The card without description should be 40px heigh (not 38px)

  • Make sure the border is 1px instead of 3px

CleanShot 2024-09-17 at 15 41 54

  • Convert the relations to the new field type style:

CleanShot 2024-09-17 at 15 39 39

  • Align the icons with the column title

CleanShot 2024-09-17 at 15 40 54

Card

Current behavior

Padding is 16px x 12px

CleanShot 2024-09-17 at 15 44 44

The icon is not in a container

CleanShot 2024-09-17 at 15 45 31

Desired behavior

The padding should be 8px

CleanShot 2024-09-17 at 15 46 24

There should be a fixed 24px x 24px icon container:

CleanShot 2024-09-17 at 15 48 23

The card border-radius should be 8px

image

@Bonapara
Copy link
Member

@anamarn thanks!

Can you add a 2px padding around the icon on the object page?

CleanShot 2024-09-18 at 15 04 11

Could we change the URL from step-2 to step-1 on the field type selection page?

CleanShot 2024-09-18 at 15 05 24

@anamarn anamarn merged commit cac3e11 into main Sep 18, 2024
12 of 13 checks passed
@anamarn anamarn deleted the feat/card-field-type-config branch September 18, 2024 16:32
Copy link

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

Contributions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants