-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Allow standard field default value and settings editing (#7104) #8559
base: main
Are you sure you want to change the base?
Allow standard field default value and settings editing (#7104) #8559
Conversation
There was a problem hiding this 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 enables editing of default values and settings for standard fields, removing previous restrictions that only allowed modifications to custom fields.
- Modified
buildUpdatableStandardFieldInput
infield-metadata.service.ts
to includedefaultValue
andsettings
for standard fields - Removed
isCreatingField
prop fromSettingsDataModelFieldSettingsFormCard
to control field settings viaisCustom
property - Removed edit mode restriction in
SettingsDataModelFieldBooleanForm
to allow default value editing for existing boolean fields - Added support for
MULTI_SELECT
fields alongsideSELECT
fields in field metadata service - Removed
canPersistFieldMetadataItemUpdate
function that previously restricted updates to custom fields only
5 file(s) reviewed, 1 comment(s)
Edit PR Review Bot Settings | Greptile
actionButton={ | ||
shouldDisplaySaveAndCancel && ( | ||
<SaveAndCancelButtons | ||
isSaveDisabled={!canSave} | ||
isCancelDisabled={isSubmitting} | ||
onCancel={() => navigate(`/settings/objects/${objectSlug}`)} | ||
onSave={formConfig.handleSubmit(handleSave)} | ||
/> | ||
) | ||
<SaveAndCancelButtons | ||
isSaveDisabled={!canSave} | ||
isCancelDisabled={isSubmitting} | ||
onCancel={() => navigate(`/settings/objects/${objectSlug}`)} | ||
onSave={formConfig.handleSubmit(handleSave)} | ||
/> | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
logic: Removing the restriction on standard field editing could have unintended consequences. Consider adding validation to prevent critical system fields from being modified.
@@ -44,9 +42,6 @@ export const SettingsDataModelFieldBooleanForm = ({ | |||
value={value} | |||
onChange={onChange} | |||
selectClassName={className} | |||
// TODO: temporary fix - disabling edition because after editing the defaultValue, | |||
// newly created records are not taking into account the updated defaultValue properly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could not replicate this issue so removed the comment
Actually not ready to be merged yet, |
@ad-elias can you ping me when this is ready for review again? thanks :) |
@ijreilly Ready for review! |
No description provided.