Skip to content

Commit 019aa99

Browse files
committed
full commit hash on diff section, width fix
1 parent d447b96 commit 019aa99

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

src/components/CommitDetails/index.module.css

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
.tooltip {
3535
opacity: 1;
3636
z-index: 10;
37-
max-width: 90%;
37+
max-width: 60%;
3838
visibility: visible;
3939
}
4040

@@ -44,7 +44,7 @@
4444
border: 1px solid #e1e4e8;
4545
background-color: white;
4646
position: absolute;
47-
width: 320px;
47+
width: 360px;
4848
right: 1rem;
4949
top: 1rem;
5050
z-index: 10;

src/components/DiffSection/index.module.css

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
.hashes {
66
display: flex;
77
justify-content: space-between;
8-
align-items: center;
8+
flex-direction: column;
9+
align-items: start;
910
margin-bottom: 1rem;
1011
}
1112

src/components/DiffSection/index.tsx

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -30,24 +30,26 @@ export default function DiffSection({ commit, getDiff }: Props) {
3030
}, [commit, getDiff]);
3131

3232
const { added, modified, deleted } = getChanged(diff?.files || []);
33-
const parents = commit.parents.map(parent => parent.slice(0, 7)).join(", ");
33+
const parents = commit.parents.join(", ");
3434

3535
return (
3636
<div>
3737
<div className={css.top}>
3838
<div className={css.hashes}>
3939
<div>
40-
commit:
41-
<span className={css.bold}>{commit.hash.slice(0, 7)}</span>
40+
<div>commit:</div>
41+
<div className={css.bold}>{commit.hash}</div>
4242
</div>
4343
<div>
44-
parent:
45-
<span className={css.bold}>{parents}</span>
44+
<div>parent:</div>
45+
{commit.parents.map(p => (
46+
<div className={css.bold}>{p}</div>
47+
))}
4648
</div>
4749
</div>
4850
<div className={css.message}>{commit.message}</div>
4951
</div>
50-
{diff && (
52+
{!!diff?.files.length && (
5153
<>
5254
<div className={css.summary}>
5355
{!!modified && (

0 commit comments

Comments
 (0)