Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BrainzPlayer SPA with Listening Queues #2827

Open
wants to merge 32 commits into
base: master
Choose a base branch
from
Open

Conversation

anshg1214
Copy link
Member

@anshg1214 anshg1214 commented Apr 1, 2024

This PR enables BrainzPlayer for continuous playback despite navigation. It also adds Listening Queues and Ambient Queues to BrainzPlayer.

Tasks left :

Base automatically changed from spa-entity-pages to single-page-app April 12, 2024 16:03
@anshg1214 anshg1214 marked this pull request as ready for review April 19, 2024 05:30
@anshg1214 anshg1214 changed the title BrainzPlayer SPA BrainzPlayer SPA with Listening Queues Apr 19, 2024
@anshg1214 anshg1214 requested a review from MonkeyDo April 19, 2024 08:17
Copy link
Contributor

@MonkeyDo MonkeyDo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's working really well !

There are some possible issues with the repeat mode I think, and we are missing to convert a few components to allow for the ambient queue, but overall I would say we can aim to merge this now.

As I suggested below, maybe comment out the repeat mode button for now if you want to take some time to test it?

Comment on lines +791 to +794
// Stop the currently playing song
if (!playerPaused) {
await togglePlay();
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure I understand why the current song should be paused, it's unrelated to wanting to clear thed queue of whatever comes next.
It surprised me that the song was paused when I tried clearing the queue, I thought I broke something and BP crashed.

// If there is only one item in the queue, and invert is true, play it again
nextListenIndex = 0;
} else {
if (_isEqual(queueRepeatMode, QueueRepeatModes.one)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the repeat modes only work when pressing the next/previous buttons, but not following the end of the song.

In my opinion, this repeat modes feature is not the most the one I find most pressing, so if we have more work on it I would be happy to hide the repeat mode button and work on it in another PR.

I have been wondering if the repeat mode button would make sense inside the queue component instead of the BP bar, but I'm not sure of that. What do you think?

In particular I'm worried about all these buttons on mobile phones, we're going to have to change it because we already can't see the title or artist:
image

@@ -478,13 +478,13 @@ export default class RecommendationsPage extends React.Component<
<RecommendationPlaylistSettings playlist={selectedPlaylist} />
</section>
)}
<BrainzPlayer
{/* <BrainzPlayer
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In my opinion, for these few components that are still class components, it might be a good idea to use a wrapper as we do in other places just to be able to use useBrainzPlayerDispatch.
Considering the time it took me to rewrite the UserFeed component and accompanying tests, using a wrapper is our shortest path to deploying the new features (both SPA and the BP improvement here).
What do you think? I know you weren't convinced when we last talked on video.

Base automatically changed from single-page-app to master April 26, 2024 14:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants