feat(ui): add tooltips for long playlist and album names - 5068 (#5070)
* style(ui): add tooltips for long playlist and album names - 5068 Signed-off-by: Thiago Sfreddo <sfredo@gmail.com> * fix dnd and improve performance Signed-off-by: Thiago Sfreddo <sfredo@gmail.com> * lint fixes Signed-off-by: Thiago Sfreddo <sfredo@gmail.com> * fix(ui): update tooltip styles for improved visibility and consistency Signed-off-by: Deluan <deluan@navidrome.org> * fix(ui): add overflow tooltip to playlist name for better visibility Signed-off-by: Deluan <deluan@navidrome.org> * refactor(ui): simplify OverflowTooltip and improve render performance - Inline styles from useMenuTooltipStyles into OverflowTooltip (single consumer) - Use MUI named colors (grey[700]/grey[300] with alpha) instead of raw rgba - Stabilize ref callback with useCallback to avoid unnecessary ref churn - Memoize Tooltip classes and hoist TransitionProps to module level - Fix useLayoutEffect dependency: observe DOM size, not title string --------- Signed-off-by: Thiago Sfreddo <sfredo@gmail.com> Signed-off-by: Deluan <deluan@navidrome.org> Co-authored-by: Deluan Quintão <deluan@navidrome.org>
This commit is contained in:
@@ -19,6 +19,7 @@ import {
|
||||
DurationField,
|
||||
SizeField,
|
||||
isWritable,
|
||||
OverflowTooltip,
|
||||
} from '../common'
|
||||
import config from '../config'
|
||||
import subsonic from '../subsonic'
|
||||
@@ -274,12 +275,14 @@ const PlaylistDetails = (props) => {
|
||||
</div>
|
||||
<div className={classes.details}>
|
||||
<CardContent className={classes.content}>
|
||||
<Typography
|
||||
variant={isDesktop ? 'h5' : 'h6'}
|
||||
className={classes.title}
|
||||
>
|
||||
{record.name || translate('ra.page.loading')}
|
||||
</Typography>
|
||||
<OverflowTooltip title={record.name || ''}>
|
||||
<Typography
|
||||
variant={isDesktop ? 'h5' : 'h6'}
|
||||
className={classes.title}
|
||||
>
|
||||
{record.name || translate('ra.page.loading')}
|
||||
</Typography>
|
||||
</OverflowTooltip>
|
||||
<Typography component="p" className={classes.stats}>
|
||||
{record.songCount ? (
|
||||
<span>
|
||||
|
||||
Reference in New Issue
Block a user