feat(homepage): create new feature flag for homepage redesign (#13882)

This commit is contained in:
purnimagarg1 2025-06-30 21:28:55 +05:30 committed by GitHub
parent aeef5d6870
commit e5ef9a0f3a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 26 additions and 1 deletions

View File

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

View File

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

View File

@ -10,8 +10,10 @@ import { HomePage } from '@app/home/HomePage';
import { HomePage as HomePageV2 } from '@app/homeV2/HomePage';
import { IntroduceYourself } from '@app/homeV2/introduce/IntroduceYourself';
import { useSetUserPersona } from '@app/homeV2/persona/useUserPersona';
import { HomePage as HomePageNew } from '@app/homepageV2/HomePage';
import { useSetUserTitle } from '@app/identity/user/useUserTitle';
import { OnboardingContextProvider } from '@app/onboarding/OnboardingContextProvider';
import { useAppConfig } from '@app/useAppConfig';
import { useIsThemeV2, useSetThemeIsV2 } from '@app/useIsThemeV2';
import { useSetAppTheme } from '@app/useSetAppTheme';
import { useSetNavBarRedesignEnabled } from '@app/useShowNavBarRedesign';
@ -33,8 +35,16 @@ export const ProtectedRoutes = (): JSX.Element => {
useSetNavBarRedesignEnabled();
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 history = useHistory();

View File

@ -0,0 +1,5 @@
import React from 'react';
export const HomePage = () => {
return <div>Home Page</div>;
};

View File

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

View File

@ -101,6 +101,7 @@ query appConfig {
showIntroducePage
showIngestionPageRedesign
showLineageExpandMore
showHomePageRedesign
}
chromeExtensionConfig {
enabled

View File

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

View File

@ -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
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
showHomePageRedesign: ${SHOW_HOME_PAGE_REDESIGN:false} # If turned on, show the re-designed home page
entityChangeEvents:
enabled: ${ENABLE_ENTITY_CHANGE_EVENTS_HOOK:true}