mirror of
https://github.com/datahub-project/datahub.git
synced 2025-06-27 05:03:31 +00:00
feat(lineage): Add feature flag to hide expand more action (#13557)
This commit is contained in:
parent
a0787c3abe
commit
5eca21dfbe
@ -255,6 +255,7 @@ public class AppConfigResolver implements DataFetcher<CompletableFuture<AppConfi
|
||||
.setShowManageTags(_featureFlags.isShowManageTags())
|
||||
.setShowIntroducePage(_featureFlags.isShowIntroducePage())
|
||||
.setShowIngestionPageRedesign(_featureFlags.isShowIngestionPageRedesign())
|
||||
.setShowLineageExpandMore(_featureFlags.isShowLineageExpandMore())
|
||||
.build();
|
||||
|
||||
appConfig.setFeatureFlags(featureFlagsConfig);
|
||||
|
@ -697,6 +697,11 @@ type FeatureFlagsConfig {
|
||||
If turned on, show the re-designed Ingestions page
|
||||
"""
|
||||
showIngestionPageRedesign: Boolean!
|
||||
|
||||
"""
|
||||
If enabled, show the expand more button (>>) in the lineage graph
|
||||
"""
|
||||
showLineageExpandMore: Boolean!
|
||||
}
|
||||
|
||||
"""
|
||||
|
@ -7,6 +7,7 @@ import { ANTD_GRAY } from '@app/entityV2/shared/constants';
|
||||
import { Button, DownstreamWrapper, UpstreamWrapper } from '@app/lineageV2/LineageEntityNode/components';
|
||||
import { useOnClickExpandLineage } from '@app/lineageV2/LineageEntityNode/useOnClickExpandLineage';
|
||||
import { FetchStatus, onClickPreventSelect } from '@app/lineageV2/common';
|
||||
import { useAppConfig } from '@app/useAppConfig';
|
||||
|
||||
import { EntityType, LineageDirection } from '@types';
|
||||
|
||||
@ -28,10 +29,14 @@ interface Props {
|
||||
}
|
||||
|
||||
export function ExpandLineageButton({ urn, type, direction, display, fetchStatus, ignoreSchemaFieldStatus }: Props) {
|
||||
const { config } = useAppConfig();
|
||||
const expandOneLevel = useOnClickExpandLineage(urn, type, direction, false);
|
||||
const expandAll = useOnClickExpandLineage(urn, type, direction, true);
|
||||
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>) => {
|
||||
expandOneLevel(e);
|
||||
|
@ -79,6 +79,7 @@ export const DEFAULT_APP_CONFIG = {
|
||||
showManageTags: false,
|
||||
showIntroducePage: false,
|
||||
showIngestionPageRedesign: false,
|
||||
showLineageExpandMore: false,
|
||||
},
|
||||
chromeExtensionConfig: {
|
||||
enabled: false,
|
||||
|
@ -97,6 +97,7 @@ query appConfig {
|
||||
showManageTags
|
||||
showIntroducePage
|
||||
showIngestionPageRedesign
|
||||
showLineageExpandMore
|
||||
}
|
||||
chromeExtensionConfig {
|
||||
enabled
|
||||
|
@ -41,4 +41,5 @@ public class FeatureFlags {
|
||||
private boolean showManageTags = false;
|
||||
private boolean showIntroducePage = false;
|
||||
private boolean showIngestionPageRedesign = false;
|
||||
private boolean showLineageExpandMore = true;
|
||||
}
|
||||
|
@ -535,6 +535,7 @@ featureFlags:
|
||||
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
|
||||
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:
|
||||
enabled: ${ENABLE_ENTITY_CHANGE_EVENTS_HOOK:true}
|
||||
|
Loading…
x
Reference in New Issue
Block a user