Skip to content

Commit

Permalink
Allow drag and dropping tracks into chat (#3573)
Browse files Browse the repository at this point in the history
  • Loading branch information
piazzatron authored Jun 12, 2023
1 parent f7489e0 commit 8c90ff6
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import DynamicImage from 'components/dynamic-image/DynamicImage'
import { useTrackCoverArt } from 'hooks/useTrackCoverArt'
import { NO_VISUALIZER_ROUTES } from 'pages/visualizer/Visualizer'
import { openVisualizer } from 'pages/visualizer/store/slice'
import { fullTrackPage } from 'utils/route'

import styles from './NowPlayingArtworkTile.module.css'

Expand Down Expand Up @@ -121,7 +122,7 @@ export const NowPlayingArtworkTile = () => {
kind='track'
id={trackId}
isOwner={isOwner}
link={permalink}
link={fullTrackPage(permalink)}
>
<FadeInUp style={{ boxShadow: coverArtColor }}>
<Link to={permalink} aria-label={messages.viewTrack}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ import {
selectDraggingId
} from 'store/dragndrop/slice'
import { useSelector } from 'utils/reducer'
import { BASE_URL } from 'utils/route'

import { LeftNavDroppable, LeftNavLink } from '../LeftNavLink'

Expand Down Expand Up @@ -173,7 +174,13 @@ export const CollectionNavItem = (props: CollectionNavItemProps) => {
onDrop={handleDrop}
disabled={isDisabled}
>
<Draggable id={id} text={name} link={url} kind='library-playlist'>
<Draggable
id={id}
text={name}
// Draggables require full URL
link={`${BASE_URL}${url}`}
kind='library-playlist'
>
<LeftNavLink
to={url}
onClick={onClick}
Expand Down

0 comments on commit 8c90ff6

Please sign in to comment.