mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Better handling of overflow on long label names, hide Subscriptions if user does not have any
This commit is contained in:
parent
f3a5fbe457
commit
b0bfded57e
1 changed files with 16 additions and 1 deletions
|
|
@ -155,6 +155,10 @@ function Subscriptions(props: LibraryFilterMenuProps): JSX.Element {
|
|||
[subscriptions]
|
||||
)
|
||||
|
||||
if (subscriptions.length < 1) {
|
||||
return <></>
|
||||
}
|
||||
|
||||
return (
|
||||
<MenuPanel
|
||||
title="Subscriptions"
|
||||
|
|
@ -374,6 +378,8 @@ function LabelButton(props: LabelButtonProps): JSX.Element {
|
|||
color: '$thTextSubtle',
|
||||
verticalAlign: 'middle',
|
||||
borderRadius: '3px',
|
||||
cursor: 'pointer',
|
||||
|
||||
m: '0px',
|
||||
'&:hover': {
|
||||
backgroundColor: '$thBackground4',
|
||||
|
|
@ -382,7 +388,16 @@ function LabelButton(props: LabelButtonProps): JSX.Element {
|
|||
alignment="center"
|
||||
distribution="start"
|
||||
>
|
||||
<label htmlFor={labelId} style={{ width: '100%' }}>
|
||||
<label
|
||||
htmlFor={labelId}
|
||||
style={{
|
||||
width: '100%',
|
||||
maxWidth: '170px',
|
||||
overflow: 'hidden',
|
||||
textOverflow: 'ellipsis',
|
||||
whiteSpace: 'nowrap',
|
||||
}}
|
||||
>
|
||||
<Circle size={9} color={props.label.color} weight="fill" />
|
||||
<SpanBox css={{ pl: '10px' }}>{props.label.name}</SpanBox>
|
||||
</label>
|
||||
|
|
|
|||
Loading…
Reference in a new issue