Skip to content

Commit f259428

Browse files
committed
Fixes home integration banner
1 parent 8781f91 commit f259428

File tree

4 files changed

+17
-5
lines changed

4 files changed

+17
-5
lines changed

src/webviews/apps/home/components/integration-banner.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import { consume } from '@lit/context';
22
import { html, LitElement, nothing } from 'lit';
3-
import { customElement, state } from 'lit/decorators.js';
3+
import { customElement, query, state } from 'lit/decorators.js';
44
import type { State } from '../../../home/protocol';
55
import { CollapseSectionCommand } from '../../../home/protocol';
6+
import type { GlButton } from '../../shared/components/button';
67
import { ipcContext } from '../../shared/context';
78
import type { HostIpc } from '../../shared/ipc';
89
import { stateContext } from '../context';
@@ -28,10 +29,15 @@ export class GlIntegrationBanner extends LitElement {
2829
private _ipc!: HostIpc;
2930

3031
@state()
31-
closed = false;
32+
private closed = false;
33+
34+
@query('gl-button')
35+
private _button!: GlButton;
3236

3337
override render() {
34-
if (closed || this._state.hasAnyIntegrationConnected || this._state.integrationBannerCollapsed) return nothing;
38+
if (this.closed || this._state.hasAnyIntegrationConnected || this._state.integrationBannerCollapsed) {
39+
return nothing;
40+
}
3541

3642
return html`
3743
<gl-card>
@@ -63,6 +69,10 @@ export class GlIntegrationBanner extends LitElement {
6369
collapsed: true,
6470
});
6571
}
72+
73+
override focus() {
74+
this._button.focus();
75+
}
6676
}
6777

6878
declare global {

src/webviews/apps/home/home.scss

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@
55
.vscode-high-contrast,
66
.vscode-dark {
77
--popover-bg: var(--color-background--lighten-15);
8+
--gl-card-background: color-mix(in lab, var(--vscode-sideBar-background) 100%, #fff 6%);
89
}
910

1011
.vscode-high-contrast-light,
1112
.vscode-light {
1213
--popover-bg: var(--color-background--darken-15);
14+
--gl-card-background: color-mix(in lab, var(--vscode-sideBar-background) 100%, #000 4%);
1315
}
1416

1517
* {

src/webviews/apps/home/home.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ export class GlHomeApp extends GlApp<State> {
7373
<gl-repo-alerts class="home__header"></gl-repo-alerts>
7474
<main class="home__main scrollable" id="main">
7575
<gl-onboarding></gl-onboarding>
76-
<gl-integration-banner></gl-integration-banner>
7776
${when(
7877
this.state?.previewEnabled === true,
7978
() => html`
79+
<gl-integration-banner></gl-integration-banner>
8080
<gl-active-work></gl-active-work>
8181
<gl-launchpad></gl-launchpad>
8282
<gl-overview></gl-overview>

src/webviews/apps/shared/components/card/card.css.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const cardStyles = css`
88
padding: 0.8rem 1.2rem;
99
border-radius: 0.4rem;
1010
border-inline-start: 0.3rem solid transparent;
11-
background-color: var(--gl-card-background, color-mix(in lab, var(--vscode-sideBar-background) 100%, #fff 10%));
11+
background-color: var(--gl-card-background, color-mix(in lab, var(--vscode-sideBar-background) 100%, #fff 5%));
1212
margin-block-end: 0.6rem;
1313
position: relative;
1414
}

0 commit comments

Comments
 (0)