feat(applications): remove the application custom settings tab (#22156)
## Summary Removes the application **custom settings tab** feature. This is one half of #22059, split out so it can be reviewed/merged independently from the variable-types enrichment. ## Changes - Remove the `SettingsApplicationCustomTab` component and its tab entry/rendering in `SettingsApplicationDetails`. - Stop syncing `settingsCustomTabFrontComponent` from application manifests — `ApplicationManifestMigrationService` now only syncs the default role. - Deprecate the now-unused fields (kept for backward compatibility, no longer read or synced): - `ApplicationDTO.settingsCustomTabFrontComponentId` (GraphQL `@deprecated`) - `ApplicationManifest.settingsCustomTabFrontComponentUniversalIdentifier` - the `settingsCustomTabFrontComponentId` column comment on `ApplicationEntity` The DB column is intentionally **not dropped**, so existing installations upgrade cleanly.
This commit is contained in:
+10
-33
@@ -257,7 +257,7 @@ export class ApplicationManifestMigrationService {
|
||||
);
|
||||
|
||||
if (!dryRun) {
|
||||
await this.syncDefaultRoleAndSettingsCustomTab({
|
||||
await this.syncDefaultRole({
|
||||
manifest,
|
||||
workspaceId,
|
||||
ownerFlatApplication,
|
||||
@@ -270,7 +270,7 @@ export class ApplicationManifestMigrationService {
|
||||
};
|
||||
}
|
||||
|
||||
private async syncDefaultRoleAndSettingsCustomTab({
|
||||
private async syncDefaultRole({
|
||||
manifest,
|
||||
workspaceId,
|
||||
ownerFlatApplication,
|
||||
@@ -279,13 +279,10 @@ export class ApplicationManifestMigrationService {
|
||||
workspaceId: string;
|
||||
ownerFlatApplication: FlatApplication;
|
||||
}) {
|
||||
const {
|
||||
flatRoleMaps: refreshedFlatRoleMaps,
|
||||
flatFrontComponentMaps: refreshedFlatFrontComponentMaps,
|
||||
} = await this.workspaceCacheService.getOrRecompute(workspaceId, [
|
||||
'flatRoleMaps',
|
||||
'flatFrontComponentMaps',
|
||||
]);
|
||||
const { flatRoleMaps: refreshedFlatRoleMaps } =
|
||||
await this.workspaceCacheService.getOrRecompute(workspaceId, [
|
||||
'flatRoleMaps',
|
||||
]);
|
||||
|
||||
let defaultRoleId: string | null = null;
|
||||
|
||||
@@ -310,31 +307,11 @@ export class ApplicationManifestMigrationService {
|
||||
}
|
||||
}
|
||||
|
||||
let settingsCustomTabFrontComponentId: string | null = null;
|
||||
|
||||
const settingsCustomTabUniversalIdentifier =
|
||||
manifest.application.settingsCustomTabFrontComponentUniversalIdentifier;
|
||||
|
||||
if (isDefined(settingsCustomTabUniversalIdentifier)) {
|
||||
const flatFrontComponent = findFlatEntityByUniversalIdentifier({
|
||||
flatEntityMaps: refreshedFlatFrontComponentMaps,
|
||||
universalIdentifier: settingsCustomTabUniversalIdentifier,
|
||||
if (isDefined(defaultRoleId)) {
|
||||
await this.applicationService.update(ownerFlatApplication.id, {
|
||||
workspaceId,
|
||||
defaultRoleId,
|
||||
});
|
||||
|
||||
if (!isDefined(flatFrontComponent)) {
|
||||
throw new ApplicationException(
|
||||
`Failed to resolve front component for settingsCustomTabFrontComponentUniversalIdentifier ${settingsCustomTabUniversalIdentifier}`,
|
||||
ApplicationExceptionCode.ENTITY_NOT_FOUND,
|
||||
);
|
||||
}
|
||||
|
||||
settingsCustomTabFrontComponentId = flatFrontComponent.id;
|
||||
}
|
||||
|
||||
await this.applicationService.update(ownerFlatApplication.id, {
|
||||
workspaceId,
|
||||
settingsCustomTabFrontComponentId,
|
||||
...(isDefined(defaultRoleId) ? { defaultRoleId } : {}),
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -102,6 +102,11 @@ export class ApplicationEntity extends WorkspaceRelatedEntity {
|
||||
@Field(() => RoleDTO, { nullable: true })
|
||||
defaultRole: RoleDTO | null;
|
||||
|
||||
/**
|
||||
* @deprecated Custom settings tabs are no longer supported. The column is
|
||||
* kept (not dropped) so existing installations upgrade cleanly, but the
|
||||
* value is no longer read or synced from manifests.
|
||||
*/
|
||||
@Column({ nullable: true, type: 'uuid' })
|
||||
settingsCustomTabFrontComponentId: string | null;
|
||||
|
||||
|
||||
@@ -86,9 +86,17 @@ export class ApplicationDTO {
|
||||
@Field({ nullable: true })
|
||||
defaultRoleId?: string;
|
||||
|
||||
/**
|
||||
* @deprecated Custom settings tabs are no longer supported. Kept for
|
||||
* backward compatibility with existing installations; the value is ignored.
|
||||
*/
|
||||
@IsOptional()
|
||||
@IsUUID()
|
||||
@Field(() => UUIDScalarType, { nullable: true })
|
||||
@Field(() => UUIDScalarType, {
|
||||
nullable: true,
|
||||
deprecationReason:
|
||||
'Custom settings tabs are no longer supported. This field is ignored.',
|
||||
})
|
||||
settingsCustomTabFrontComponentId?: string;
|
||||
|
||||
@IsOptional()
|
||||
|
||||
Reference in New Issue
Block a user