mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01: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:
parent
c12cb42885
commit
4932ae0539
@ -6,45 +6,18 @@ import { usePendingChangeRequests } from 'hooks/api/getters/usePendingChangeRequ
|
||||
import type { ChangeRequestType } from 'component/changeRequest/changeRequest.types';
|
||||
import { changesCount } from 'component/changeRequest/changesCount';
|
||||
import { Sticky } from 'component/common/Sticky/Sticky';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
|
||||
interface IDraftBannerProps {
|
||||
project: string;
|
||||
}
|
||||
|
||||
const StyledNormalDraftBannerContentWrapper = 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 }) => ({
|
||||
const StyledDraftBannerContentWrapper = styled(Box)(({ theme }) => ({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
padding: theme.spacing(1, 0),
|
||||
}));
|
||||
|
||||
const StyledNormalDraftBanner = 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 }) => ({
|
||||
const StyledDraftBanner = styled(Box)(({ theme }) => ({
|
||||
maxWidth: '1512px',
|
||||
paddingLeft: theme.spacing(2),
|
||||
paddingRight: theme.spacing(2),
|
||||
@ -81,16 +54,6 @@ const DraftBannerContent: FC<{
|
||||
}[changeRequests[0].state as 'Draft' | 'In review' | 'Approved']
|
||||
: '';
|
||||
|
||||
const increaseUnleashWidth = useUiFlag('increaseUnleashWidth');
|
||||
|
||||
const StyledDraftBanner = increaseUnleashWidth
|
||||
? StyledSpaciousDraftBanner
|
||||
: StyledNormalDraftBanner;
|
||||
|
||||
const StyledDraftBannerContentWrapper = increaseUnleashWidth
|
||||
? StyledSpaciousDraftBannerContentWrapper
|
||||
: StyledNormalDraftBannerContentWrapper;
|
||||
|
||||
return (
|
||||
<StyledDraftBanner>
|
||||
<StyledDraftBannerContentWrapper>
|
||||
|
@ -14,7 +14,6 @@ import { ConditionallyRender } from 'component/common/ConditionallyRender/Condit
|
||||
import { useChangeRequestsEnabled } from 'hooks/useChangeRequestsEnabled';
|
||||
import { DraftBanner } from './DraftBanner/DraftBanner';
|
||||
import { ThemeMode } from 'component/common/ThemeMode/ThemeMode';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
|
||||
interface IMainLayoutProps {
|
||||
children: ReactNode;
|
||||
@ -101,11 +100,8 @@ export const MainLayout = forwardRef<HTMLDivElement, IMainLayoutProps>(
|
||||
const { isChangeRequestConfiguredInAnyEnv } = useChangeRequestsEnabled(
|
||||
projectId || '',
|
||||
);
|
||||
const increaseUnleashWidth = useUiFlag('increaseUnleashWidth');
|
||||
|
||||
const StyledMainLayoutContent = increaseUnleashWidth
|
||||
? SpaciousMainLayoutContent
|
||||
: MainLayoutContent;
|
||||
const StyledMainLayoutContent = SpaciousMainLayoutContent;
|
||||
|
||||
return (
|
||||
<>
|
||||
|
@ -4,7 +4,6 @@ import { useTheme } from '@mui/material/styles';
|
||||
import { Link } from 'react-router-dom';
|
||||
import {
|
||||
AppBar,
|
||||
Container,
|
||||
IconButton,
|
||||
Tooltip,
|
||||
styled,
|
||||
@ -39,15 +38,7 @@ import InviteLinkButton from './InviteLink/InviteLinkButton/InviteLinkButton';
|
||||
import { useUiFlag } from 'hooks/useUiFlag';
|
||||
import { Badge } from '../../common/Badge/Badge';
|
||||
|
||||
const StyledHeader = styled(AppBar)(({ theme }) => ({
|
||||
backgroundColor: theme.palette.background.paper,
|
||||
padding: theme.spacing(1),
|
||||
boxShadow: 'none',
|
||||
position: 'relative',
|
||||
zIndex: 300,
|
||||
}));
|
||||
|
||||
const StyledSpaciousHeader = styled(AppBar)(({ theme }) => ({
|
||||
const HeaderComponent = styled(AppBar)(({ theme }) => ({
|
||||
backgroundColor: theme.palette.background.paper,
|
||||
padding: theme.spacing(1),
|
||||
boxShadow: 'none',
|
||||
@ -69,20 +60,13 @@ const StyledSpaciousHeader = styled(AppBar)(({ theme }) => ({
|
||||
margin: '0 auto',
|
||||
}));
|
||||
|
||||
const SpaciousStyledContainer = styled(Box)(() => ({
|
||||
const ContainerComponent = styled(Box)(() => ({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
width: '100%',
|
||||
'&&&': { padding: 0 },
|
||||
}));
|
||||
|
||||
const StyledContainer = styled(Container)(() => ({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
maxWidth: 1280,
|
||||
'&&&': { padding: 0 },
|
||||
}));
|
||||
|
||||
const StyledUserContainer = styled('div')({
|
||||
marginLeft: 'auto',
|
||||
display: 'flex',
|
||||
@ -173,8 +157,6 @@ const Header: VFC = () => {
|
||||
const toggleDrawer = () => setOpenDrawer((prev) => !prev);
|
||||
const onAdminClose = () => setAdminRef(null);
|
||||
const onConfigureClose = () => setConfigRef(null);
|
||||
|
||||
const increaseUnleashWidth = useUiFlag('increaseUnleashWidth');
|
||||
const celebatoryUnleash = useUiFlag('celebrateUnleash');
|
||||
const insightsDashboard = useUiFlag('executiveDashboardUI');
|
||||
|
||||
@ -191,14 +173,6 @@ const Header: VFC = () => {
|
||||
adminRoutes,
|
||||
};
|
||||
|
||||
const HeaderComponent = increaseUnleashWidth
|
||||
? StyledSpaciousHeader
|
||||
: StyledHeader;
|
||||
|
||||
const ContainerComponent = increaseUnleashWidth
|
||||
? SpaciousStyledContainer
|
||||
: StyledContainer;
|
||||
|
||||
if (smallScreen) {
|
||||
return (
|
||||
<HeaderComponent position='static'>
|
||||
|
@ -65,7 +65,6 @@ export type UiFlags = {
|
||||
signals?: boolean;
|
||||
automatedActions?: boolean;
|
||||
celebrateUnleash?: boolean;
|
||||
increaseUnleashWidth?: boolean;
|
||||
featureSearchFeedback?: Variant;
|
||||
enableLicense?: boolean;
|
||||
newStrategyConfigurationFeedback?: boolean;
|
||||
|
@ -118,7 +118,6 @@ exports[`should create default config 1`] = `
|
||||
"globalFrontendApiCache": false,
|
||||
"googleAuthEnabled": false,
|
||||
"inMemoryScheduledChangeRequests": false,
|
||||
"increaseUnleashWidth": false,
|
||||
"maintenanceMode": false,
|
||||
"messageBanner": {
|
||||
"enabled": false,
|
||||
|
@ -30,7 +30,6 @@ export type IFlagKey =
|
||||
| 'signals'
|
||||
| 'automatedActions'
|
||||
| 'celebrateUnleash'
|
||||
| 'increaseUnleashWidth'
|
||||
| 'featureSearchFeedback'
|
||||
| 'featureSearchFeedbackPosting'
|
||||
| 'newStrategyConfigurationFeedback'
|
||||
@ -146,10 +145,6 @@ const flags: IFlags = {
|
||||
process.env.UNLEASH_EXPERIMENTAL_CELEBRATE_UNLEASH,
|
||||
false,
|
||||
),
|
||||
increaseUnleashWidth: parseEnvVarBoolean(
|
||||
process.env.UNLEASH_EXPERIMENTAL_INCREASE_UNLEASH_WIDTH,
|
||||
false,
|
||||
),
|
||||
featureSearchFeedback: {
|
||||
name: 'withText',
|
||||
enabled: parseEnvVarBoolean(
|
||||
|
@ -43,7 +43,6 @@ process.nextTick(async () => {
|
||||
stripClientHeadersOn304: true,
|
||||
stripHeadersOnAPI: true,
|
||||
celebrateUnleash: true,
|
||||
increaseUnleashWidth: true,
|
||||
newStrategyConfigurationFeedback: true,
|
||||
featureSearchFeedbackPosting: true,
|
||||
executiveDashboard: true,
|
||||
|
Loading…
Reference in New Issue
Block a user