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: set field as custom object label identifier in Object Detail #3360

Merged
merged 3 commits into from
Jan 17, 2024

Conversation

thaisguigon
Copy link
Contributor

@thaisguigon thaisguigon commented Jan 10, 2024

Closes #3302

TODO:

  • prevent user from disabling the label identifier field on backend

@thaisguigon thaisguigon force-pushed the feat/set-field-as-label-identifier branch from 8f01936 to e54ea44 Compare January 16, 2024 09:59
@thaisguigon thaisguigon marked this pull request as ready for review January 16, 2024 10:19
@thaisguigon thaisguigon force-pushed the feat/set-field-as-label-identifier branch from 51dc07d to 21b52fb Compare January 16, 2024 10:27
@lucasbordeau lucasbordeau self-requested a review January 16, 2024 11:08
@thaisguigon thaisguigon removed their assignment Jan 16, 2024
field.id === objectMetadataItem.labelIdentifierFieldMetadataId ||
field.name === 'name',
): FieldMetadataItem | undefined =>
objectMetadataItem.fields.find((fieldMetadataItem) =>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we keep the style with { return ... } ?

onClick={handleDisable}
/>
</Section>
{!isLabelIdentifierField({
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we extract this in a variable above ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done!

@lucasbordeau
Copy link
Contributor

There a strange behavior with setting the record label identifier on another field, should we address this in this ticket ?

Enregistrement.de.l.ecran.2024-01-16.a.17.02.41.mov

@thaisguigon
Copy link
Contributor Author

There a strange behavior with setting the record label identifier on another field, should we address this in this ticket ?

Hi, thank you for the review!

I was planning to address the Tables side with this issue: #3303
However, I just opened a separate issue (#3502) for fixing what is displayed in the chip cell + link to the show page, as #3303 is more about the column's position and allowed actions!

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, thank you!

@charlesBochet charlesBochet merged commit 96d990e into main Jan 17, 2024
13 checks passed
@charlesBochet charlesBochet deleted the feat/set-field-as-label-identifier branch January 17, 2024 11:19
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.

Settings/Objects/Object Detail - Fields section - Implement "Set as record text" menu item for Custom objects
3 participants