1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-22 19:07:54 +01:00

adjusting mobile styles (#2604)

This commit is contained in:
Mateusz Kwasniewski 2022-12-06 17:01:14 +01:00 committed by GitHub
parent c4f3ada0eb
commit 95937a4538
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 36 additions and 6 deletions

View File

@ -29,6 +29,9 @@ const StyledAsideBox = styled(Box)(({ theme }) => ({
width: '30%',
display: 'flex',
flexDirection: 'column',
[theme.breakpoints.down('sm')]: {
width: '100%',
},
}));
const StyledPaper = styled(Paper)(({ theme }) => ({
@ -37,6 +40,10 @@ const StyledPaper = styled(Paper)(({ theme }) => ({
width: '70%',
padding: theme.spacing(1, 2),
borderRadius: theme.shape.borderRadiusLarge,
[theme.breakpoints.down('sm')]: {
marginLeft: 0,
width: '100%',
},
}));
const StyledButtonBox = styled(Box)(({ theme }) => ({
@ -49,6 +56,13 @@ const StyledInnerContainer = styled(Box)(({ theme }) => ({
padding: theme.spacing(2),
}));
const ChangeRequestBody = styled(Box)(({ theme }) => ({
display: 'flex',
[theme.breakpoints.down('sm')]: {
flexDirection: 'column',
},
}));
export const ChangeRequestOverview: FC = () => {
const projectId = useRequiredPathParam('projectId');
const [showCancelDialog, setShowCancelDialog] = useState(false);
@ -139,7 +153,7 @@ export const ChangeRequestOverview: FC = () => {
return (
<>
<ChangeRequestHeader changeRequest={changeRequest} />
<Box sx={{ display: 'flex' }}>
<ChangeRequestBody>
<StyledAsideBox>
<ChangeRequestTimeline state={changeRequest.state} />
<ConditionallyRender
@ -272,7 +286,7 @@ export const ChangeRequestOverview: FC = () => {
can't be reopened.
</Typography>
</Dialogue>
</Box>
</ChangeRequestBody>
</>
);
};

View File

@ -29,7 +29,7 @@ export const ChangeRequestTitleCell = ({
}
return (
<TextCell>
<TextCell sx={{ minWidth: '200px' }}>
<StyledLink>
<Link
component={RouterLink}

View File

@ -4,6 +4,10 @@ export const useStyles = makeStyles()(theme => ({
header: {
padding: theme.spacing(0, 4),
},
bodyClass: {
padding: theme.spacing(4),
overflowX: 'auto',
},
tabContainer: {
paddingLeft: 0,
paddingBottom: 0,

View File

@ -211,6 +211,7 @@ export const ChangeRequestsTabs = ({
return (
<PageContent
isLoading={loading}
bodyClass={classes.bodyClass}
headerClass={classes.header}
header={
<PageHeader
@ -220,6 +221,8 @@ export const ChangeRequestsTabs = ({
value={tabs[activeTab]?.title}
indicatorColor="primary"
textColor="primary"
variant="scrollable"
allowScrollButtonsMobile
>
{tabs.map((tab, index) => (
<Tab

View File

@ -21,6 +21,9 @@ export const useStyles = makeStyles()(theme => ({
[theme.breakpoints.down('md')]: {
padding: theme.spacing(2),
},
[theme.breakpoints.down('sm')]: {
overflowX: 'auto',
},
},
paddingDisabled: {
padding: '0',

View File

@ -30,7 +30,13 @@ export const EnvironmentNameCell = ({
const { searchQuery } = useSearchHighlightContext();
return (
<TextCell>
<TextCell
sx={theme => ({
[theme.breakpoints.up('sm')]: {
minWidth: '350px',
},
})}
>
<Highlighter search={searchQuery}>{environment.name}</Highlighter>
<ConditionallyRender
condition={environment.protected}

View File

@ -240,6 +240,7 @@ const Project = () => {
value={activeTab?.path}
indicatorColor="primary"
textColor="primary"
variant="scrollable"
>
{tabs.map(tab => (
<Tab

View File

@ -153,7 +153,6 @@ const ProjectEnvironmentList = () => {
Cell: ({ row: { original } }: any) => (
<EnvironmentNameCell environment={original} />
),
minWidth: 350,
},
{
Header: 'Type',

View File

@ -109,7 +109,7 @@ exports[`renders an empty list correctly 1`] = `
</div>
</div>
<div
className="body css-54jt3w-bodyContainer"
className="body css-142eaq1-bodyContainer"
>
<table
className="MuiTable-root css-1h6dscb-MuiTable-root-table"