fix(playlist): column picker no longer clipped on short lists (#853)

* fix(playlist): columns dropdown no longer clipped on short lists (#839)

The column picker rendered inside `.tracklist` (overflow-x: auto, which
makes overflow-y compute to auto). On a 1-song playlist the downward popover
overflowed the short box → clipped behind suggestions, an extra scrollbar,
and the row vanishing when scrolling that inner bar (the virtualizer tracks
the main viewport, not the tracklist). Move the picker outside `.tracklist`
by reusing the shared TracklistColumnPicker (parametrized with allColumns);
fixes the same latent bug in the favorites tracklist and dedupes three
inline copies into one.

* docs(changelog): playlist/favorites column picker fix (#853)
This commit is contained in:
Frank Stellmacher
2026-05-22 19:20:34 +02:00
committed by GitHub
parent e8e41752a7
commit cc8e6cc811
5 changed files with 41 additions and 70 deletions
@@ -1,9 +1,11 @@
import React from 'react';
import { Check, ChevronDown, RotateCcw } from 'lucide-react';
import type { TFunction } from 'i18next';
import { COLUMNS } from '../../utils/componentHelpers/albumTrackListHelpers';
import type { ColDef } from '../../utils/useTracklistColumns';
interface Props {
/** Every column (required ones are filtered out of the menu). */
allColumns: readonly ColDef[];
pickerRef: React.RefObject<HTMLDivElement | null>;
pickerOpen: boolean;
setPickerOpen: (updater: (v: boolean) => boolean) => void;
@@ -20,6 +22,7 @@ interface Props {
* button.
*/
export function TracklistColumnPicker({
allColumns,
pickerRef,
pickerOpen,
setPickerOpen,
@@ -41,7 +44,7 @@ export function TracklistColumnPicker({
{pickerOpen && (
<div className="tracklist-col-picker-menu">
<div className="tracklist-col-picker-label">{t('albumDetail.columns')}</div>
{COLUMNS.filter(c => !c.required).map(c => {
{allColumns.filter(c => !c.required).map(c => {
const label = c.i18nKey ? t(`albumDetail.${c.i18nKey as string}`) : c.key;
const isOn = colVisible.has(c.key);
return (