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

Feat: Allow defining option key also in custom select options #7019

Closed
wants to merge 3 commits into from

Conversation

sid0-0
Copy link
Contributor

@sid0-0 sid0-0 commented Sep 13, 2024

Closes #6146

Screenshots:

Single select:
image
image

Multi select:
image

Notes: Current behaviour is such that editing label will also edit value to fit according to the label (as per the old method) to continue suggested values without enforcing them.

Copy link

github-actions bot commented Sep 13, 2024

Welcome!

Hello there, congrats on your first PR! We're excited to have you contributing to this project.
By submitting your Pull Request, you acknowledge that you agree with the terms of our Contributor License Agreement.

Generated by 🚫 dangerJS against 51c7df4

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 pull request introduces significant changes to allow custom select options to have different values and labels in the Twenty application. Here's a concise summary of the key modifications:

  • Modified selectOptionsSchema to remove strict validation between 'value' and 'label' fields
  • Updated SettingsDataModelFieldSelectFormOptionRow component to include separate input fields for option value and label
  • Adjusted UI layout and styling for better alignment and usability in the select option row
  • Enhanced dropdown menu functionality for additional actions on select options
  • Maintained backward compatibility by auto-generating values from labels when editing, while allowing manual customization

These changes provide more flexibility in defining select options, enabling users to create custom key-value pairs for select fields in the data model settings.

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

}
RightIcon={isDefault ? IconCheck : undefined}
maxLength={OPTION_VALUE_MAXIMUM_LENGTH}
onInputEnter={() => {}}
Copy link
Contributor

Choose a reason for hiding this comment

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

style: onInputEnter is not being used here. Consider removing or implementing the functionality

@bosiraphael
Copy link
Contributor

Hello @sid0-0, thank you for contributing to twenty!
We have a policy to assign issues to a contributor, you can read the contributor's guideline here: https://github.com/twentyhq/twenty/blob/main/.github/CONTRIBUTING.md
Since this issue is part of a larger track, the advanced settings, which @gitstart-twenty is working on, this issue has been assigned to them.
If you want to contribute to another issue, feel free to ask to be assigned to any issue labelled as good first issue :)

@sid0-0
Copy link
Contributor Author

sid0-0 commented Sep 17, 2024

@bosiraphael no worries. I raised a PR because this issue was not assigned to anyone or tagged to be picked by anyone.
PR should be good, hopefully it helps.

@lucasbordeau
Copy link
Contributor

Closing in favor of #7489, Thank you for your contribution on our other issues !

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

Successfully merging this pull request may close these issues.

Avanced Settings: Custom API names for Select & Multi-Select Keys
3 participants