mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-21 23:58:06 +00:00
feat(homepage): create new feature flag for homepage redesign (#13882)
This commit is contained in:
parent
aeef5d6870
commit
e5ef9a0f3a
@ -263,6 +263,7 @@ public class AppConfigResolver implements DataFetcher<CompletableFuture<AppConfi
|
|||||||
.setShowIntroducePage(_featureFlags.isShowIntroducePage())
|
.setShowIntroducePage(_featureFlags.isShowIntroducePage())
|
||||||
.setShowIngestionPageRedesign(_featureFlags.isShowIngestionPageRedesign())
|
.setShowIngestionPageRedesign(_featureFlags.isShowIngestionPageRedesign())
|
||||||
.setShowLineageExpandMore(_featureFlags.isShowLineageExpandMore())
|
.setShowLineageExpandMore(_featureFlags.isShowLineageExpandMore())
|
||||||
|
.setShowHomePageRedesign(_featureFlags.isShowHomePageRedesign())
|
||||||
.build();
|
.build();
|
||||||
|
|
||||||
appConfig.setFeatureFlags(featureFlagsConfig);
|
appConfig.setFeatureFlags(featureFlagsConfig);
|
||||||
|
@ -717,6 +717,11 @@ type FeatureFlagsConfig {
|
|||||||
If enabled, show the expand more button (>>) in the lineage graph
|
If enabled, show the expand more button (>>) in the lineage graph
|
||||||
"""
|
"""
|
||||||
showLineageExpandMore: Boolean!
|
showLineageExpandMore: Boolean!
|
||||||
|
|
||||||
|
"""
|
||||||
|
If turned on, show the re-designed home page
|
||||||
|
"""
|
||||||
|
showHomePageRedesign: Boolean!
|
||||||
}
|
}
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
@ -10,8 +10,10 @@ import { HomePage } from '@app/home/HomePage';
|
|||||||
import { HomePage as HomePageV2 } from '@app/homeV2/HomePage';
|
import { HomePage as HomePageV2 } from '@app/homeV2/HomePage';
|
||||||
import { IntroduceYourself } from '@app/homeV2/introduce/IntroduceYourself';
|
import { IntroduceYourself } from '@app/homeV2/introduce/IntroduceYourself';
|
||||||
import { useSetUserPersona } from '@app/homeV2/persona/useUserPersona';
|
import { useSetUserPersona } from '@app/homeV2/persona/useUserPersona';
|
||||||
|
import { HomePage as HomePageNew } from '@app/homepageV2/HomePage';
|
||||||
import { useSetUserTitle } from '@app/identity/user/useUserTitle';
|
import { useSetUserTitle } from '@app/identity/user/useUserTitle';
|
||||||
import { OnboardingContextProvider } from '@app/onboarding/OnboardingContextProvider';
|
import { OnboardingContextProvider } from '@app/onboarding/OnboardingContextProvider';
|
||||||
|
import { useAppConfig } from '@app/useAppConfig';
|
||||||
import { useIsThemeV2, useSetThemeIsV2 } from '@app/useIsThemeV2';
|
import { useIsThemeV2, useSetThemeIsV2 } from '@app/useIsThemeV2';
|
||||||
import { useSetAppTheme } from '@app/useSetAppTheme';
|
import { useSetAppTheme } from '@app/useSetAppTheme';
|
||||||
import { useSetNavBarRedesignEnabled } from '@app/useShowNavBarRedesign';
|
import { useSetNavBarRedesignEnabled } from '@app/useShowNavBarRedesign';
|
||||||
@ -33,8 +35,16 @@ export const ProtectedRoutes = (): JSX.Element => {
|
|||||||
useSetNavBarRedesignEnabled();
|
useSetNavBarRedesignEnabled();
|
||||||
|
|
||||||
const isThemeV2 = useIsThemeV2();
|
const isThemeV2 = useIsThemeV2();
|
||||||
const FinalHomePage = isThemeV2 ? HomePageV2 : HomePage;
|
const { config } = useAppConfig();
|
||||||
|
const showHomepageRedesign = config.featureFlags.showHomePageRedesign;
|
||||||
|
|
||||||
|
let FinalHomePage;
|
||||||
|
|
||||||
|
if (isThemeV2) {
|
||||||
|
FinalHomePage = showHomepageRedesign ? HomePageNew : HomePageV2;
|
||||||
|
} else {
|
||||||
|
FinalHomePage = HomePage;
|
||||||
|
}
|
||||||
const location = useLocation();
|
const location = useLocation();
|
||||||
const history = useHistory();
|
const history = useHistory();
|
||||||
|
|
||||||
|
5
datahub-web-react/src/app/homepageV2/HomePage.tsx
Normal file
5
datahub-web-react/src/app/homepageV2/HomePage.tsx
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
import React from 'react';
|
||||||
|
|
||||||
|
export const HomePage = () => {
|
||||||
|
return <div>Home Page</div>;
|
||||||
|
};
|
@ -80,6 +80,7 @@ export const DEFAULT_APP_CONFIG = {
|
|||||||
showIntroducePage: false,
|
showIntroducePage: false,
|
||||||
showIngestionPageRedesign: false,
|
showIngestionPageRedesign: false,
|
||||||
showLineageExpandMore: false,
|
showLineageExpandMore: false,
|
||||||
|
showHomePageRedesign: false,
|
||||||
},
|
},
|
||||||
chromeExtensionConfig: {
|
chromeExtensionConfig: {
|
||||||
enabled: false,
|
enabled: false,
|
||||||
|
@ -101,6 +101,7 @@ query appConfig {
|
|||||||
showIntroducePage
|
showIntroducePage
|
||||||
showIngestionPageRedesign
|
showIngestionPageRedesign
|
||||||
showLineageExpandMore
|
showLineageExpandMore
|
||||||
|
showHomePageRedesign
|
||||||
}
|
}
|
||||||
chromeExtensionConfig {
|
chromeExtensionConfig {
|
||||||
enabled
|
enabled
|
||||||
|
@ -42,4 +42,5 @@ public class FeatureFlags {
|
|||||||
private boolean showIntroducePage = false;
|
private boolean showIntroducePage = false;
|
||||||
private boolean showIngestionPageRedesign = false;
|
private boolean showIngestionPageRedesign = false;
|
||||||
private boolean showLineageExpandMore = true;
|
private boolean showLineageExpandMore = true;
|
||||||
|
private boolean showHomePageRedesign = false;
|
||||||
}
|
}
|
||||||
|
@ -572,6 +572,7 @@ featureFlags:
|
|||||||
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
|
showLineageExpandMore: ${SHOW_LINEAGE_EXPAND_MORE:true} # If turned on, show the expand more button (>>) in the lineage graph
|
||||||
|
showHomePageRedesign: ${SHOW_HOME_PAGE_REDESIGN:false} # If turned on, show the re-designed home page
|
||||||
|
|
||||||
entityChangeEvents:
|
entityChangeEvents:
|
||||||
enabled: ${ENABLE_ENTITY_CHANGE_EVENTS_HOOK:true}
|
enabled: ${ENABLE_ENTITY_CHANGE_EVENTS_HOOK:true}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user