Skip to content

Commit 01d1fa6

Browse files
committed
Merge remote-tracking branch 'origin/main' into fix-18997-dont-report-ctx-closed-errors
2 parents ed563a8 + 3e28fa7 commit 01d1fa6

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

templates/admin/dashboard.tmpl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
{{template "base/alert" .}}
66
{{if .NeedUpdate}}
77
<div class="ui negative message flash-error">
8-
<p>{{.i18n.Tr "admin.dashboard.new_version_hint" (.RemoteVersion | Str2html) (AppVer | Str2html)}}</p>
8+
<p>{{(.i18n.Tr "admin.dashboard.new_version_hint" .RemoteVersion AppVer) | Str2html}}</p>
99
</div>
1010
{{end}}
1111
<h4 class="ui top attached header">

web_src/js/features/comp/EasyMDE.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,10 @@ export async function createCommentEasyMDE(textarea, easyMDEOptions = {}) {
7474
const inputField = easyMDE.codemirror.getInputField();
7575
inputField.classList.add('js-quick-submit');
7676
easyMDE.codemirror.setOption('extraKeys', {
77-
Enter: () => {
77+
Enter: (cm) => {
7878
const tributeContainer = document.querySelector('.tribute-container');
7979
if (!tributeContainer || tributeContainer.style.display === 'none') {
80-
return window.CodeMirror.Pass;
80+
cm.execCommand('newlineAndIndent');
8181
}
8282
},
8383
Backspace: (cm) => {

web_src/js/features/repo-issue.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,8 @@ export function initRepoPullRequestReview() {
462462
(async () => {
463463
// the editor's height is too large in some cases, and the panel cannot be scrolled with page now because there is `.repository .diff-detail-box.sticky { position: sticky; }`
464464
// the temporary solution is to make the editor's height smaller (about 4 lines). GitHub also only show 4 lines for default. We can improve the UI (including Dropzone area) in future
465-
await createCommentEasyMDE($reviewBox.find('textarea'), {minHeight: '80px', maxHeight: 'calc(100vh - 360px)'});
465+
// EasyMDE's options can not handle minHeight & maxHeight together correctly, we have to set max-height for .CodeMirror-scroll in CSS.
466+
await createCommentEasyMDE($reviewBox.find('textarea'), {minHeight: '80px'});
466467
initCompImagePaste($reviewBox);
467468
})();
468469
}

web_src/less/_review.less

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,13 @@ a.blob-excerpt:hover {
197197
color: #fff;
198198
}
199199

200+
// See the comment of createCommentEasyMDE() for the review editor
201+
// EasyMDE's options can not handle minHeight & maxHeight together correctly, we have to set minHeight in JS code
202+
#review-box .CodeMirror-scroll {
203+
min-height: 80px;
204+
max-height: calc(100vh - 360px);
205+
}
206+
200207
@media @mediaSm {
201208
#review-box > .menu {
202209
> .ui.segment {

0 commit comments

Comments
 (0)