0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-03-11 02:12:21 -05:00

Improved long label handling (#20029)

ref DES-205

- label name is now used as the title on label pills instead of static
text
- label names will now be truncated when it takes more than 2 lines
instead of 1
This commit is contained in:
Sodbileg Gansukh 2024-04-17 13:02:21 +08:00 committed by GitHub
parent 9213274a6b
commit 7d42d1473e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@
<div style="display: flex; width: 100%;">
<span
class="dropdown-label"
style="flex-grow: 1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;"
style="display: -webkit-box; flex-grow: 1; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2;"
title="{{label.name}}"
data-test-label-filter={{label.name}}>
{{label.name}}

View file

@ -6,5 +6,5 @@ import {attributeBindings, classNames} from '@ember-decorators/component';
@attributeBindings('title')
@classNames('label-token')
export default class LabelToken extends DraggableObject {
title = 'Label';
title = this.name ?? 'Label';
}