diff --git a/client-src/elements/chromedash-feature-detail.ts b/client-src/elements/chromedash-feature-detail.ts index 9986f31a0a79..09ef6b49f0a6 100644 --- a/client-src/elements/chromedash-feature-detail.ts +++ b/client-src/elements/chromedash-feature-detail.ts @@ -35,7 +35,6 @@ import './chromedash-gate-chip'; import {GateDict} from './chromedash-gate-chip'; import {Process, ProgressItem} from './chromedash-gate-column'; import { - DEPRECATED_FIELDS, GATE_ACTIVE_REVIEW_STATES, GATE_FINISHED_REVIEW_STATES, GATE_PREPARING, @@ -387,11 +386,10 @@ export class ChromedashFeatureDetail extends LitElement { } renderField(fieldDef, feStage) { - const [fieldId, fieldDisplayName, fieldType] = fieldDef; + const [fieldId, fieldDisplayName, fieldType, deprecated] = fieldDef; const value = getFieldValueFromFeature(fieldId, feStage, this.feature); const isDefined = isDefinedValue(value); - const isDeprecatedField = DEPRECATED_FIELDS.has(fieldId); - if (!isDefined && isDeprecatedField) { + if (!isDefined && deprecated) { return nothing; } diff --git a/client-src/elements/chromedash-form-field.ts b/client-src/elements/chromedash-form-field.ts index 22d562cd4d7d..2f55eae9a40b 100644 --- a/client-src/elements/chromedash-form-field.ts +++ b/client-src/elements/chromedash-form-field.ts @@ -415,6 +415,9 @@ export class ChromedashFormField extends LitElement { } render() { + if (this.fieldProps.deprecated && !this.value) { + return nothing; + } const helpText = this.forEnterprise && this.fieldProps.enterprise_help_text !== undefined ? this.fieldProps.enterprise_help_text diff --git a/client-src/elements/form-field-enums.ts b/client-src/elements/form-field-enums.ts index 7f259d48d5f0..45c594ecc5e4 100644 --- a/client-src/elements/form-field-enums.ts +++ b/client-src/elements/form-field-enums.ts @@ -463,14 +463,6 @@ export const STAGE_FIELD_NAME_MAPPING: Record = { r4dt_url: 'intent_thread_url', }; -export const DEPRECATED_FIELDS = new Set([ - 'experiment_timeline', - 'i2e_lgtms', - 'i2s_lgtms', - 'r4dt_lgtms', - 'standardization', -]); - export const GATE_TYPES: Record = { API_PROTOTYPE: 1, API_ORIGIN_TRIAL: 2, diff --git a/client-src/elements/form-field-specs.ts b/client-src/elements/form-field-specs.ts index 4a17e20550ed..eaa4adee6884 100644 --- a/client-src/elements/form-field-specs.ts +++ b/client-src/elements/form-field-specs.ts @@ -88,6 +88,7 @@ interface ResolvedField { >; displayLabel?: string; disabled?: boolean; + deprecated?: boolean; } interface Field extends ResolvedField { @@ -1269,6 +1270,7 @@ export const ALL_FIELDS: Record = { label: 'Experiment Timeline', help_text: html` When does the experiment start and expire? Deprecated: Please use the numeric fields above instead.`, + deprecated: true, }, ot_milestone_desktop_start: { @@ -1684,6 +1686,7 @@ export const ALL_FIELDS: Record = { label: 'Intent to Experiment LGTM by', help_text: html` Full email address of API owner who LGTM'd the Intent to Experiment email thread.`, + deprecated: true, }, i2s_lgtms: { @@ -1699,6 +1702,7 @@ export const ALL_FIELDS: Record = { Comma separated list of email addresses of API owners who LGTM'd the Intent to Ship email thread. `, + deprecated: true, }, r4dt_lgtms: { @@ -1714,6 +1718,7 @@ export const ALL_FIELDS: Record = { label: 'Request for Deprecation Trial LGTM by', help_text: html` Full email addresses of API owners who LGTM'd the Request for Deprecation Trial email thread.`, + deprecated: true, }, debuggability: { @@ -2076,6 +2081,8 @@ export const ALL_FIELDS: Record = { label: 'Enterprise policies', help_text: html` List the policies that are being introduced, removed, or can be used to control the feature at this stage, if any.`, + disabled: true, + deprecated: true, }, enterprise_feature_categories: { @@ -2195,7 +2202,8 @@ function makeDisplaySpec(fieldName: string) { const displayName = fieldProps.label || fieldProps.displayLabel || makeHumanReadable(fieldName); const fieldType = categorizeFieldType(fieldProps); - return [fieldName, displayName, fieldType]; + const deprecated = fieldProps.deprecated; + return [fieldName, displayName, fieldType, deprecated]; } export function makeDisplaySpecs(fieldNames: string[]) {