mirror of
				https://github.com/Unleash/unleash.git
				synced 2025-10-27 11:02:16 +01:00 
			
		
		
		
	feat: remove project overview flags (#3532)
This commit is contained in:
		
							parent
							
								
									f92a154cd1
								
							
						
					
					
						commit
						5fa13aba0e
					
				@ -195,43 +195,6 @@ export const Project = () => {
 | 
			
		||||
                            />
 | 
			
		||||
                        </StyledDiv>
 | 
			
		||||
                    </StyledTopRow>
 | 
			
		||||
                    <ConditionallyRender
 | 
			
		||||
                        condition={
 | 
			
		||||
                            !Boolean(uiConfig?.flags?.newProjectOverview)
 | 
			
		||||
                        }
 | 
			
		||||
                        // TODO: !!! Remove entire block when removing feature flag!
 | 
			
		||||
                        show={() => (
 | 
			
		||||
                            <StyledColumn>
 | 
			
		||||
                                <StyledProjectTitle>
 | 
			
		||||
                                    <div>
 | 
			
		||||
                                        <ConditionallyRender
 | 
			
		||||
                                            condition={Boolean(
 | 
			
		||||
                                                project.description
 | 
			
		||||
                                            )}
 | 
			
		||||
                                            show={
 | 
			
		||||
                                                <StyledDiv>
 | 
			
		||||
                                                    <StyledTitle data-loading>
 | 
			
		||||
                                                        Description: 
 | 
			
		||||
                                                    </StyledTitle>
 | 
			
		||||
                                                    <StyledText data-loading>
 | 
			
		||||
                                                        {project.description}
 | 
			
		||||
                                                    </StyledText>
 | 
			
		||||
                                                </StyledDiv>
 | 
			
		||||
                                            }
 | 
			
		||||
                                        />
 | 
			
		||||
                                        <StyledDiv>
 | 
			
		||||
                                            <StyledTitle data-loading>
 | 
			
		||||
                                                projectId: 
 | 
			
		||||
                                            </StyledTitle>
 | 
			
		||||
                                            <StyledText data-loading>
 | 
			
		||||
                                                {projectId}
 | 
			
		||||
                                            </StyledText>
 | 
			
		||||
                                        </StyledDiv>
 | 
			
		||||
                                    </div>
 | 
			
		||||
                                </StyledProjectTitle>
 | 
			
		||||
                            </StyledColumn>
 | 
			
		||||
                        )}
 | 
			
		||||
                    />
 | 
			
		||||
                </StyledInnerContainer>
 | 
			
		||||
 | 
			
		||||
                <StyledSeparator />
 | 
			
		||||
 | 
			
		||||
@ -60,33 +60,6 @@ const ProjectInfo = ({
 | 
			
		||||
        (!showChangeRequestsWidget && !showProjectMembersWidget) ||
 | 
			
		||||
        (isSmallScreen && showChangeRequestsWidget && showProjectMembersWidget);
 | 
			
		||||
 | 
			
		||||
    if (!Boolean(uiConfig?.flags.newProjectOverview)) {
 | 
			
		||||
        return (
 | 
			
		||||
            <aside>
 | 
			
		||||
                <Box
 | 
			
		||||
                    sx={{
 | 
			
		||||
                        display: 'grid',
 | 
			
		||||
                        gridTemplateColumns:
 | 
			
		||||
                            'repeat(auto-fit, minmax(225px, 1fr))',
 | 
			
		||||
                        gap: theme => theme.spacing(2),
 | 
			
		||||
                        paddingBottom: theme => theme.spacing(2),
 | 
			
		||||
                    }}
 | 
			
		||||
                >
 | 
			
		||||
                    <LegacyHealthWidget projectId={id} health={health} />
 | 
			
		||||
                    <ConditionallyRender
 | 
			
		||||
                        condition={showProjectMembersWidget}
 | 
			
		||||
                        show={
 | 
			
		||||
                            <LegacyProjectMembersWidget
 | 
			
		||||
                                projectId={id}
 | 
			
		||||
                                memberCount={memberCount}
 | 
			
		||||
                            />
 | 
			
		||||
                        }
 | 
			
		||||
                    />
 | 
			
		||||
                </Box>
 | 
			
		||||
            </aside>
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    return (
 | 
			
		||||
        <aside>
 | 
			
		||||
            <StyledProjectInfoSidebarContainer
 | 
			
		||||
 | 
			
		||||
@ -60,10 +60,7 @@ const ProjectOverview = () => {
 | 
			
		||||
                stats={stats}
 | 
			
		||||
            />
 | 
			
		||||
            <StyledContentContainer>
 | 
			
		||||
                <ConditionallyRender
 | 
			
		||||
                    condition={Boolean(uiConfig?.flags.newProjectOverview)}
 | 
			
		||||
                    show={<ProjectStats stats={project.stats} />}
 | 
			
		||||
                />
 | 
			
		||||
                <ProjectStats stats={project.stats} />
 | 
			
		||||
                <StyledProjectToggles>
 | 
			
		||||
                    <ProjectFeatureToggles
 | 
			
		||||
                        features={features}
 | 
			
		||||
 | 
			
		||||
@ -86,10 +86,8 @@ exports[`should create default config 1`] = `
 | 
			
		||||
      "optimal304Differ": false,
 | 
			
		||||
      "personalAccessTokensKillSwitch": false,
 | 
			
		||||
      "proPlanAutoCharge": false,
 | 
			
		||||
      "projectMode": false,
 | 
			
		||||
      "projectScopedSegments": false,
 | 
			
		||||
      "projectScopedStickiness": false,
 | 
			
		||||
      "projectStatusApi": false,
 | 
			
		||||
      "responseTimeWithAppNameKillSwitch": false,
 | 
			
		||||
      "strictSchemaValidation": false,
 | 
			
		||||
    },
 | 
			
		||||
@ -115,10 +113,8 @@ exports[`should create default config 1`] = `
 | 
			
		||||
      "optimal304Differ": false,
 | 
			
		||||
      "personalAccessTokensKillSwitch": false,
 | 
			
		||||
      "proPlanAutoCharge": false,
 | 
			
		||||
      "projectMode": false,
 | 
			
		||||
      "projectScopedSegments": false,
 | 
			
		||||
      "projectScopedStickiness": false,
 | 
			
		||||
      "projectStatusApi": false,
 | 
			
		||||
      "responseTimeWithAppNameKillSwitch": false,
 | 
			
		||||
      "strictSchemaValidation": false,
 | 
			
		||||
    },
 | 
			
		||||
 | 
			
		||||
@ -666,24 +666,20 @@ export default class ProjectService {
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async statusJob(): Promise<void> {
 | 
			
		||||
        if (this.flagResolver.isEnabled('projectStatusApi')) {
 | 
			
		||||
            const projects = await this.store.getAll();
 | 
			
		||||
        const projects = await this.store.getAll();
 | 
			
		||||
 | 
			
		||||
            const statusUpdates = await Promise.all(
 | 
			
		||||
                projects.map((project) => this.getStatusUpdates(project.id)),
 | 
			
		||||
            );
 | 
			
		||||
        const statusUpdates = await Promise.all(
 | 
			
		||||
            projects.map((project) => this.getStatusUpdates(project.id)),
 | 
			
		||||
        );
 | 
			
		||||
 | 
			
		||||
            await Promise.all(
 | 
			
		||||
                statusUpdates.map((statusUpdate) => {
 | 
			
		||||
                    return this.projectStatsStore.updateProjectStats(
 | 
			
		||||
                        statusUpdate.projectId,
 | 
			
		||||
                        statusUpdate.updates,
 | 
			
		||||
                    );
 | 
			
		||||
                }),
 | 
			
		||||
            );
 | 
			
		||||
        } else {
 | 
			
		||||
            this.logger.info('Project status API is disabled');
 | 
			
		||||
        }
 | 
			
		||||
        await Promise.all(
 | 
			
		||||
            statusUpdates.map((statusUpdate) => {
 | 
			
		||||
                return this.projectStatsStore.updateProjectStats(
 | 
			
		||||
                    statusUpdate.projectId,
 | 
			
		||||
                    statusUpdate.updates,
 | 
			
		||||
                );
 | 
			
		||||
            }),
 | 
			
		||||
        );
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    async getStatusUpdates(projectId: string): Promise<ICalculateStatus> {
 | 
			
		||||
 | 
			
		||||
@ -10,10 +10,6 @@ const flags = {
 | 
			
		||||
        process.env.UNLEASH_EXPERIMENTAL_EMBED_PROXY,
 | 
			
		||||
        true,
 | 
			
		||||
    ),
 | 
			
		||||
    projectStatusApi: parseEnvVarBoolean(
 | 
			
		||||
        process.env.UNLEASH_EXPERIMENTAL_PROJECT_STATUS_API,
 | 
			
		||||
        false,
 | 
			
		||||
    ),
 | 
			
		||||
    newProjectOverview: parseEnvVarBoolean(
 | 
			
		||||
        process.env.NEW_PROJECT_OVERVIEW,
 | 
			
		||||
        false,
 | 
			
		||||
@ -67,7 +63,6 @@ const flags = {
 | 
			
		||||
        process.env.PROJECT_SCOPED_STICKINESS,
 | 
			
		||||
        false,
 | 
			
		||||
    ),
 | 
			
		||||
    projectMode: parseEnvVarBoolean(process.env.PROJECT_MODE, false),
 | 
			
		||||
    personalAccessTokensKillSwitch: parseEnvVarBoolean(
 | 
			
		||||
        process.env.UNLEASH_PAT_KILL_SWITCH,
 | 
			
		||||
        false,
 | 
			
		||||
 | 
			
		||||
@ -40,7 +40,6 @@ process.nextTick(async () => {
 | 
			
		||||
                        responseTimeWithAppNameKillSwitch: false,
 | 
			
		||||
                        newProjectOverview: true,
 | 
			
		||||
                        bulkOperations: true,
 | 
			
		||||
                        projectStatusApi: true,
 | 
			
		||||
                        projectScopedSegments: true,
 | 
			
		||||
                        projectScopedStickiness: true,
 | 
			
		||||
                        optimal304: true,
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user