Skip to content

Commit 48b0a0f

Browse files
committed
Fixed an styling issue in the artists list view which caused an overflow
1 parent dc1eabd commit 48b0a0f

File tree

3 files changed

+27
-23
lines changed

3 files changed

+27
-23
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
2323
- Another state-related bug around Searching for Candidates [#225](https://github.com/pSpitzner/beets-flask/issues/225). We now no longer require a certaint type of state before allowing to add candidates.
2424
- Asis candidates have been restyled to be more consistent with other candidate types. They now also include a cover art preview if available.
2525
- Fixed a typo in our opiniated beets config [#235](https://github.com/pSpitzner/beets-flask/issues/235)
26+
- Fixed an styling issue in the artists list view which caused an overflow
2627

2728
### Added
2829

frontend/src/components/common/browser/artists.tsx

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,15 @@ export function ArtistListRow({
4343
},
4444
})}
4545
>
46-
<Typography variant="body1">
46+
<Typography
47+
variant="body1"
48+
sx={{
49+
whiteSpace: 'nowrap',
50+
overflow: 'hidden',
51+
textOverflow: 'ellipsis',
52+
flex: 1,
53+
}}
54+
>
4755
{artist.artist || 'Unknown Artist'}
4856
</Typography>
4957
<ArtistIcon

frontend/src/routes/library/browse/artists.index.tsx

Lines changed: 17 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -104,33 +104,28 @@ function ArtistsListWrapper({
104104
return (
105105
<Box {...props}>
106106
<Box
107-
sx={{
107+
sx={(theme) => ({
108+
display: 'flex',
109+
gap: 4,
108110
width: '100%',
109-
marginBottom: -1,
110111
padding: 2,
111-
height: 'min-content',
112-
overflow: 'hidden',
113-
}}
112+
[theme.breakpoints.down(500)]: {
113+
flexDirection: 'column',
114+
alignItems: 'flex-start',
115+
gap: 2,
116+
},
117+
})}
114118
>
115-
<Box
119+
<Search
120+
value={filter}
121+
setValue={setFilter}
122+
size="small"
116123
sx={{
117-
display: 'flex',
118-
gap: 2,
119-
alignItems: 'center',
120-
justifyContent: 'space-between',
121-
flexWrap: 'wrap',
124+
flex: '1 1 auto',
125+
maxWidth: 300,
126+
flexGrow: 1,
122127
}}
123-
>
124-
<Search
125-
value={filter}
126-
setValue={setFilter}
127-
size="small"
128-
sx={{
129-
flex: '1 1 auto',
130-
maxWidth: 300,
131-
}}
132-
/>
133-
</Box>
128+
/>
134129
<Typography
135130
variant="caption"
136131
color="text.secondary"

0 commit comments

Comments
 (0)