fix mobile playerbar layout to prevent overflow

This commit is contained in:
jeffvli
2025-11-29 17:05:02 -08:00
parent b097d67d71
commit 7f95c520b2
2 changed files with 130 additions and 116 deletions
@@ -1,5 +1,6 @@
.container { .container {
display: flex; display: grid;
grid-template-columns: 1fr auto;
gap: var(--theme-spacing-sm); gap: var(--theme-spacing-sm);
align-items: center; align-items: center;
width: 100%; width: 100%;
@@ -8,6 +9,14 @@
overflow: hidden; overflow: hidden;
} }
.content-wrapper {
display: flex;
gap: var(--theme-spacing-sm);
align-items: center;
min-width: 0;
overflow: hidden;
}
.image-wrapper { .image-wrapper {
position: relative; position: relative;
display: flex; display: flex;
@@ -41,6 +50,7 @@
gap: 0; gap: 0;
justify-content: center; justify-content: center;
min-width: 0; min-width: 0;
max-width: 50%;
overflow: hidden; overflow: hidden;
} }
@@ -59,7 +69,6 @@
.controls-wrapper { .controls-wrapper {
display: flex; display: flex;
flex-shrink: 0;
gap: 0.5rem; gap: 0.5rem;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
@@ -65,6 +65,7 @@ export const MobilePlayerbar = () => {
return ( return (
<div className={clsx(styles.container, PlaybackSelectors.mediaPlayer)}> <div className={clsx(styles.container, PlaybackSelectors.mediaPlayer)}>
<div className={styles.contentWrapper}>
<LayoutGroup> <LayoutGroup>
<AnimatePresence initial={false} mode="popLayout"> <AnimatePresence initial={false} mode="popLayout">
{currentSong?.imageUrl && ( {currentSong?.imageUrl && (
@@ -151,9 +152,12 @@ export const MobilePlayerbar = () => {
size="xs" size="xs"
to={ to={
artist.id artist.id
? generatePath(AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL, { ? generatePath(
AppRoute.LIBRARY_ALBUM_ARTISTS_DETAIL,
{
albumArtistId: artist.id, albumArtistId: artist.id,
}) },
)
: undefined : undefined
} }
> >
@@ -190,6 +194,7 @@ export const MobilePlayerbar = () => {
</div> </div>
</motion.div> </motion.div>
</LayoutGroup> </LayoutGroup>
</div>
<div className={styles.controlsWrapper}> <div className={styles.controlsWrapper}>
<PlayerButton <PlayerButton
icon={<Icon fill="default" icon="mediaPrevious" size="md" />} icon={<Icon fill="default" icon="mediaPrevious" size="md" />}