Skip to content

Let mobile users scroll Jenkinsfile examples #1075

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion app/scripts/services/modals.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@ angular.module("openshiftConsole")
$uibModal.open({
animation: true,
templateUrl: 'views/modals/jenkinsfile-examples-modal.html',
controller: 'JenkinsfileExamplesModalController'
controller: 'JenkinsfileExamplesModalController',
size: 'lg'
});
},

Expand Down
12 changes: 12 additions & 0 deletions app/styles/_core.less
Original file line number Diff line number Diff line change
Expand Up @@ -1019,6 +1019,18 @@ a.disabled-link {
}
}

.jenkinsfile-examples-modal {
.jenkinsfile-examples p:last-child {
// Use `modal-body` bottom margin and padding.
margin-bottom: 0;
padding-bottom: 0;
}
.modal-footer {
margin-top: 0;
padding-top: 0;
}
}

.ace-inline {
height: 300px;
}
Expand Down
10 changes: 8 additions & 2 deletions app/styles/_forms.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,14 @@
border: 1px solid @color-pf-black-300;
}

.jenkinsfile-examples .copy-to-clipboard {
margin-top: 3px;
.jenkinsfile-examples {
p {
// Show scrollbars as needed on small screens.
overflow: auto;
}
.copy-to-clipboard {
margin-top: 3px;
}
}

.compute-resource {
Expand Down
2 changes: 1 addition & 1 deletion app/views/modals/jenkinsfile-examples-modal.html
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<div>
<div class="jenkinsfile-examples-modal">
<div class="modal-body">
<h2>Jenkinsfile Examples</h2>
<ng-include src="'views/edit/jenkinsfile-examples.html'"></ng-include>
Expand Down
3 changes: 2 additions & 1 deletion dist/scripts/scripts.js
Original file line number Diff line number Diff line change
Expand Up @@ -4117,7 +4117,8 @@ showJenkinsfileExamples:function() {
a.open({
animation:!0,
templateUrl:"views/modals/jenkinsfile-examples-modal.html",
controller:"JenkinsfileExamplesModalController"
controller:"JenkinsfileExamplesModalController",
size:"lg"
});
},
showComputeUnitsHelp:function() {
Expand Down
2 changes: 1 addition & 1 deletion dist/scripts/templates.js
Original file line number Diff line number Diff line change
Expand Up @@ -10076,7 +10076,7 @@ angular.module('openshiftConsoleTemplates', []).run(['$templateCache', function(


$templateCache.put('views/modals/jenkinsfile-examples-modal.html',
"<div>\n" +
"<div class=\"jenkinsfile-examples-modal\">\n" +
"<div class=\"modal-body\">\n" +
"<h2>Jenkinsfile Examples</h2>\n" +
"<ng-include src=\"'views/edit/jenkinsfile-examples.html'\"></ng-include>\n" +
Expand Down
3 changes: 3 additions & 0 deletions dist/styles/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -3585,6 +3585,7 @@ to{transform:rotate(359deg)}
.copy-to-clipboard-multiline pre{background-color:#fff;max-width:100%;overflow-x:auto}
.input-group-addon.wildcard-prefix{padding-left:10px}
.editor-examples{padding:19px;margin-bottom:20px;border:1px solid #d1d1d1}
.jenkinsfile-examples p{overflow:auto}
.jenkinsfile-examples .copy-to-clipboard{margin-top:3px}
.compute-resource{margin-bottom:5px}
@media (max-width:767px){.compute-resource .inline-select{margin-top:5px}
Expand Down Expand Up @@ -3974,6 +3975,8 @@ a.disabled-link:active,a.disabled-link:focus,a.disabled-link:hover{color:#bbb;te
.modal-debug-terminal .modal-body .empty-state-message{margin-top:60px}
.modal-debug-terminal .modal-body kubernetes-container-terminal{text-align:center;overflow:hidden}
.modal-debug-terminal .modal-footer{padding-top:0}
.jenkinsfile-examples-modal .jenkinsfile-examples p:last-child{margin-bottom:0;padding-bottom:0}
.jenkinsfile-examples-modal .modal-footer{margin-top:0;padding-top:0}
.ace-inline{height:300px}
.ace-inline-small{height:200px}
#from-file .editor{height:350px}
Expand Down