1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-02-04 00:18:01 +01:00

[Gitar] Cleaning up stale flag: onboardingUI with value true (#8832)

[![Gitar](https://raw.githubusercontent.com/gitarcode/.github/main/assets/gitar-banner.svg)](https://gitar.ai)
  This automated PR permanently enables the `onboardingUI` feature flag.
  
  ---
This automated PR was generated by [Gitar](https://gitar.ai). View
[docs](https://gitar.ai/docs).

---------

Co-authored-by: Gitar <noreply@gitar.ai>
This commit is contained in:
gitar-bot[bot] 2024-11-22 11:55:24 +02:00 committed by GitHub
parent 6844984610
commit 9b4e646a98
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 4 additions and 20 deletions

View File

@ -27,7 +27,6 @@ import { useStickinessOptions } from 'hooks/useStickinessOptions';
import { ChangeRequestTableConfigButton } from './ConfigButtons/ChangeRequestTableConfigButton'; import { ChangeRequestTableConfigButton } from './ConfigButtons/ChangeRequestTableConfigButton';
import { StyledDefinitionList } from './CreateProjectDialog.styles'; import { StyledDefinitionList } from './CreateProjectDialog.styles';
import { ProjectIcon } from 'component/common/ProjectIcon/ProjectIcon'; import { ProjectIcon } from 'component/common/ProjectIcon/ProjectIcon';
import { useUiFlag } from '../../../../../hooks/useUiFlag';
interface ICreateProjectDialogProps { interface ICreateProjectDialogProps {
open: boolean; open: boolean;
@ -119,7 +118,6 @@ export const CreateProjectDialog = ({
const { setToastData, setToastApiError } = useToast(); const { setToastData, setToastApiError } = useToast();
const navigate = useNavigate(); const navigate = useNavigate();
const { trackEvent } = usePlausibleTracker(); const { trackEvent } = usePlausibleTracker();
const onboardingUIEnabled = useUiFlag('onboardingUI');
const { const {
projectName, projectName,
projectDesc, projectDesc,
@ -192,11 +190,9 @@ export const CreateProjectDialog = ({
trackEvent('project-mode', { trackEvent('project-mode', {
props: { mode: projectMode, action: 'added' }, props: { mode: projectMode, action: 'added' },
}); });
if (onboardingUIEnabled) {
trackEvent('onboarding', { trackEvent('onboarding', {
props: { eventType: 'onboarding-started' }, props: { eventType: 'onboarding-started' },
}); });
}
} catch (error: unknown) { } catch (error: unknown) {
setToastApiError(formatUnknownError(error)); setToastApiError(formatUnknownError(error));
} }

View File

@ -28,7 +28,6 @@ const setupApi = () => {
testServerRoute(server, '/api/admin/ui-config', { testServerRoute(server, '/api/admin/ui-config', {
flags: { flags: {
flagCreator: true, flagCreator: true,
onboardingUI: true,
}, },
}); });
testServerRoute(server, '/api/admin/tags', { testServerRoute(server, '/api/admin/tags', {

View File

@ -89,7 +89,6 @@ export const ProjectFeatureToggles = ({
environments, environments,
}: IPaginatedProjectFeatureTogglesProps) => { }: IPaginatedProjectFeatureTogglesProps) => {
const { trackEvent } = usePlausibleTracker(); const { trackEvent } = usePlausibleTracker();
const onboardingUIEnabled = useUiFlag('onboardingUI');
const projectId = useRequiredPathParam('projectId'); const projectId = useRequiredPathParam('projectId');
const { project } = useProjectOverview(projectId); const { project } = useProjectOverview(projectId);
const [connectSdkOpen, setConnectSdkOpen] = useState(false); const [connectSdkOpen, setConnectSdkOpen] = useState(false);
@ -152,12 +151,9 @@ export const ProjectFeatureToggles = ({
>(`onboarding-state:v1-${projectId}`, 'hide-setup'); >(`onboarding-state:v1-${projectId}`, 'hide-setup');
const notOnboarding = const notOnboarding =
!onboardingUIEnabled || project.onboardingStatus.status === 'onboarded' ||
(onboardingUIEnabled &&
project.onboardingStatus.status === 'onboarded') ||
onboardingFlow === 'closed'; onboardingFlow === 'closed';
const isOnboarding = const isOnboarding =
onboardingUIEnabled &&
project.onboardingStatus.status !== 'onboarded' && project.onboardingStatus.status !== 'onboarded' &&
onboardingFlow === 'visible'; onboardingFlow === 'visible';
const noFeaturesExistInProject = project.featureTypeCounts?.length === 0; const noFeaturesExistInProject = project.featureTypeCounts?.length === 0;

View File

@ -86,7 +86,6 @@ export type UiFlags = {
manyStrategiesPagination?: boolean; manyStrategiesPagination?: boolean;
enableLegacyVariants?: boolean; enableLegacyVariants?: boolean;
flagCreator?: boolean; flagCreator?: boolean;
onboardingUI?: boolean;
purchaseAdditionalEnvironments?: boolean; purchaseAdditionalEnvironments?: boolean;
unleashAI?: boolean; unleashAI?: boolean;
releasePlans?: boolean; releasePlans?: boolean;

View File

@ -47,7 +47,6 @@ export type IFlagKey =
| 'enableLegacyVariants' | 'enableLegacyVariants'
| 'extendedMetrics' | 'extendedMetrics'
| 'removeUnsafeInlineStyleSrc' | 'removeUnsafeInlineStyleSrc'
| 'onboardingUI'
| 'projectRoleAssignment' | 'projectRoleAssignment'
| 'purchaseAdditionalEnvironments' | 'purchaseAdditionalEnvironments'
| 'originMiddlewareRequestLogging' | 'originMiddlewareRequestLogging'
@ -237,10 +236,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_REMOVE_UNSAFE_INLINE_STYLE_SRC, process.env.UNLEASH_EXPERIMENTAL_REMOVE_UNSAFE_INLINE_STYLE_SRC,
false, false,
), ),
onboardingUI: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_ONBOARDING_UI,
false,
),
projectRoleAssignment: parseEnvVarBoolean( projectRoleAssignment: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_PROJECT_ROLE_ASSIGNMENT, process.env.UNLEASH_EXPERIMENTAL_PROJECT_ROLE_ASSIGNMENT,
false, false,

View File

@ -48,7 +48,6 @@ process.nextTick(async () => {
manyStrategiesPagination: true, manyStrategiesPagination: true,
enableLegacyVariants: false, enableLegacyVariants: false,
extendedMetrics: true, extendedMetrics: true,
onboardingUI: true,
purchaseAdditionalEnvironments: true, purchaseAdditionalEnvironments: true,
originMiddlewareRequestLogging: true, originMiddlewareRequestLogging: true,
unleashAI: true, unleashAI: true,