Skip to content

Commit

Permalink
πŸ’„
Browse files Browse the repository at this point in the history
  • Loading branch information
eamodio committed Sep 15, 2022
1 parent 378d088 commit 96b163c
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 31 deletions.
39 changes: 26 additions & 13 deletions src/webviews/apps/commitDetails/commitDetails.html
Expand Up @@ -7,14 +7,17 @@
<body class="preload">
<div class="commit-detail-panel">
<div class="commit-detail-panel__none" id="empty" aria-hidden="true">
<p>
Rich details for commits and stashes are shown as you navigate:
<ul class="bulleted">
<li>lines in the text editor</li>
<li>commits in the <a href="command:gitlens.showGraphPage">Commit Graph</a>, <a href="command:gitlens.showTimelineView">Visual File History</a>, or <a href="command:gitlens.showCommitsView">Commits view</a></li>
<li>stashes in the <a href="command:gitlens.showStashesView">Stashes view</a></li>
</ul>
</p>
<p>Rich details for commits and stashes are shown as you navigate:</p>

<ul class="bulleted">
<li>lines in the text editor</li>
<li>
commits in the <a href="command:gitlens.showGraphPage">Commit Graph</a>,
<a href="command:gitlens.showTimelineView">Visual File History</a>, or
<a href="command:gitlens.showCommitsView">Commits view</a>
</li>
<li>stashes in the <a href="command:gitlens.showStashesView">Stashes view</a></li>
</ul>

<p>Alternatively, search for or choose a commit</p>

Expand All @@ -23,7 +26,13 @@
<button class="button button--full" type="button" data-action="pick-commit">
Choose Commit...
</button>
<button class="button" type="button" data-action="search-commit" aria-label="Search for Commit" title="Search for Commit">
<button
class="button"
type="button"
data-action="search-commit"
aria-label="Search for Commit"
title="Search for Commit"
>
<code-icon icon="search"></code-icon>
</button>
</span>
Expand Down Expand Up @@ -116,10 +125,14 @@ <h2>Best practice</h2>
<span slot="title">Files changed </span>
<span slot="subtitle" data-region="stats"></span>

<div style="text-align: center;">
<div style="text-align: center">
<div class="switch">
<button type="button" class="switch__option" data-switch-value="list"><code-icon icon="list-flat"></code-icon> Path</button>
<button type="button" class="switch__option" data-switch-value="list-tree"><code-icon icon="list-tree"></code-icon> Tree</button>
<button type="button" class="switch__option" data-switch-value="list">
<code-icon icon="list-flat"></code-icon> Path
</button>
<button type="button" class="switch__option" data-switch-value="list-tree">
<code-icon icon="list-tree"></code-icon> Tree
</button>
</div>
</div>
<ul class="change-list" data-region="files">
Expand Down Expand Up @@ -148,7 +161,7 @@ <h2>Best practice</h2>
@font-face {
font-family: 'glicons';
font-display: block;
src: url("#{root}/dist/glicons.woff2?2e51fe40df2abdf6a27fbae6c29587b1") format("woff2");
src: url('#{root}/dist/glicons.woff2?2e51fe40df2abdf6a27fbae6c29587b1') format('woff2');
}
</style>
</body>
Expand Down
2 changes: 0 additions & 2 deletions src/webviews/apps/commitDetails/commitDetails.scss
Expand Up @@ -382,5 +382,3 @@ ul {

@import '../shared/codicons';
@import '../shared/glicons';


8 changes: 4 additions & 4 deletions src/webviews/apps/home/home.scss
Expand Up @@ -31,10 +31,10 @@ body {
}

.notice {
font-size: 1.1rem;
border-bottom: 1px solid var(--divider-background);
padding-bottom: 1rem;
text-align: center;
font-size: 1.1rem;
border-bottom: 1px solid var(--divider-background);
padding-bottom: 1rem;
text-align: center;
}

section {
Expand Down
16 changes: 9 additions & 7 deletions src/webviews/apps/plus/graph/graph.scss
Expand Up @@ -49,7 +49,8 @@ a {
}
}

&__details {}
&__details {
}

&__loading {
font-size: 1.2rem;
Expand Down Expand Up @@ -167,7 +168,7 @@ a {

&__icon {
&,
&[class*=codicon-] {
&[class*='codicon-'] {
font-size: 2rem;
}
}
Expand Down Expand Up @@ -446,27 +447,28 @@ a {
z-index: 1000;

&:before {
content: "";
content: '';
pointer-events: none;
position: absolute;
width: 100%;
height: 100vh;
transition: background-color .1s ease-out;
transition: background-color 0.1s ease-out;
background: transparent;

width: var(--sash-hover-size);
left: calc(50% - var(--sash-hover-size)/2);
left: calc(50% - var(--sash-hover-size) / 2);
}

&:hover, &:active {
&:hover,
&:active {
&:before {
transition-delay: 0.2s;
background-color: var(--vscode-sash-hoverBorder);
}
}

&:active:after {
content: "";
content: '';
position: absolute;
top: 0;
left: -100vw;
Expand Down
12 changes: 7 additions & 5 deletions src/webviews/commitDetails/commitDetailsWebviewView.ts
Expand Up @@ -431,7 +431,12 @@ export class CommitDetailsWebviewView extends WebviewViewBase<State, Serialized<
}

private updatePreferences(preferences: SavedPreferences) {
if (this._context.preferences?.autolinksExpanded === preferences.autolinksExpanded && this._context.preferences?.filesAsTree === preferences.filesAsTree) return;
if (
this._context.preferences?.autolinksExpanded === preferences.autolinksExpanded &&
this._context.preferences?.filesAsTree === preferences.filesAsTree
) {
return;
}

const changes: SavedPreferences = {};
if (this._context.preferences?.autolinksExpanded !== preferences.autolinksExpanded) {
Expand All @@ -443,10 +448,7 @@ export class CommitDetailsWebviewView extends WebviewViewBase<State, Serialized<
}

if (this._context.preferences?.filesAsTree !== preferences.filesAsTree) {
void this.container.storage.storeWorkspace(
'views:commitDetails:filesAsTree',
preferences.filesAsTree,
);
void this.container.storage.storeWorkspace('views:commitDetails:filesAsTree', preferences.filesAsTree);
changes.filesAsTree = preferences.filesAsTree;
}

Expand Down

0 comments on commit 96b163c

Please sign in to comment.