Don't wrap sidebar titles

This commit is contained in:
Chen-I Lim 2020-11-16 10:28:21 -08:00
parent 0c2409cadb
commit a335ad18ff
2 changed files with 7 additions and 12 deletions

View file

@ -112,6 +112,9 @@
.octo-sidebar-title { .octo-sidebar-title {
cursor: pointer; cursor: pointer;
flex-grow: 1; flex-grow: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
} }
.OptionsIcon, .SubmenuTriangleIcon, .DotIcon { .OptionsIcon, .SubmenuTriangleIcon, .DotIcon {

View file

@ -89,12 +89,7 @@ class Sidebar extends React.Component<Props, State> {
</div> </div>
{ {
boards.map((board) => { boards.map((board) => {
const displayTitle = board.title || ( const displayTitle: string = board.title || intl.formatMessage({id: 'Sidebar.untitled-board', defaultMessage: '(Untitled Board)'})
<FormattedMessage
id='Sidebar.untitled-board'
defaultMessage='(Untitled Board)'
/>
)
const boardViews = views.filter((view) => view.parentId === board.id) const boardViews = views.filter((view) => view.parentId === board.id)
return ( return (
<div key={board.id}> <div key={board.id}>
@ -112,6 +107,7 @@ class Sidebar extends React.Component<Props, State> {
onClick={() => { onClick={() => {
this.boardClicked(board) this.boardClicked(board)
}} }}
title={displayTitle}
> >
{board.icon ? `${board.icon} ${displayTitle}` : displayTitle} {board.icon ? `${board.icon} ${displayTitle}` : displayTitle}
</div> </div>
@ -175,13 +171,9 @@ class Sidebar extends React.Component<Props, State> {
onClick={() => { onClick={() => {
this.viewClicked(board, view) this.viewClicked(board, view)
}} }}
title={view.title || intl.formatMessage({id: 'Sidebar.untitled-view', defaultMessage: '(Untitled View)'})}
> >
{view.title || ( {view.title || intl.formatMessage({id: 'Sidebar.untitled-view', defaultMessage: '(Untitled View)'})}
<FormattedMessage
id='Sidebar.untitled-view'
defaultMessage='(Untitled View)'
/>
)}
</div> </div>
</div> </div>
))} ))}