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 isInactive to FieldMetadata decorator #4145

Open
FelixMalfait opened this issue Feb 22, 2024 · 3 comments
Open

Add isInactive to FieldMetadata decorator #4145

FelixMalfait opened this issue Feb 22, 2024 · 3 comments
Assignees
Labels

Comments

@FelixMalfait
Copy link
Member

FelixMalfait commented Feb 22, 2024

Context

It's currently possible to enable/disable fields.
That will be reflected on the isActive column in the fieldMetadata table of the metadata schema.

We're about to create new columns for standard objects (e.g. "description" column on company)
But we don't want to create too many columns or pollute existing workspace with column people didn't ask for.
So we need to adapt the decorator for this (fields will be created by disabled by default).

Implementation

We should allow for a new decorator parameter on the FieldMetadata decorator:

  @FieldMetadata({
   type: FieldMetadataType.TEXT,
   label: 'Name',
   description: 'The company name',
   icon: 'IconBuildingSkyscraper',
   isActive: false
 })

It could also be its own decorator @isInactive but I feel like it would mean it's always inactive like isNullable or isSystem, while label, description, icon etc are already also values that can be edited by the user.

@magrinj what option do you prefer between the two?

@FelixMalfait FelixMalfait changed the title Add isActive to FieldMetadata decorator Add isInactive to FieldMetadata decorator Feb 23, 2024
@Kanav-Arora
Copy link
Contributor

Kanav-Arora commented Mar 26, 2024

Hi @FelixMalfait
Please assign me this issue and could you please tell me which dir should I explore first? Sorry its my first backend issue soon I'll get comfortable with it like frontend

@FelixMalfait
Copy link
Member Author

Sure @Kanav-Arora you should look at field-metadata.decorator.ts as a starting point!

@magrinj
Copy link
Member

magrinj commented Apr 2, 2024

@FelixMalfait Sorry for the delay, I didn't see the ping on this ticket, adding @IsInactive decorator sounds good to me if by default they are active, but it's maybe more readable adding it to the @FieldMetadata decorator for now

@FelixMalfait FelixMalfait added the T label May 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: 🆕 New
Development

No branches or pull requests

4 participants