[ui] Makes service tags wrap and look like tag items (#14834)

* Makes service tags wrap and look like tag items

* Add a little vertical spacing and changelog

* Put client before tags

* Force tags list to new line
This commit is contained in:
Phil Renaud 2022-10-07 09:23:52 -04:00 committed by GitHub
parent 91d4ccd905
commit e771b94164
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 21 additions and 10 deletions

3
.changelog/14832.txt Normal file
View File

@ -0,0 +1,3 @@
```release-note:bug
ui: Fixes an issue where service tags would bleed past the edge of the screen
```

View File

@ -65,14 +65,6 @@
{{this.address}}
</a>
</span>
{{#if @service.tags.length}}
<span class="pair">
<span class="term">
Tags
</span>
{{join ", " @service.tags}}
</span>
{{/if}}
<span class="pair">
<span class="term">
Client
@ -85,9 +77,17 @@
{{@allocation.node.shortId}}
</LinkTo>
</Tooltip>
</span>
{{#if @service.tags.length}}
<span class="pair is-wrappable">
<span class="term">
Tags
</span>
{{#each @service.tags as |tag|}}
<span class="tag">{{tag}}</span>
{{/each}}
</span>
{{/if}}
</div>
</div>
</div>

View File

@ -17,6 +17,14 @@
margin-right: 2em;
white-space: nowrap;
&.is-wrappable {
white-space: normal;
display: block;
.tag {
vertical-align: middle;
}
}
.term {
font-weight: $weight-semibold;
margin-right: 0.5em;