Skip to content

Commit 173eb85

Browse files
authored
feat(view): 스토리라인 차트 모달 개선 (#1006)
- MUI Full-screen dialog 적용 - 디자인 변경 - 모달 타이틀 변경
1 parent 40439f0 commit 173eb85

File tree

3 files changed

+44
-62
lines changed

3 files changed

+44
-62
lines changed

packages/view/src/App.scss

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -46,36 +46,3 @@ body {
4646
margin: 2.5rem 0 0 0;
4747
}
4848
}
49-
50-
.folder-activity-flow-modal {
51-
position: fixed;
52-
top: 0;
53-
left: 0;
54-
width: 100%;
55-
height: 100%;
56-
background-color: rgba(0, 0, 0, 0.5);
57-
display: flex;
58-
justify-content: center;
59-
align-items: center;
60-
z-index: 1000;
61-
}
62-
63-
.folder-activity-flow-modal-content {
64-
background-color: white;
65-
padding: 1.25rem;
66-
border-radius: 0.5rem;
67-
width: 90%;
68-
height: 80%;
69-
overflow: auto;
70-
position: relative;
71-
}
72-
73-
.folder-activity-flow-modal-close {
74-
position: absolute;
75-
top: 0.625rem;
76-
right: 0.625rem;
77-
background: none;
78-
border: none;
79-
font-size: 1.25rem;
80-
cursor: pointer;
81-
}

packages/view/src/App.tsx

Lines changed: 44 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,22 @@ import { useBranchStore, useDataStore, useGithubInfo, useLoadingStore, useThemeS
2121
import { THEME_INFO } from "components/ThemeSelector/ThemeSelector.const";
2222
import { NetworkGraph } from "components/NetworkGraph";
2323
import { InsightsButton } from "components/InsightsButton";
24+
import { Dialog, dialogClasses } from "@mui/material";
25+
import Divider from "@mui/material/Divider";
26+
import AppBar from "@mui/material/AppBar";
27+
import Toolbar from "@mui/material/Toolbar";
28+
import IconButton from "@mui/material/IconButton";
29+
import Typography from "@mui/material/Typography";
30+
import CloseIcon from "@mui/icons-material/Close";
31+
import { pxToRem } from "utils";
2432

2533
const App = () => {
2634
const initRef = useRef<boolean>(false);
2735
const [showFolderActivityFlowModal, setShowFolderActivityFlowModal] = useState(false);
2836
const { handleChangeAnalyzedData } = useAnalayzedData();
2937
const filteredData = useDataStore((state) => state.filteredData);
3038
const { handleChangeBranchList } = useBranchStore();
31-
const { handleGithubInfo } = useGithubInfo();
39+
const { handleGithubInfo, repo } = useGithubInfo();
3240
const { loading, setLoading } = useLoadingStore();
3341
const { theme } = useThemeStore();
3442
const ideAdapter = container.resolve<IDEPort>("IDEAdapter");
@@ -111,34 +119,43 @@ const App = () => {
111119

112120
{/* Folder Activity Flow Modal */}
113121
{showFolderActivityFlowModal && (
114-
<div
115-
className="folder-activity-flow-modal"
116-
onClick={handleCloseFolderActivityFlowModal}
117-
onKeyDown={(e) => {
118-
if (e.key === "Escape") {
119-
handleCloseFolderActivityFlowModal();
120-
}
122+
<Dialog
123+
fullScreen
124+
open={showFolderActivityFlowModal}
125+
onClose={handleCloseFolderActivityFlowModal}
126+
sx={{
127+
[`& .${dialogClasses.paper}`]: {
128+
backgroundColor: "#222324",
129+
},
121130
}}
122-
role="button"
123-
tabIndex={0}
124131
>
125-
<div
126-
className="folder-activity-flow-modal-content"
127-
onClick={(e) => e.stopPropagation()}
128-
onKeyDown={(e) => e.stopPropagation()}
129-
role="dialog"
130-
tabIndex={-1}
131-
>
132-
<button
133-
type="button"
134-
className="folder-activity-flow-modal-close"
135-
onClick={handleCloseFolderActivityFlowModal}
136-
>
137-
×
138-
</button>
139-
<FolderActivityFlow />
140-
</div>
141-
</div>
132+
<AppBar sx={{ position: "relative", backgroundColor: "#222324", paddingY: pxToRem(20) }}>
133+
<Toolbar>
134+
<Typography
135+
sx={{ pl: pxToRem(25), flex: 1 }}
136+
variant="h4"
137+
component="div"
138+
>
139+
{`Storyline of ${repo}`}
140+
</Typography>
141+
<IconButton
142+
edge="end"
143+
color="inherit"
144+
onClick={handleCloseFolderActivityFlowModal}
145+
size="large"
146+
aria-label="close"
147+
>
148+
<CloseIcon />
149+
</IconButton>
150+
</Toolbar>
151+
</AppBar>
152+
<Divider
153+
sx={{
154+
backgroundColor: "#F7F7F780",
155+
}}
156+
/>
157+
<FolderActivityFlow />
158+
</Dialog>
142159
)}
143160
</>
144161
);

packages/view/src/components/FolderActivityFlow/FolderActivityFlow.scss

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,6 @@
2121

2222
padding: 1rem;
2323
background: $color-background;
24-
border-radius: 8px;
25-
2624

2725
&__head {
2826
margin-top: 40px;

0 commit comments

Comments
 (0)