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

feat: Full screen music UI, playback and home header improvements #520

Merged
merged 19 commits into from
Jan 14, 2021

Conversation

ferferga
Copy link
Member

@ferferga ferferga commented Jan 8, 2021

Changes

  • Volume slider now applies the changes immediately (before, it only was applied when the slider was released).
  • Volume slider icon changes depending on the selected volume.
  • Playlists work now.
  • Add shuffle and repeat functionality
  • Refactor image handling for further modularity and moved all the checks from BlurhashImage to imageHelper.
  • First draft of a full screen music player (with smooth transitions everywhere):
2021-01-08.13-52-45.mp4
2021-01-08.13-56-48.mp4
  • Move progress slider to its own component.
  • Refactor backdrop store. Backdrop is now fully reactive and it's opacity is fully configurable.
  • Add blurhash of the current displayed item in home header to the home page:
2021-01-08.13-46-09.1.mp4

To do

  • Improvements to responsive design (for another PR).

Updates

Changed the miniplayer design between commits:

image

Full screen controls:

image

Active controls (with elevation):

image

Reduced window:

image

@ferferga ferferga force-pushed the full-screen-music branch 3 times, most recently from 3dc6ddc to 039a643 Compare January 8, 2021 13:39
@codecov-io
Copy link

codecov-io commented Jan 8, 2021

Codecov Report

Merging #520 (be092ff) into master (9077992) will decrease coverage by 0.03%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #520      +/-   ##
=========================================
- Coverage    0.59%   0.56%   -0.04%     
=========================================
  Files          88      89       +1     
  Lines        2344    2492     +148     
  Branches      355     372      +17     
=========================================
  Hits           14      14              
- Misses       2329    2477     +148     
  Partials        1       1              
Impacted Files Coverage Δ
components/Item/ItemMenu.vue 0.00% <ø> (ø)
components/Item/Metadata/ImageEditor.vue 0.00% <0.00%> (ø)
components/Item/PersonList.vue 0.00% <0.00%> (ø)
components/Item/RelatedItems.vue 0.00% <0.00%> (ø)
components/Layout/AudioControls.vue 0.00% <0.00%> (ø)
components/Layout/Backdrop.vue 0.00% <0.00%> (ø)
components/Layout/HomeHeader/HomeHeader.vue 0.00% <ø> (ø)
components/Layout/HomeHeader/HomeHeaderItems.vue 0.00% <0.00%> (ø)
components/Layout/HomeHeader/HomeHeaderWelcome.vue 0.00% <ø> (ø)
components/Layout/Images/BlurhashCanvas.vue 70.00% <0.00%> (-3.69%) ⬇️
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9077992...be092ff. Read the comment docs.

@ferferga ferferga force-pushed the full-screen-music branch 2 times, most recently from fe15bb6 to f9600d7 Compare January 8, 2021 13:45
Copy link
Contributor

@camc314 camc314 left a comment

Choose a reason for hiding this comment

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

image

this album is not centred

IMHO the album art is too big, How about having the are on the LHS, and putting the queue or the playing info on the RHS.

components/Item/TimeSlider.vue Outdated Show resolved Hide resolved
components/Item/Metadata/ImageEditor.vue Outdated Show resolved Hide resolved
components/Layout/AudioControls.vue Show resolved Hide resolved
components/Layout/AudioControls.vue Show resolved Hide resolved
components/Layout/AudioControls.vue Outdated Show resolved Hide resolved
components/Layout/AudioControls.vue Show resolved Hide resolved
components/Layout/AudioControls.vue Outdated Show resolved Hide resolved
components/Layout/AudioControls.vue Outdated Show resolved Hide resolved
@@ -2,6 +2,7 @@
<v-app ref="app">
<backdrop />
<v-navigation-drawer
v-if="$store.state.page.showNavDrawer"
Copy link
Contributor

Choose a reason for hiding this comment

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

Why hide the nav drawer?

Copy link
Member Author

Choose a reason for hiding this comment

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

@camc314 it's a full screen player.

Copy link
Member

@ThibaultNocchi ThibaultNocchi Jan 13, 2021

Choose a reason for hiding this comment

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

@ferferga Could it maybe be tied to fullscreen-ness of the player? Also the drawer already has a drawer model and it could be seen as redundant?

Maybe even have an event being emitted from the audio controls to play with the drawer model directly?

Copy link
Contributor

Choose a reason for hiding this comment

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

I agree with Thibault, v-model already does this and it's be better to use that instead

Copy link
Member Author

Choose a reason for hiding this comment

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

For future reference, and as it was discussed in Matrix, we're going to leave this as an v-if so toggling the nav drawer doesn't mess with the user's behaviour. Going the v-model route would require to store another variable that contains whether the user has the navdrawer hidden or not before toggling ot, so we can act accordingly after unhiding it.

If we want to switch everything to v-model at some point, we need to take care of that.

components/Layout/AudioControls.vue Outdated Show resolved Hide resolved
Comment on lines +98 to +156
<transition name="fade-fast" mode="in-out">
<v-tooltip v-if="!isFullScreenPlayer" top>
<template #activator="{ on, attrs }">
<nuxt-link tag="span" :to="'/playback'">
<v-btn icon class="ml-2" v-bind="attrs" v-on="on">
<v-icon>mdi-fullscreen</v-icon>
</v-btn>
</nuxt-link>
</template>
<span>{{ $t('fullScreen') }}</span>
</v-tooltip>
</transition>
Copy link
Contributor

Choose a reason for hiding this comment

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

What is wrong with expanding the modal to full screen?

Copy link
Member Author

Choose a reason for hiding this comment

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

@camc314 Swiper's weirdness, DOM performance (slides are expensive, and with items in the background, much worse) and a bug in Vuetify where the scrollbar doesn't disappear and allowed you to scroll the things that were below the v-dialog.

components/Layout/AudioControls.vue Outdated Show resolved Hide resolved
components/Layout/AudioControls.vue Outdated Show resolved Hide resolved
components/Layout/AudioControls.vue Outdated Show resolved Hide resolved
components/Layout/AudioControls.vue Show resolved Hide resolved
Comment on lines 189 to 197
isFullScreenPlayer(): boolean {
return this.$route.name === 'playback';
},
Copy link
Contributor

Choose a reason for hiding this comment

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

Why not use isMinimized?

Copy link
Member Author

@ferferga ferferga Jan 8, 2021

Choose a reason for hiding this comment

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

@camc314 If going from /playback to / directly in the address bar, the store doesn't get the mutation, so the fullscreen UI is still there.

I also reproduced this when switching between users/servers. We should maybe make an store call on page reload so everything gets cleared (but login info and DisplayPreferences), but that's for another PR.

components/Layout/AudioControls.vue Outdated Show resolved Hide resolved
@heyhippari
Copy link
Contributor

IMHO the album art is too big, How about having the are on the LHS, and putting the queue or the playing info on the RHS.

This is meant to be a full screen, kiosk-like experience :p There's a separate queue screen planned with a different view. Main goal here is to just show the album art and give basic info and controls, to show on like a TV screen or a wall tablet or something.

@ferferga
Copy link
Member Author

ferferga commented Jan 8, 2021

@camc314 Are you able to reproduce the off-center issue with the latest force-pushed changes?

Original commits already had the hack enabled, but not on mount. Check nolimits4web/swiper#886

@camc314
Copy link
Contributor

camc314 commented Jan 8, 2021

@camc314 Are you able to reproduce the off-center issue with the latest force-pushed changes?

Yes, no change

@camc314
Copy link
Contributor

camc314 commented Jan 8, 2021

This is meant to be a full screen, kiosk-like experience :p There's a separate queue screen planned with a different view. Main goal here is to just show the album art and give basic info and controls, to show on like a TV screen or a wall tablet or something.

Forgive me, I'm don't think I quite understand. Is this layout going to be used for TVs and full screen desktops then, and a different one used for mobile and non-full screen desktops?

@ferferga ferferga force-pushed the full-screen-music branch 2 times, most recently from 802445e to cd0fadb Compare January 8, 2021 15:07
@ferferga
Copy link
Member Author

ferferga commented Jan 8, 2021

@camc314 This is similar to what YouTube Music, Tidal and Spotify has. It's just a page where you can leave the player sitting there while relaxing :P

It's like opening VLC, it also displays the cover at full screen.

Some example photos from other services:

image
image
image

@ferferga ferferga mentioned this pull request Jan 8, 2021
@ferferga ferferga force-pushed the full-screen-music branch 2 times, most recently from b33c75d to 220f169 Compare January 9, 2021 13:20
@camc314
Copy link
Contributor

camc314 commented Jan 9, 2021

@camc314 This is similar to what YouTube Music, Tidal and Spotify has. It's just a page where you can leave the player sitting there while relaxing :P

Ok, that makes more sense

mixins/imageHelper.ts Outdated Show resolved Hide resolved
mixins/imageHelper.ts Outdated Show resolved Hide resolved
mixins/imageHelper.ts Outdated Show resolved Hide resolved
@ferferga ferferga requested a review from camc314 January 14, 2021 12:17
@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 13 Code Smells

No Coverage information No Coverage information
4.1% 4.1% Duplication

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants