Skip to content

Commit

Permalink
[Gitar] Cleaning up stale flag: onboardingUI with value true (#8832)
Browse files Browse the repository at this point in the history
[![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 <[email protected]>
  • Loading branch information
gitar-bot[bot] and Gitar authored Nov 22, 2024
1 parent 6844984 commit 9b4e646
Show file tree
Hide file tree
Showing 6 changed files with 4 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,6 @@ import { useStickinessOptions } from 'hooks/useStickinessOptions';
import { ChangeRequestTableConfigButton } from './ConfigButtons/ChangeRequestTableConfigButton';
import { StyledDefinitionList } from './CreateProjectDialog.styles';
import { ProjectIcon } from 'component/common/ProjectIcon/ProjectIcon';
import { useUiFlag } from '../../../../../hooks/useUiFlag';

interface ICreateProjectDialogProps {
open: boolean;
Expand Down Expand Up @@ -119,7 +118,6 @@ export const CreateProjectDialog = ({
const { setToastData, setToastApiError } = useToast();
const navigate = useNavigate();
const { trackEvent } = usePlausibleTracker();
const onboardingUIEnabled = useUiFlag('onboardingUI');
const {
projectName,
projectDesc,
Expand Down Expand Up @@ -192,11 +190,9 @@ export const CreateProjectDialog = ({
trackEvent('project-mode', {
props: { mode: projectMode, action: 'added' },
});
if (onboardingUIEnabled) {
trackEvent('onboarding', {
props: { eventType: 'onboarding-started' },
});
}
trackEvent('onboarding', {
props: { eventType: 'onboarding-started' },
});
} catch (error: unknown) {
setToastApiError(formatUnknownError(error));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ const setupApi = () => {
testServerRoute(server, '/api/admin/ui-config', {
flags: {
flagCreator: true,
onboardingUI: true,
},
});
testServerRoute(server, '/api/admin/tags', {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ export const ProjectFeatureToggles = ({
environments,
}: IPaginatedProjectFeatureTogglesProps) => {
const { trackEvent } = usePlausibleTracker();
const onboardingUIEnabled = useUiFlag('onboardingUI');
const projectId = useRequiredPathParam('projectId');
const { project } = useProjectOverview(projectId);
const [connectSdkOpen, setConnectSdkOpen] = useState(false);
Expand Down Expand Up @@ -152,12 +151,9 @@ export const ProjectFeatureToggles = ({
>(`onboarding-state:v1-${projectId}`, 'hide-setup');

const notOnboarding =
!onboardingUIEnabled ||
(onboardingUIEnabled &&
project.onboardingStatus.status === 'onboarded') ||
project.onboardingStatus.status === 'onboarded' ||
onboardingFlow === 'closed';
const isOnboarding =
onboardingUIEnabled &&
project.onboardingStatus.status !== 'onboarded' &&
onboardingFlow === 'visible';
const noFeaturesExistInProject = project.featureTypeCounts?.length === 0;
Expand Down
1 change: 0 additions & 1 deletion frontend/src/interfaces/uiConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@ export type UiFlags = {
manyStrategiesPagination?: boolean;
enableLegacyVariants?: boolean;
flagCreator?: boolean;
onboardingUI?: boolean;
purchaseAdditionalEnvironments?: boolean;
unleashAI?: boolean;
releasePlans?: boolean;
Expand Down
5 changes: 0 additions & 5 deletions src/lib/types/experimental.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ export type IFlagKey =
| 'enableLegacyVariants'
| 'extendedMetrics'
| 'removeUnsafeInlineStyleSrc'
| 'onboardingUI'
| 'projectRoleAssignment'
| 'purchaseAdditionalEnvironments'
| 'originMiddlewareRequestLogging'
Expand Down Expand Up @@ -237,10 +236,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_REMOVE_UNSAFE_INLINE_STYLE_SRC,
false,
),
onboardingUI: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_ONBOARDING_UI,
false,
),
projectRoleAssignment: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_PROJECT_ROLE_ASSIGNMENT,
false,
Expand Down
1 change: 0 additions & 1 deletion src/server-dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@ process.nextTick(async () => {
manyStrategiesPagination: true,
enableLegacyVariants: false,
extendedMetrics: true,
onboardingUI: true,
purchaseAdditionalEnvironments: true,
originMiddlewareRequestLogging: true,
unleashAI: true,
Expand Down

0 comments on commit 9b4e646

Please sign in to comment.