File tree 2 files changed +19
-3
lines changed
2 files changed +19
-3
lines changed Original file line number Diff line number Diff line change @@ -267,10 +267,13 @@ export async function initRepository() {
267
267
268
268
// Commit statuses
269
269
$ ( '.commit-statuses-trigger' ) . each ( function ( ) {
270
+ const positionRight = $ ( '.repository.file.list' ) . length > 0 || $ ( '.repository.diff' ) . length > 0 ;
271
+ const popupPosition = positionRight ? 'right center' : 'left center' ;
270
272
$ ( this )
271
273
. popup ( {
272
274
on : 'click' ,
273
- position : ( $ ( '.repository.file.list' ) . length > 0 ? 'right center' : 'left center' ) ,
275
+ lastResort : popupPosition , // prevent error message "Popup does not fit within the boundaries of the viewport"
276
+ position : popupPosition ,
274
277
} ) ;
275
278
} ) ;
276
279
Original file line number Diff line number Diff line change 1
1
.repository {
2
- .commit-statuses .list > .item {
3
- line-height : 2 ;
2
+ .popup.commit-statuses {
3
+ // we had better limit the max size of the popup, and add scroll bars if the content size is too large.
4
+ // otherwise some part of the popup will be hidden by viewport boundary
5
+ max-height : 45vh ;
6
+ max-width : 60vw ;
7
+ overflow : auto ;
8
+ padding : 0 ;
9
+
10
+ .list {
11
+ padding : .8em ; // to make the scrollbar align to the border, we move the padding from outer `.popup` to this inside `.list`
12
+
13
+ > .item {
14
+ line-height : 2 ;
15
+ }
16
+ }
4
17
}
5
18
6
19
.repo-header {
You can’t perform that action at this time.
0 commit comments