Skip to content

Commit dd8e6ae

Browse files
authored
Improve "Reference in new issue" modal (#30547)
Fixes: #29994 Also some misc enhancements done to the form in the modal. <img width="840" alt="Screenshot 2024-04-17 at 23 02 55" src="https://github.com/go-gitea/gitea/assets/115237/e71fba55-55cd-4e48-a497-6b1025c36a43">
1 parent 3547054 commit dd8e6ae

File tree

2 files changed

+23
-18
lines changed

2 files changed

+23
-18
lines changed

templates/repo/issue/view_content/reference_issue_dialog.tmpl

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -5,26 +5,24 @@
55
<div class="content tw-text-left">
66
<form class="ui form form-fetch-action" action="{{printf "%s/issues/new" .Repository.Link}}" method="post">
77
{{.CsrfTokenHtml}}
8-
<div class="ui segment content">
9-
<div class="field">
10-
<span class="text"><strong>{{ctx.Locale.Tr "repository"}}</strong></span>
11-
<div class="ui search normal selection dropdown issue_reference_repository_search">
12-
<div class="default text">{{.Repository.FullName}}</div>
13-
<div class="menu"></div>
14-
</div>
15-
</div>
16-
<div class="field">
17-
<span class="text"><strong>{{ctx.Locale.Tr "repo.milestones.title"}}</strong></span>
18-
<input name="title" value="" autofocus required maxlength="255" autocomplete="off">
19-
</div>
20-
<div class="field">
21-
<span class="text"><strong>{{ctx.Locale.Tr "repo.issues.reference_issue.body"}}</strong></span>
22-
<textarea name="content" class="form-control"></textarea>
23-
</div>
24-
<div class="text right">
25-
<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.create"}}</button>
8+
<div class="field">
9+
<label><strong>{{ctx.Locale.Tr "repository"}}</strong></label>
10+
<div class="ui search selection dropdown issue_reference_repository_search">
11+
<div class="default text">{{.Repository.FullName}}</div>
12+
<div class="menu"></div>
2613
</div>
2714
</div>
15+
<div class="field">
16+
<label><strong>{{ctx.Locale.Tr "repo.milestones.title"}}</strong></label>
17+
<input name="title" value="" autofocus required maxlength="255" autocomplete="off">
18+
</div>
19+
<div class="field">
20+
<label><strong>{{ctx.Locale.Tr "repo.issues.reference_issue.body"}}</strong></label>
21+
<textarea name="content" class="form-control"></textarea>
22+
</div>
23+
<div class="text right">
24+
<button class="ui primary button">{{ctx.Locale.Tr "repo.issues.create"}}</button>
25+
</div>
2826
</form>
2927
</div>
3028
</div>

web_src/css/base.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,7 @@ a.label,
374374

375375
.ui.selection.dropdown .menu > .item {
376376
border-color: var(--color-secondary);
377+
white-space: nowrap;
377378
}
378379

379380
.ui.selection.visible.dropdown > .text:not(.default) {
@@ -390,6 +391,12 @@ a.label,
390391
color: var(--color-text-light-2);
391392
}
392393

394+
.ui.dropdown > .text {
395+
white-space: nowrap;
396+
overflow: hidden;
397+
text-overflow: ellipsis;
398+
}
399+
393400
/* extend fomantic style '.ui.dropdown > .text > img' to include svg.img */
394401
.ui.dropdown > .text > .img {
395402
margin-left: 0;

0 commit comments

Comments
 (0)