From e199839427a29827aff0ecca2e418b7dfc495269 Mon Sep 17 00:00:00 2001 From: Chaewon Date: Tue, 10 Sep 2024 19:09:08 +0900 Subject: [PATCH 1/2] refator tooltips --- package-lock.json | 12 +++++------ .../src/components/@common/Author/Author.tsx | 4 +++- .../view/src/components/Detail/Detail.scss | 21 +------------------ .../view/src/components/Detail/Detail.tsx | 13 ++++++++---- .../AuthorBarChart/AuthorBarChart.scss | 19 ++++++++--------- .../AuthorBarChart/AuthorBarChart.tsx | 2 +- 6 files changed, 29 insertions(+), 42 deletions(-) diff --git a/package-lock.json b/package-lock.json index ef9d1a0d..971b54cc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "githru-vscode-ext", - "version": "0.7.0", + "version": "0.7.1", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "githru-vscode-ext", - "version": "0.7.0", + "version": "0.7.1", "license": "MIT", "workspaces": [ "./packages/*" @@ -28248,7 +28248,7 @@ }, "packages/analysis-engine": { "name": "@githru-vscode-ext/analysis-engine", - "version": "0.7.0", + "version": "0.7.1", "license": "MIT", "dependencies": { "@octokit/core": "^4.0.4", @@ -29650,7 +29650,7 @@ }, "packages/view": { "name": "@githru-vscode-ext/view", - "version": "0.7.0", + "version": "0.7.1", "license": "MIT", "dependencies": { "@emotion/react": "^11.13.0", @@ -29748,9 +29748,9 @@ }, "packages/vscode": { "name": "githru-vscode-ext", - "version": "0.7.0", + "version": "0.7.1", "dependencies": { - "@githru-vscode-ext/analysis-engine": "^0.7.0", + "@githru-vscode-ext/analysis-engine": "^0.7.1", "@octokit/rest": "^20.0.1", "node-fetch": "^3.3.2" }, diff --git a/packages/view/src/components/@common/Author/Author.tsx b/packages/view/src/components/@common/Author/Author.tsx index e454916d..904d6f55 100644 --- a/packages/view/src/components/@common/Author/Author.tsx +++ b/packages/view/src/components/@common/Author/Author.tsx @@ -1,7 +1,9 @@ import { Tooltip, Avatar } from "@mui/material"; -import { GITHUB_URL } from "../../../constants/constants"; + import type { AuthorInfo } from "types"; +import { GITHUB_URL } from "../../../constants/constants"; + const Author = ({ name, src }: AuthorInfo) => { return ( { const { authorLength, fileLength, commitLength, insertions, deletions } = getCommitListDetail({ @@ -80,7 +81,7 @@ const Detail = ({ selectedData, clusterId, authSrcMap }: DetailProps) => { {message} - + {author.names[0]}, {dayjs(commitDate).format("YY. M. DD. a h:mm")} @@ -91,8 +92,12 @@ const Detail = ({ selectedData, clusterId, authSrcMap }: DetailProps) => { tabIndex={0} onKeyDown={handleCommitIdCopy(id)} > - {id.slice(0, 6)} - {id} + +

{`${id.slice(0, 6)}...`}

+
diff --git a/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.scss b/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.scss index 5088aad0..ae0adfa3 100644 --- a/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.scss +++ b/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.scss @@ -5,11 +5,11 @@ display: flex; flex-direction: column; align-items: flex-start; +} - p { - font-size: $font-size-title; - font-weight: $font-weight-semibold; - } +.author-bar-chart__title { + font-size: $font-size-title; + font-weight: $font-weight-semibold; } .author-bar-chart__header { @@ -40,7 +40,6 @@ .axis { color: $color-white; - font-weight: $font-weight-semibold; &.x-axis { .tick { @@ -83,17 +82,17 @@ .author-bar-chart__tooltip { display: none; position: absolute; - background: $color-white; padding: 8px 16px; - text-align: center; + border-radius: 5px; font-size: $font-size-caption; + text-align: center; line-height: 1.5; - border-radius: 5px; - color: $color-dark-gray; + background: $color-medium-gray; + color: $color-white; .selected { - color: var(--color-primary); font-weight: $font-weight-semibold; + color: var(--color-primary); } .name { font-weight: $font-weight-semibold; diff --git a/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx b/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx index 29674dc4..f9fb0e50 100644 --- a/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx +++ b/packages/view/src/components/Statistics/AuthorBarChart/AuthorBarChart.tsx @@ -213,7 +213,7 @@ const AuthorBarChart = () => { return (
-

Author Bar Chart

+

Author Bar Chart