Skip to content

Commit 5d9678c

Browse files
authored
Merge pull request #374 from qa-guru/QAGDEV-716
QAGDEV-716 - Детализация заданий не занимает весь фрейм
2 parents 56d86c0 + fea12ea commit 5d9678c

File tree

4 files changed

+22
-34
lines changed

4 files changed

+22
-34
lines changed

src/features/kanban/constants.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,6 @@ export const STANDARD_QUERY_DEFAULTS = {
1616
LIMIT: 100,
1717
};
1818

19-
export const UI_CONSTANTS = {
20-
MIN_COLUMN_WIDTH: "65%",
21-
MAX_COLUMN_WIDTH: "100%",
22-
};
23-
2419
export const ROUTES = {
2520
KANBAN: "/kanban",
2621
};

src/features/kanban/views/board/board.styled.ts

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,14 @@
11
import { Box, Button, Stack, StepLabel, Stepper } from "@mui/material";
22
import { styled } from "@mui/system";
33

4-
import { UI_CONSTANTS } from "../../constants";
5-
6-
interface IColumnBox {
7-
showHomeworkDetails: boolean;
8-
isUpLg: boolean;
9-
}
10-
11-
export const StyledWrapper = styled(Box)({
12-
display: "flex",
13-
minWidth: "100%",
14-
});
4+
export const StyledWrapper = styled(Box)<{ showHomeworkDetails: boolean }>(
5+
({ showHomeworkDetails }) => ({
6+
display: "grid",
7+
gridTemplateColumns: showHomeworkDetails ? "65% 1fr" : "100%",
8+
width: "100%",
9+
height: "100vh",
10+
})
11+
);
1512

1613
export const StyledStack = styled(Stack)(({ theme }) => ({
1714
flexDirection: "row",
@@ -52,12 +49,7 @@ export const StyledStepperButton = styled(Button)({
5249
minWidth: "5px",
5350
});
5451

55-
export const StyledColumnBox = styled(Box, {
56-
shouldForwardProp: (prop) =>
57-
!["showHomeworkDetails", "isUpLg"].includes(prop as string),
58-
})<IColumnBox>(({ showHomeworkDetails, isUpLg }) => ({
59-
width:
60-
showHomeworkDetails && isUpLg
61-
? UI_CONSTANTS.MIN_COLUMN_WIDTH
62-
: UI_CONSTANTS.MAX_COLUMN_WIDTH,
63-
}));
52+
export const StyledColumnBox = styled(Box)({
53+
height: "100%",
54+
overflow: "auto",
55+
});

src/features/kanban/views/desktop-board/desktop-board.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ const DesktopBoard: FC<IDesktopBoard> = ({
6464
);
6565

6666
return (
67-
<StyledWrapper>
67+
<StyledWrapper showHomeworkDetails={showHomeworkDetails}>
6868
<StyledColumnBox
69-
showHomeworkDetails={showHomeworkDetails}
70-
isUpLg={isLargeDesktop}
69+
// showHomeworkDetails={showHomeworkDetails}
70+
// isUpLg={isLargeDesktop}
7171
>
7272
<StyledStack>
7373
{columns?.map((column, index) => (

src/features/kanban/views/homework-details/homework-details.styled.tsx

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,18 @@ import {
1010
import OpenInNewIcon from "@mui/icons-material/OpenInNew";
1111

1212
export const StyledHomeworkDetails = styled(Box)(({ theme }) => ({
13-
position: "relative",
14-
maxWidth: "33vw",
13+
height: "100%",
14+
overflowY: "auto",
1515
backgroundColor: alpha(theme.palette.app.secondary, 0.2),
16-
marginLeft: "10px",
16+
display: "flex",
17+
flexDirection: "column",
18+
marginTop: "15px",
1719
}));
1820

1921
export const StyledBox = styled(Box)(({ theme }) => ({
20-
marginTop: "20px",
2122
padding: "35px 25px",
22-
maxHeight: "calc(100vh - 217px)",
23-
overflowY: "scroll",
23+
overflowY: "auto",
24+
flex: 1,
2425
backgroundColor: theme.palette.app.lightGrey,
2526
}));
2627

0 commit comments

Comments
 (0)