[UI] Remove unnecessary vertical space in empty labels list
- Don't show the labels-list element, if no labels are selected. - The labels-list was taking up vertical space, even if no labels were selected which caused an inconsistency in how the sidebar looked. - Adds integration test
This commit is contained in:
parent
6e83c39f13
commit
013b89eb13
2 changed files with 39 additions and 8 deletions
|
@ -1,11 +1,13 @@
|
|||
<div class="ui labels list">
|
||||
<span class="no-select item {{if .root.HasSelectedLabel}}tw-hidden{{end}}">{{ctx.Locale.Tr "repo.issues.new.no_label"}}</span>
|
||||
<span class="labels-list">
|
||||
{{range .root.Labels}}
|
||||
{{template "repo/issue/labels/label" dict "root" $.root "label" .}}
|
||||
{{end}}
|
||||
{{range .root.OrgLabels}}
|
||||
{{template "repo/issue/labels/label" dict "root" $.root "label" .}}
|
||||
{{end}}
|
||||
</span>
|
||||
{{if .root.HasSelectedLabel}}
|
||||
<span class="labels-list">
|
||||
{{range .root.Labels}}
|
||||
{{template "repo/issue/labels/label" dict "root" $.root "label" .}}
|
||||
{{end}}
|
||||
{{range .root.OrgLabels}}
|
||||
{{template "repo/issue/labels/label" dict "root" $.root "label" .}}
|
||||
{{end}}
|
||||
</span>
|
||||
{{end}}
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue