Skip to content

Commit d5e8bef

Browse files
committed
Fixes gate content & css issues
1 parent da4d414 commit d5e8bef

File tree

3 files changed

+32
-11
lines changed

3 files changed

+32
-11
lines changed

src/webviews/apps/plus/shared/components/feature-gate-plus-state.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,10 +37,9 @@ export class GlFeatureGatePlusState extends LitElement {
3737
css`
3838
:host {
3939
--gk-action-radius: 0.3rem;
40-
container-type: inline-size;
4140
}
4241
43-
:host([appearance='welcome']) gl-button {
42+
:host([appearance='welcome']) gl-button:only-child {
4443
width: 100%;
4544
max-width: 300px;
4645
}

src/webviews/apps/plus/timeline/timeline.css.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,10 @@ export const timelineStyles = css`
220220
margin-top: 0;
221221
}
222222
223+
:host-context(body[data-placement='view']) gl-feature-gate {
224+
background-color: var(--vscode-sideBar-background);
225+
}
226+
223227
gl-feature-gate gl-feature-badge {
224228
vertical-align: super;
225229
margin-left: 0.4rem;

src/webviews/apps/plus/timeline/timeline.ts

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -110,21 +110,40 @@ export class GlTimelineApp extends GlAppHost<State> {
110110
return this.state.access?.subscription?.current;
111111
}
112112

113-
override render(): unknown {
114-
return html`
115-
<gl-feature-gate
113+
private renderGate() {
114+
if (this.placement === 'editor') {
115+
return html`<gl-feature-gate
116116
?hidden=${this.allowed !== false}
117117
.source=${{ source: 'timeline' as const, detail: 'gate' }}
118118
.state=${this.subscription?.state}
119119
><p slot="feature">
120120
<a href="https://help.gitkraken.com/gitlens/gitlens-features/#visual-file-history-pro"
121-
>Visual File History</a
121+
>Visual History</a
122122
>
123123
<gl-feature-badge></gl-feature-badge>
124-
&mdash; visualize the evolution of a file and quickly identify when the most impactful changes were
125-
made and by whom.
124+
&mdash; visualize the evolution of a repository, branch, folder, or file and identify when the most
125+
impactful changes were made and by whom. Quickly see unmerged changes in files or folders, when
126+
slicing by branch.
126127
</p></gl-feature-gate
127-
>
128+
>`;
129+
}
130+
131+
return html`<gl-feature-gate
132+
?hidden=${this.allowed !== false}
133+
.source=${{ source: 'timeline' as const, detail: 'gate' }}
134+
.state=${this.subscription?.state}
135+
><p slot="feature">
136+
<a href="https://help.gitkraken.com/gitlens/gitlens-features/#visual-file-history-pro"
137+
>Visual File History</a
138+
>
139+
<gl-feature-badge></gl-feature-badge>
140+
&mdash; visualize the evolution of a file and quickly identify when the most impactful changes were made
141+
and by whom. Quickly see unmerged changes in files or folders, when slicing by branch.
142+
</p></gl-feature-gate
143+
>`;
144+
}
145+
override render(): unknown {
146+
return html`${this.renderGate()}
128147
<div class="container">
129148
<progress-indicator ?active=${this._loading}></progress-indicator>
130149
<header class="header" ?hidden=${!this.scope}>
@@ -152,8 +171,7 @@ export class GlTimelineApp extends GlAppHost<State> {
152171
</header>
153172
154173
<main class="timeline">${this.renderChart()}</main>
155-
</div>
156-
`;
174+
</div> `;
157175
}
158176

159177
private renderBreadcrumbs() {

0 commit comments

Comments
 (0)