Skip to content

Commit

Permalink
Albums view: Fix some tracks reserving too little space for "Details"…
Browse files Browse the repository at this point in the history
… button

In case the track had so long name it got truncated, and the the track had
somewhat wide number (e.g. 2-23 on a multi-disk album), there was too little
space left for the "Details" button and it was difficult to click. Now the
truncation logic takes the number width into account and this work better.
The same problem and fix applies also on the Podcasts view.

Note that in the "single column" mode used on narrow displays, we have opted
to keep everything as it was. There, we allow the track name to wrap over to
multiple lines. Some overly long names are still handled there quite badly
and the "Details" button may be difficult or impossible to click. However, it
was found to be extremely difficult to fix this without creating new
problems.
  • Loading branch information
paulijar committed Jun 16, 2024
1 parent 48213ab commit c40cb8a
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 13 deletions.
6 changes: 0 additions & 6 deletions css/app/music-albums.css
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,3 @@
/* in the compact mode, specifying width using a percent wouldn't work because the position is not absolute */
max-width: calc(100vw - 60px);
}

.view-container.single-col .album-area .track-list li > div > span {
white-space: normal;
vertical-align: top;
max-width: unset;
}
24 changes: 17 additions & 7 deletions css/app/music-tracklist.css
Original file line number Diff line number Diff line change
Expand Up @@ -66,24 +66,34 @@
padding-left: 2px;
padding-top: 6px;
padding-bottom: 5px;
text-overflow: ellipsis;
overflow: hidden;
white-space: nowrap;
}

.album-area .track-list li > div > span {
max-width: 200px;
.album-area .track-list .item-info {
max-width: 240px;
text-overflow: ellipsis;
overflow: hidden;
display: inline-block;
}

.album-area .track-list .item-info > span {
vertical-align: bottom;
}

.view-container.single-col .album-area .track-list .item-info {
max-width: unset;
overflow: initial;
}

.view-container.single-col .album-area .track-list .item-info > span {
display: inline-block;
white-space: normal;
vertical-align: top;
}

#albums.compact .album-area .track-list {
margin-left: 30px;
}

#albums.compact:not(.single-col) .album-area .track-list li > div > span {
max-width: 272px;
#albums.compact:not(.single-col) .album-area .track-list .item-info {
max-width: 305px;
}

0 comments on commit c40cb8a

Please sign in to comment.