File tree Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Expand file tree Collapse file tree 2 files changed +25
-5
lines changed Original file line number Diff line number Diff line change @@ -90,6 +90,7 @@ export class GlActiveWork extends SignalWatcher(LitElement) {
9090 gl-breadcrumbs {
9191 --gl-tooltip-text-transform: none;
9292 }
93+
9394 .heading-branch-breadcrumb {
9495 text-transform: none;
9596 }
@@ -103,6 +104,9 @@ export class GlActiveWork extends SignalWatcher(LitElement) {
103104 @consume ( { context : activeOverviewStateContext } )
104105 private _activeOverviewState ! : ActiveOverviewState ;
105106
107+ @state ( )
108+ private repoCollapsed = true ;
109+
106110 get isPro ( ) {
107111 return isSubscriptionTrialOrPaidFromState ( this . _homeState . subscription . state ) ;
108112 }
@@ -156,13 +160,13 @@ export class GlActiveWork extends SignalWatcher(LitElement) {
156160 return html `
157161 < gl-section ?loading =${ isFetching } >
158162 < gl-breadcrumbs slot ="heading ">
159- < gl-breadcrumb-item collapsibleState ="collapsed " icon =" repo "
163+ < gl-breadcrumb-item collapsibleState ="none " class =" heading- repo-breadcrumb "
160164 > < gl-repo-button-group
161165 .repository =${ repo }
162- .icon =${ false }
163166 ?disabled =${ ! hasMultipleRepositories }
164167 ?hasMultipleRepositories=${ hasMultipleRepositories }
165168 .source=${ { source : 'graph' } as const }
169+ ?expandable=${ true }
166170 @gl-click=${ this . onRepositorySelectorClicked }
167171 > < span slot ="tooltip ">
168172 Switch to Another Repository...
Original file line number Diff line number Diff line change @@ -38,19 +38,32 @@ export class GlRepoButtonGroup extends GlElement {
3838 refButtonBaseStyles ,
3939 truncatedButtonStyles ,
4040 css `
41- :host([icons='1']) {
41+ :host([icons='1']:not([expandable]) ) {
4242 min-width: 7rem;
4343 }
4444
45- :host([icons='2']) {
45+ :host([icons='2']:not([expandable]) ) {
4646 min-width: 9.4rem;
4747 }
4848
49+ :host([icons='2'][expandable]) {
50+ min-width: 5.6rem;
51+ }
52+
4953 .indicator-dot {
5054 --gl-indicator-color: green;
5155 --gl-indicator-size: 0.4rem;
5256 margin-left: -0.2rem;
5357 }
58+
59+ /* :host([expandable]) .truncated-button {
60+ transition: max-width 0.3s cubic-bezier(0.25, 1, 0.5, 1);
61+ } */
62+
63+ :host([expandable]:not(:hover, :focus-within)) .truncated-button {
64+ min-width: 0;
65+ max-width: 0;
66+ }
5467 ` ,
5568 pickerIconStyles ,
5669 ] ;
@@ -73,6 +86,9 @@ export class GlRepoButtonGroup extends GlElement {
7386 @property ( { type : Object } )
7487 source ?: Source ;
7588
89+ @property ( { type : Boolean , reflect : true } )
90+ expandable = false ;
91+
7692 @property ( { type : Number , reflect : true } )
7793 get icons ( ) {
7894 if ( this . repository ?. provider === undefined ) return undefined ;
@@ -138,7 +154,7 @@ export class GlRepoButtonGroup extends GlElement {
138154 const { provider } = repo ;
139155 const connectedIntegration = provider . integration ?. connected ;
140156
141- return html `< gl-popover placement ="bottom ">
157+ return html `< gl-popover placement ="bottom " trigger =" hover click focus " >
142158 < gl-button
143159 slot ="anchor "
144160 part ="provider-icon "
You can’t perform that action at this time.
0 commit comments