Skip to content

Commit

Permalink
feat: show 8 commit hash chars in the Commit Graph
Browse files Browse the repository at this point in the history
Change from showing 7 commit name characters for each point in the graph
in the x-Axis to showing 8 commit hash characters for each point in the
graph.

Closes #589
  • Loading branch information
murilx committed Nov 29, 2024
1 parent 4a06d38 commit 5e83d8c
Showing 1 changed file with 4 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { mapFilterToReq } from '@/pages/TreeDetails/TreeDetailsFilter';
import type { TFilter } from '@/types/tree/TreeDetails';
import { useCommitHistory } from '@/api/commitHistory';

const graphDisplaySize = 7;
const graphDisplaySize = 8;

interface ICommitNavigationGraph {
origin: string;
Expand Down Expand Up @@ -210,12 +210,11 @@ const CommitNavigationGraph = ({
})
.parse(possibleIndexNumber);

const name = commitData[parsedPossibleIndex].commitName;
isCurrentCommit =
treeId === commitData[parsedPossibleIndex].commitHash;
displayText = (
name ?? commitData[parsedPossibleIndex].commitHash
).slice(0, graphDisplaySize);
displayText = commitData[
parsedPossibleIndex
]?.commitHash.slice(0, graphDisplaySize);
}

return (
Expand Down

0 comments on commit 5e83d8c

Please sign in to comment.