diff --git a/src/webviews/apps/plus/home/components/active-work.ts b/src/webviews/apps/plus/home/components/active-work.ts index d39eb24154250..a810091e6891e 100644 --- a/src/webviews/apps/plus/home/components/active-work.ts +++ b/src/webviews/apps/plus/home/components/active-work.ts @@ -90,7 +90,6 @@ export class GlActiveWork extends SignalWatcher(LitElement) { gl-breadcrumbs { --gl-tooltip-text-transform: none; } - .heading-branch-breadcrumb { text-transform: none; } @@ -104,9 +103,6 @@ export class GlActiveWork extends SignalWatcher(LitElement) { @consume({ context: activeOverviewStateContext }) private _activeOverviewState!: ActiveOverviewState; - @state() - private repoCollapsed = true; - get isPro() { return isSubscriptionTrialOrPaidFromState(this._homeState.subscription.state); } @@ -160,13 +156,13 @@ export class GlActiveWork extends SignalWatcher(LitElement) { return html` - Switch to Another Repository... diff --git a/src/webviews/apps/shared/components/breadcrumbs.ts b/src/webviews/apps/shared/components/breadcrumbs.ts index 83abd6cbf197c..688d72829ea26 100644 --- a/src/webviews/apps/shared/components/breadcrumbs.ts +++ b/src/webviews/apps/shared/components/breadcrumbs.ts @@ -143,6 +143,8 @@ export class GlBreadcrumbItem extends LitElement { transition: max-width 0.3s cubic-bezier(0.25, 1, 0.5, 1); } + :host([collapsed]) .breadcrumb-item:not(:hover).ignore-focus-within .breadcrumb-label, + :host([collapsed]) .breadcrumb-item:not(:hover).ignore-focus-within slot[name='children'], :host([collapsed]) .breadcrumb-item:not(:hover):not(:focus-within) .breadcrumb-label, :host([collapsed]) .breadcrumb-item:not(:hover):not(:focus-within) slot[name='children'] { max-width: 0; @@ -170,6 +172,9 @@ export class GlBreadcrumbItem extends LitElement { @property() icon?: string; + @property() + ignoreFocusWithin?: boolean; + @property() iconTooltip?: string; @@ -186,9 +191,15 @@ export class GlBreadcrumbItem extends LitElement { } override render() { - const { collapsed, collapsible } = this; - - return html`
+ const { collapsed, collapsible, ignoreFocusWithin } = this; + + return html`
${this.renderIcon(collapsible, collapsed)} diff --git a/src/webviews/apps/shared/components/repo-button-group.ts b/src/webviews/apps/shared/components/repo-button-group.ts index 25510aa295439..30d11d528d3eb 100644 --- a/src/webviews/apps/shared/components/repo-button-group.ts +++ b/src/webviews/apps/shared/components/repo-button-group.ts @@ -38,32 +38,19 @@ export class GlRepoButtonGroup extends GlElement { refButtonBaseStyles, truncatedButtonStyles, css` - :host([icons='1']:not([expandable])) { + :host([icons='1']) { min-width: 7rem; } - :host([icons='2']:not([expandable])) { + :host([icons='2']) { min-width: 9.4rem; } - :host([icons='2'][expandable]) { - min-width: 5.6rem; - } - .indicator-dot { --gl-indicator-color: green; --gl-indicator-size: 0.4rem; margin-left: -0.2rem; } - - /* :host([expandable]) .truncated-button { - transition: max-width 0.3s cubic-bezier(0.25, 1, 0.5, 1); - } */ - - :host([expandable]:not(:hover, :focus-within)) .truncated-button { - min-width: 0; - max-width: 0; - } `, pickerIconStyles, ]; @@ -86,9 +73,6 @@ export class GlRepoButtonGroup extends GlElement { @property({ type: Object }) source?: Source; - @property({ type: Boolean, reflect: true }) - expandable = false; - @property({ type: Number, reflect: true }) get icons() { if (this.repository?.provider === undefined) return undefined; @@ -154,7 +138,7 @@ export class GlRepoButtonGroup extends GlElement { const { provider } = repo; const connectedIntegration = provider.integration?.connected; - return html` + return html`