Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
233 changes: 129 additions & 104 deletions package-lock.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions packages/view/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -92,8 +92,8 @@
"@emotion/react": "^11.13.0",
"@emotion/styled": "^11.13.0",
"@jest/types": "^29.6.3",
"@mui/icons-material": "^5.16.6",
"@mui/material": "^5.16.6",
"@mui/icons-material": "^6.5.0",
"@mui/material": "^6.5.0",
"@testing-library/jest-dom": "^5.16.4",
"@testing-library/react": "^13.3.0",
"@testing-library/user-event": "^13.5.0",
Expand Down
6 changes: 3 additions & 3 deletions packages/view/src/App.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ body {

.load-more-button {
background-color: var(--color-primary);
color: $color-white;
color: var(--color-white);
border: none;
border-radius: 0.5rem;
padding: 0.75rem 1.5rem;
Expand All @@ -59,7 +59,7 @@ body {
}

&:disabled {
background-color: $color-medium-gray;
background-color: var(--color-grey-100);
cursor: not-allowed;
}
}
}
10 changes: 7 additions & 3 deletions packages/view/src/App.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import "reflect-metadata";
import { useEffect, useRef } from "react";
import { useEffect, useMemo, useRef } from "react";
import BounceLoader from "react-spinners/BounceLoader";
import { ThemeProvider } from "@mui/material";

import MonoLogo from "assets/monoLogo.svg";
import { BranchSelector, Statistics, TemporalFilter, ThemeSelector, VerticalClusterList } from "components";
Expand All @@ -12,6 +13,7 @@ import { useBranchStore, useDataStore, useGithubInfo, useLoadingStore, useThemeS
import { THEME_INFO } from "components/ThemeSelector/ThemeSelector.const";
import { initializeIDEConnection, sendFetchAnalyzedDataCommand } from "services";
import { COMMIT_COUNT_PER_PAGE } from "constants/constants";
import { createMuiTheme } from "theme";

const App = () => {
const initRef = useRef<boolean>(false);
Expand All @@ -27,6 +29,8 @@ const App = () => {
const { loading, setLoading } = useLoadingStore();
const { theme } = useThemeStore();

const muiTheme = useMemo(() => createMuiTheme(theme), [theme]);

useEffect(() => {
if (initRef.current === false) {
const callbacks: IDESentEvents = {
Expand Down Expand Up @@ -66,7 +70,7 @@ const App = () => {
}

return (
<>
<ThemeProvider theme={muiTheme}>
<div className="header-container">
<ThemeSelector />
<BranchSelector />
Expand Down Expand Up @@ -100,7 +104,7 @@ const App = () => {
</div>
)}
</div>
</>
</ThemeProvider>
);
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
font-weight: $font-weight-semibold;

& &__select-box {
border: 0.0625rem solid $color-white;
color: $color-white;
border: 0.0625rem solid var(--color-white);
color: var(--color-white);
height: 1.875rem;

& .MuiSvgIcon-root {
color: $color-white;
color: var(--color-white);
}

&.Mui-focused .MuiOutlinedInput-notchedOutline {
Expand Down
12 changes: 8 additions & 4 deletions packages/view/src/components/Detail/Detail.scss
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
margin-right: 1rem;
flex-grow: 10;
height: 0;
border: 0.0625rem solid $color-white;
border: 0.0625rem solid var(--color-white);
}

.detail__summary-list {
Expand Down Expand Up @@ -60,10 +60,10 @@
justify-content: space-between;
row-gap: 0.4375rem;
align-items: flex-start;
color: $color-medium-gray;
color: var(--color-grey-300);

.commit-item__detail {
color: $color-white;
color: var(--color-white);
display: flex;
justify-content: space-between;
align-items: flex-start;
Expand Down Expand Up @@ -214,7 +214,11 @@
}

@keyframes bounce {
0%, 20%, 50%, 80%, 100% {
0%,
20%,
50%,
80%,
100% {
transform: translateY(0);
}
40% {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
align-items: center;
border: 0;
background-color: transparent;
color: $color-white;
color: var(--color-white);
font-size: $font-size-title;
font-weight: $font-weight-semibold;
cursor: pointer;
Expand All @@ -24,7 +24,7 @@
max-height: 15rem;
overflow-y: auto;
padding: 0.3125rem;
background-color: $color-dark-gray;
background-color: var(--color-grey-100);
border-radius: 0.5rem;
box-shadow: 0rem 0rem 0.625rem $color-background;
z-index: 10;
Expand All @@ -38,8 +38,8 @@
text-overflow: ellipsis;
justify-content: space-between;
margin: 0.3125rem;
color: $color-white;
background-color: #4f5662;
color: var(--color-white);
background-color: var(--color-grey-300);
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@
}

& &__select-box {
border: 0.0625rem solid $color-white;
color: $color-white;
border: 0.0625rem solid var(--color-white);
color: var(--color-white);
height: 1.5625rem;
width: 6.25rem;
font-size: $font-size-caption;

& .MuiSvgIcon-root {
color: $color-white;
color: var(--color-white);
}

&.Mui-focused .MuiOutlinedInput-notchedOutline {
Expand All @@ -38,15 +38,15 @@
}

&__axis {
color: $color-white;
color: var(--color-white);

&.x-axis {
.tick {
display: none;
}

.x-axis__label {
fill: $color-white;
fill: var(--color-white);
}
}
}
Expand All @@ -57,7 +57,7 @@
.author-bar-chart__bar {
&:hover {
rect {
fill: var(--color-tertiary);
fill: var(--color-secondary-light);
}
}

Expand All @@ -66,7 +66,7 @@
}

.author-bar-chart__name {
fill: $color-white;
fill: var(--color-white);
stroke: none;
font-size: $font-size-caption;
text-anchor: start;
Expand All @@ -83,8 +83,8 @@
font-size: $font-size-caption;
text-align: center;
line-height: 1.5;
background-color: rgba($color-dark-gray, 0.9);
color: $color-white;
background-color: var(--color-grey-100);
color: var(--color-white);
pointer-events: none;

.author-bar-chart__name {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}

&__label {
color: $color-black;
color: var(--color-black);
font-weight: $font-weight-semibold;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,16 @@
.temporal-filter__reset-button {
width: 3rem;
text-transform: none;
background-color: var(--color-tertiary);
background-color: var(--color-secondary);
position: absolute;
top: 0;

&:hover {
background-color: var(--color-secondary);
background-color: var(--color-secondary-light);
}

& .temporal-filter__button-text {
color: $color-black;
color: var(--color-black);
font-weight: $font-weight-semibold;
}
}
Expand All @@ -34,7 +34,7 @@
height: 100%;
width: 100%;
> g > text {
fill: var(--color-tertiary);
fill: var(--color-secondary);
}
}
}
Expand All @@ -49,7 +49,7 @@
padding: 0.125rem;
border: solid 0.0625rem rgba(255, 255, 255, 0.22);
border-radius: 0.1875rem;
color: $color-white;
color: var(--color-white);
background: rgba(255, 255, 255, 0.09);
font-weight: $font-weight-light;
font-size: $font-size-caption;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
top: 2.5rem;
left: 0;
padding: 1.25rem;
background-color: $color-dark-gray;
background-color: var(--color-grey-100);
border-radius: 0.3rem 1.5rem 1.5rem 1.5rem;
z-index: 10;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ import AutoAwesomeIcon from "@mui/icons-material/AutoAwesome";
import CloseIcon from "@mui/icons-material/Close";

import { sendUpdateThemeCommand } from "services";
import { useThemeStore } from "store/theme";
import type { ThemeName } from "theme";

import { THEME_INFO } from "./ThemeSelector.const";
import type { ThemeInfo } from "./ThemeSelector.type";
import { useThemeStore } from "store/theme";

type ThemeIconsProps = ThemeInfo[keyof ThemeInfo] & {
theme: string;
Expand Down Expand Up @@ -42,7 +43,7 @@ const ThemeSelector = () => {

const { theme, setTheme } = useThemeStore();

const handleTheme = (value: string) => {
const handleTheme = (value: ThemeName) => {
setTheme(value);
sendUpdateThemeCommand(value);
document.documentElement.setAttribute("theme", value);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@
&__tooltip {
position: absolute;
z-index: 10;
background: $color-white;
background: var(--color-white);
padding: 0.5rem 1rem;
font-size: $font-size-caption;
line-height: 1.5;
border-radius: 0.3125rem;
color: $color-dark-gray;
color: var(--color-grey-100);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
&--expanded {
@extend .cluster-summary__info;
border-radius: 1.5625rem;
background-color: $color-dark-gray;
background-color: var(--color-grey-100);
overflow: hidden;
}
}
Expand All @@ -40,12 +40,12 @@
border: none;
background-color: transparent;
cursor: pointer;
color: $color-white;
color: var(--color-white);
width: 100%;

&:hover {
border-radius: 2.5rem;
background-color: $color-dark-gray;
background-color: var(--color-grey-100);

.summary__toggle {
visibility: visible;
Expand Down Expand Up @@ -79,14 +79,14 @@

.summary__commit-title {
font-weight: 600;
color: $color-white;
color: var(--color-white);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}

.summary__commit-body {
color: $color-light-gray;
color: var(--color-grey-300);
font-size: 0.75rem;
line-height: 1.3;
white-space: nowrap;
Expand All @@ -95,16 +95,16 @@
margin-top: 0.125rem;
margin-left: 0.5rem;
padding-left: 0.25rem;
border-left: 1px solid $color-medium-gray;
border-left: 1px solid var(--color-grey-200);
}
}

&__commit-link {
text-decoration: none;
color: $color-light-gray;
color: var(--color-grey-300);

&:visited {
color: $color-light-gray;
color: var(--color-grey-300);
}

&:hover {
Expand Down
6 changes: 4 additions & 2 deletions packages/view/src/store/theme.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
import { create } from "zustand";
import { persist } from "zustand/middleware";

import type { ThemeName } from "theme";

interface ThemeState {
theme: string;
setTheme: (theme: string) => void;
theme: ThemeName;
setTheme: (theme: ThemeName) => void;
}

export const useThemeStore = create<ThemeState>()(
Expand Down
Loading
Loading