1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-07-31 13:47:02 +02:00

[Gitar] Cleaning up stale feature flag: increaseUnleashWidth with value true (#6724)

Co-authored-by: Gitar Bot <noreply@gitar.co>
Co-authored-by: sjaanus <sellinjaanus@gmail.com>
This commit is contained in:
gitar-bot[bot] 2024-03-28 11:04:00 +02:00 committed by GitHub
parent c12cb42885
commit 4932ae0539
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 5 additions and 80 deletions

View File

@ -6,45 +6,18 @@ import { usePendingChangeRequests } from 'hooks/api/getters/usePendingChangeRequ
import type { ChangeRequestType } from 'component/changeRequest/changeRequest.types'; import type { ChangeRequestType } from 'component/changeRequest/changeRequest.types';
import { changesCount } from 'component/changeRequest/changesCount'; import { changesCount } from 'component/changeRequest/changesCount';
import { Sticky } from 'component/common/Sticky/Sticky'; import { Sticky } from 'component/common/Sticky/Sticky';
import { useUiFlag } from 'hooks/useUiFlag';
interface IDraftBannerProps { interface IDraftBannerProps {
project: string; project: string;
} }
const StyledNormalDraftBannerContentWrapper = styled(Box)(({ theme }) => ({ const StyledDraftBannerContentWrapper = styled(Box)(({ theme }) => ({
display: 'flex',
alignItems: 'center',
padding: theme.spacing(1, 0),
[theme.breakpoints.down('lg')]: {
padding: theme.spacing(1, 2),
},
}));
const StyledSpaciousDraftBannerContentWrapper = styled(Box)(({ theme }) => ({
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
padding: theme.spacing(1, 0), padding: theme.spacing(1, 0),
})); }));
const StyledNormalDraftBanner = styled(Box)(({ theme }) => ({ const StyledDraftBanner = styled(Box)(({ theme }) => ({
width: '1250px',
marginLeft: 'auto',
marginRight: 'auto',
[theme.breakpoints.down('lg')]: {
width: '1024px',
},
[theme.breakpoints.down(1024)]: {
width: '100%',
marginLeft: 0,
marginRight: 0,
},
[theme.breakpoints.down('sm')]: {
minWidth: '100%',
},
}));
const StyledSpaciousDraftBanner = styled(Box)(({ theme }) => ({
maxWidth: '1512px', maxWidth: '1512px',
paddingLeft: theme.spacing(2), paddingLeft: theme.spacing(2),
paddingRight: theme.spacing(2), paddingRight: theme.spacing(2),
@ -81,16 +54,6 @@ const DraftBannerContent: FC<{
}[changeRequests[0].state as 'Draft' | 'In review' | 'Approved'] }[changeRequests[0].state as 'Draft' | 'In review' | 'Approved']
: ''; : '';
const increaseUnleashWidth = useUiFlag('increaseUnleashWidth');
const StyledDraftBanner = increaseUnleashWidth
? StyledSpaciousDraftBanner
: StyledNormalDraftBanner;
const StyledDraftBannerContentWrapper = increaseUnleashWidth
? StyledSpaciousDraftBannerContentWrapper
: StyledNormalDraftBannerContentWrapper;
return ( return (
<StyledDraftBanner> <StyledDraftBanner>
<StyledDraftBannerContentWrapper> <StyledDraftBannerContentWrapper>

View File

@ -14,7 +14,6 @@ import { ConditionallyRender } from 'component/common/ConditionallyRender/Condit
import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled'; import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled';
import { DraftBanner } from './DraftBanner/DraftBanner'; import { DraftBanner } from './DraftBanner/DraftBanner';
import { ThemeMode } from 'component/common/ThemeMode/ThemeMode'; import { ThemeMode } from 'component/common/ThemeMode/ThemeMode';
import { useUiFlag } from 'hooks/useUiFlag';
interface IMainLayoutProps { interface IMainLayoutProps {
children: ReactNode; children: ReactNode;
@ -101,11 +100,8 @@ export const MainLayout = forwardRef<HTMLDivElement, IMainLayoutProps>(
const { isChangeRequestConfiguredInAnyEnv } = useChangeRequestsEnabled( const { isChangeRequestConfiguredInAnyEnv } = useChangeRequestsEnabled(
projectId || '', projectId || '',
); );
const increaseUnleashWidth = useUiFlag('increaseUnleashWidth');
const StyledMainLayoutContent = increaseUnleashWidth const StyledMainLayoutContent = SpaciousMainLayoutContent;
? SpaciousMainLayoutContent
: MainLayoutContent;
return ( return (
<> <>

View File

@ -4,7 +4,6 @@ import { useTheme } from '@mui/material/styles';
import { Link } from 'react-router-dom'; import { Link } from 'react-router-dom';
import { import {
AppBar, AppBar,
Container,
IconButton, IconButton,
Tooltip, Tooltip,
styled, styled,
@ -39,15 +38,7 @@ import InviteLinkButton from './InviteLink/InviteLinkButton/InviteLinkButton';
import { useUiFlag } from 'hooks/useUiFlag'; import { useUiFlag } from 'hooks/useUiFlag';
import { Badge } from '../../common/Badge/Badge'; import { Badge } from '../../common/Badge/Badge';
const StyledHeader = styled(AppBar)(({ theme }) => ({ const HeaderComponent = styled(AppBar)(({ theme }) => ({
backgroundColor: theme.palette.background.paper,
padding: theme.spacing(1),
boxShadow: 'none',
position: 'relative',
zIndex: 300,
}));
const StyledSpaciousHeader = styled(AppBar)(({ theme }) => ({
backgroundColor: theme.palette.background.paper, backgroundColor: theme.palette.background.paper,
padding: theme.spacing(1), padding: theme.spacing(1),
boxShadow: 'none', boxShadow: 'none',
@ -69,20 +60,13 @@ const StyledSpaciousHeader = styled(AppBar)(({ theme }) => ({
margin: '0 auto', margin: '0 auto',
})); }));
const SpaciousStyledContainer = styled(Box)(() => ({ const ContainerComponent = styled(Box)(() => ({
display: 'flex', display: 'flex',
alignItems: 'center', alignItems: 'center',
width: '100%', width: '100%',
'&&&': { padding: 0 }, '&&&': { padding: 0 },
})); }));
const StyledContainer = styled(Container)(() => ({
display: 'flex',
alignItems: 'center',
maxWidth: 1280,
'&&&': { padding: 0 },
}));
const StyledUserContainer = styled('div')({ const StyledUserContainer = styled('div')({
marginLeft: 'auto', marginLeft: 'auto',
display: 'flex', display: 'flex',
@ -173,8 +157,6 @@ const Header: VFC = () => {
const toggleDrawer = () => setOpenDrawer((prev) => !prev); const toggleDrawer = () => setOpenDrawer((prev) => !prev);
const onAdminClose = () => setAdminRef(null); const onAdminClose = () => setAdminRef(null);
const onConfigureClose = () => setConfigRef(null); const onConfigureClose = () => setConfigRef(null);
const increaseUnleashWidth = useUiFlag('increaseUnleashWidth');
const celebatoryUnleash = useUiFlag('celebrateUnleash'); const celebatoryUnleash = useUiFlag('celebrateUnleash');
const insightsDashboard = useUiFlag('executiveDashboardUI'); const insightsDashboard = useUiFlag('executiveDashboardUI');
@ -191,14 +173,6 @@ const Header: VFC = () => {
adminRoutes, adminRoutes,
}; };
const HeaderComponent = increaseUnleashWidth
? StyledSpaciousHeader
: StyledHeader;
const ContainerComponent = increaseUnleashWidth
? SpaciousStyledContainer
: StyledContainer;
if (smallScreen) { if (smallScreen) {
return ( return (
<HeaderComponent position='static'> <HeaderComponent position='static'>

View File

@ -65,7 +65,6 @@ export type UiFlags = {
signals?: boolean; signals?: boolean;
automatedActions?: boolean; automatedActions?: boolean;
celebrateUnleash?: boolean; celebrateUnleash?: boolean;
increaseUnleashWidth?: boolean;
featureSearchFeedback?: Variant; featureSearchFeedback?: Variant;
enableLicense?: boolean; enableLicense?: boolean;
newStrategyConfigurationFeedback?: boolean; newStrategyConfigurationFeedback?: boolean;

View File

@ -118,7 +118,6 @@ exports[`should create default config 1`] = `
"globalFrontendApiCache": false, "globalFrontendApiCache": false,
"googleAuthEnabled": false, "googleAuthEnabled": false,
"inMemoryScheduledChangeRequests": false, "inMemoryScheduledChangeRequests": false,
"increaseUnleashWidth": false,
"maintenanceMode": false, "maintenanceMode": false,
"messageBanner": { "messageBanner": {
"enabled": false, "enabled": false,

View File

@ -30,7 +30,6 @@ export type IFlagKey =
| 'signals' | 'signals'
| 'automatedActions' | 'automatedActions'
| 'celebrateUnleash' | 'celebrateUnleash'
| 'increaseUnleashWidth'
| 'featureSearchFeedback' | 'featureSearchFeedback'
| 'featureSearchFeedbackPosting' | 'featureSearchFeedbackPosting'
| 'newStrategyConfigurationFeedback' | 'newStrategyConfigurationFeedback'
@ -146,10 +145,6 @@ const flags: IFlags = {
process.env.UNLEASH_EXPERIMENTAL_CELEBRATE_UNLEASH, process.env.UNLEASH_EXPERIMENTAL_CELEBRATE_UNLEASH,
false, false,
), ),
increaseUnleashWidth: parseEnvVarBoolean(
process.env.UNLEASH_EXPERIMENTAL_INCREASE_UNLEASH_WIDTH,
false,
),
featureSearchFeedback: { featureSearchFeedback: {
name: 'withText', name: 'withText',
enabled: parseEnvVarBoolean( enabled: parseEnvVarBoolean(

View File

@ -43,7 +43,6 @@ process.nextTick(async () => {
stripClientHeadersOn304: true, stripClientHeadersOn304: true,
stripHeadersOnAPI: true, stripHeadersOnAPI: true,
celebrateUnleash: true, celebrateUnleash: true,
increaseUnleashWidth: true,
newStrategyConfigurationFeedback: true, newStrategyConfigurationFeedback: true,
featureSearchFeedbackPosting: true, featureSearchFeedbackPosting: true,
executiveDashboard: true, executiveDashboard: true,