feat(lineage): Add feature flag to hide expand more action (#13557)

This commit is contained in:
Andrew Sikowitz 2025-05-19 13:57:43 -07:00 committed by GitHub
parent a0787c3abe
commit 5eca21dfbe
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 16 additions and 1 deletions

View File

@ -255,6 +255,7 @@ public class AppConfigResolver implements DataFetcher<CompletableFuture<AppConfi
.setShowManageTags(_featureFlags.isShowManageTags()) .setShowManageTags(_featureFlags.isShowManageTags())
.setShowIntroducePage(_featureFlags.isShowIntroducePage()) .setShowIntroducePage(_featureFlags.isShowIntroducePage())
.setShowIngestionPageRedesign(_featureFlags.isShowIngestionPageRedesign()) .setShowIngestionPageRedesign(_featureFlags.isShowIngestionPageRedesign())
.setShowLineageExpandMore(_featureFlags.isShowLineageExpandMore())
.build(); .build();
appConfig.setFeatureFlags(featureFlagsConfig); appConfig.setFeatureFlags(featureFlagsConfig);

View File

@ -697,6 +697,11 @@ type FeatureFlagsConfig {
If turned on, show the re-designed Ingestions page If turned on, show the re-designed Ingestions page
""" """
showIngestionPageRedesign: Boolean! showIngestionPageRedesign: Boolean!
"""
If enabled, show the expand more button (>>) in the lineage graph
"""
showLineageExpandMore: Boolean!
} }
""" """

View File

@ -7,6 +7,7 @@ import { ANTD_GRAY } from '@app/entityV2/shared/constants';
import { Button, DownstreamWrapper, UpstreamWrapper } from '@app/lineageV2/LineageEntityNode/components'; import { Button, DownstreamWrapper, UpstreamWrapper } from '@app/lineageV2/LineageEntityNode/components';
import { useOnClickExpandLineage } from '@app/lineageV2/LineageEntityNode/useOnClickExpandLineage'; import { useOnClickExpandLineage } from '@app/lineageV2/LineageEntityNode/useOnClickExpandLineage';
import { FetchStatus, onClickPreventSelect } from '@app/lineageV2/common'; import { FetchStatus, onClickPreventSelect } from '@app/lineageV2/common';
import { useAppConfig } from '@app/useAppConfig';
import { EntityType, LineageDirection } from '@types'; import { EntityType, LineageDirection } from '@types';
@ -28,10 +29,14 @@ interface Props {
} }
export function ExpandLineageButton({ urn, type, direction, display, fetchStatus, ignoreSchemaFieldStatus }: Props) { export function ExpandLineageButton({ urn, type, direction, display, fetchStatus, ignoreSchemaFieldStatus }: Props) {
const { config } = useAppConfig();
const expandOneLevel = useOnClickExpandLineage(urn, type, direction, false); const expandOneLevel = useOnClickExpandLineage(urn, type, direction, false);
const expandAll = useOnClickExpandLineage(urn, type, direction, true); const expandAll = useOnClickExpandLineage(urn, type, direction, true);
const isFetchComplete = fetchStatus[direction] === FetchStatus.COMPLETE; const isFetchComplete = fetchStatus[direction] === FetchStatus.COMPLETE;
const showExpandAll = !isFetchComplete && (type === EntityType.SchemaField ? !ignoreSchemaFieldStatus : true); const showExpandAll =
config.featureFlags.showLineageExpandMore &&
!isFetchComplete &&
(type === EntityType.SchemaField ? !ignoreSchemaFieldStatus : true);
const handleExpandOneLevel = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => { const handleExpandOneLevel = (e: React.MouseEvent<HTMLSpanElement, MouseEvent>) => {
expandOneLevel(e); expandOneLevel(e);

View File

@ -79,6 +79,7 @@ export const DEFAULT_APP_CONFIG = {
showManageTags: false, showManageTags: false,
showIntroducePage: false, showIntroducePage: false,
showIngestionPageRedesign: false, showIngestionPageRedesign: false,
showLineageExpandMore: false,
}, },
chromeExtensionConfig: { chromeExtensionConfig: {
enabled: false, enabled: false,

View File

@ -97,6 +97,7 @@ query appConfig {
showManageTags showManageTags
showIntroducePage showIntroducePage
showIngestionPageRedesign showIngestionPageRedesign
showLineageExpandMore
} }
chromeExtensionConfig { chromeExtensionConfig {
enabled enabled

View File

@ -41,4 +41,5 @@ public class FeatureFlags {
private boolean showManageTags = false; private boolean showManageTags = false;
private boolean showIntroducePage = false; private boolean showIntroducePage = false;
private boolean showIngestionPageRedesign = false; private boolean showIngestionPageRedesign = false;
private boolean showLineageExpandMore = true;
} }

View File

@ -535,6 +535,7 @@ featureFlags:
showManageTags: ${SHOW_MANAGE_TAGS:true} # If turned on, allow users to manage tags in the UI showManageTags: ${SHOW_MANAGE_TAGS:true} # If turned on, allow users to manage tags in the UI
showIntroducePage: ${SHOW_INTRODUCE_PAGE:true} # If turned on, we will show the introduce page in the V2 UI experience to add a title and select platforms showIntroducePage: ${SHOW_INTRODUCE_PAGE:true} # If turned on, we will show the introduce page in the V2 UI experience to add a title and select platforms
showIngestionPageRedesign: ${SHOW_INGESTION_PAGE_REDESIGN:false} # If turned on, show the re-designed Ingestion page showIngestionPageRedesign: ${SHOW_INGESTION_PAGE_REDESIGN:false} # If turned on, show the re-designed Ingestion page
showLineageExpandMore: ${SHOW_LINEAGE_EXPAND_MORE:true} # If turned on, show the expand more button (>>) in the lineage graph
entityChangeEvents: entityChangeEvents:
enabled: ${ENABLE_ENTITY_CHANGE_EVENTS_HOOK:true} enabled: ${ENABLE_ENTITY_CHANGE_EVENTS_HOOK:true}