diff --git a/cypress/integration/other-controls.spec.ts b/cypress/integration/other-controls.spec.ts index 73d1c1c8..e0ddb55a 100644 --- a/cypress/integration/other-controls.spec.ts +++ b/cypress/integration/other-controls.spec.ts @@ -13,11 +13,11 @@ context('Other Controls', () => { }) it('toggles the info panel', () => { - cy.findByTestId('extra-drawer').should('be.visible') - cy.findByTestId('toggle-extra-drawer-btn').as('btn').click() - cy.findByTestId('extra-drawer').should('not.be.visible') - cy.findByTestId('toggle-extra-drawer-btn').as('btn').click() - cy.findByTestId('extra-drawer').should('be.visible') + cy.findByTestId('side-sheet').should('be.visible') + cy.findByTestId('toggle-side-sheet-btn').as('btn').click() + cy.findByTestId('side-sheet').should('not.be.visible') + cy.findByTestId('toggle-side-sheet-btn').as('btn').click() + cy.findByTestId('side-sheet').should('be.visible') }) it('toggles the "sound bars" icon when a song is played/paused', () => { diff --git a/resources/assets/css/partials/vars.pcss b/resources/assets/css/partials/vars.pcss index e7884b95..e437fc48 100644 --- a/resources/assets/css/partials/vars.pcss +++ b/resources/assets/css/partials/vars.pcss @@ -21,7 +21,7 @@ --header-height: auto; --footer-height: 84px; - --extra-drawer-width: 25rem; + --side-sheet-width: 25rem; --sidebar-width: 20rem; --color-love: #bf2043; @@ -32,6 +32,6 @@ @media screen and (max-width: 768px) { --header-height: 56px; --footer-height: 96px; - --extra-drawer-width: 100%; + --side-sheet-width: 100%; } } diff --git a/resources/assets/js/components/layout/main-wrapper/index.vue b/resources/assets/js/components/layout/main-wrapper/index.vue index bc63b440..f6cc2adb 100644 --- a/resources/assets/js/components/layout/main-wrapper/index.vue +++ b/resources/assets/js/components/layout/main-wrapper/index.vue @@ -2,7 +2,7 @@
- +
@@ -10,9 +10,9 @@ diff --git a/resources/assets/js/components/layout/main-wrapper/extra-drawer/AboutKoelButton.spec.ts b/resources/assets/js/components/layout/main-wrapper/side-sheet/AboutKoelButton.spec.ts similarity index 100% rename from resources/assets/js/components/layout/main-wrapper/extra-drawer/AboutKoelButton.spec.ts rename to resources/assets/js/components/layout/main-wrapper/side-sheet/AboutKoelButton.spec.ts diff --git a/resources/assets/js/components/layout/main-wrapper/extra-drawer/AboutKoelButton.vue b/resources/assets/js/components/layout/main-wrapper/side-sheet/AboutKoelButton.vue similarity index 83% rename from resources/assets/js/components/layout/main-wrapper/extra-drawer/AboutKoelButton.vue rename to resources/assets/js/components/layout/main-wrapper/side-sheet/AboutKoelButton.vue index eff487a1..82167d65 100644 --- a/resources/assets/js/components/layout/main-wrapper/extra-drawer/AboutKoelButton.vue +++ b/resources/assets/js/components/layout/main-wrapper/side-sheet/AboutKoelButton.vue @@ -1,5 +1,5 @@ diff --git a/resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawer.spec.ts b/resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheet.spec.ts similarity index 95% rename from resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawer.spec.ts rename to resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheet.spec.ts index 8ecc9612..30c9e2b7 100644 --- a/resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawer.spec.ts +++ b/resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheet.spec.ts @@ -9,7 +9,7 @@ import { albumStore, artistStore, commonStore, preferenceStore } from '@/stores' import UnitTestCase from '@/__tests__/UnitTestCase' import { CurrentPlayableKey } from '@/symbols' import { eventBus } from '@/utils' -import ExtraDrawer from './ExtraDrawer.vue' +import Component from './SideSheet.vue' new class extends UnitTestCase { protected test () { @@ -18,7 +18,7 @@ new class extends UnitTestCase { it('sets the active tab to the preference', async () => { preferenceStore.active_extra_panel_tab = 'YouTube' this.renderComponent(ref(factory('song'))) - const tab = screen.getByTestId('extra-drawer-youtube') + const tab = screen.getByTestId('side-sheet-youtube') expect(tab.style.display).toBe('none') await this.tick() @@ -75,7 +75,7 @@ new class extends UnitTestCase { const album = factory('album') const resolveAlbumMock = this.mock(albumStore, 'resolve').mockResolvedValue(album) - const rendered = this.render(ExtraDrawer, { + const rendered = this.render(Component, { global: { stubs: { ProfileAvatar: this.stub(), diff --git a/resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawer.vue b/resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheet.vue similarity index 87% rename from resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawer.vue rename to resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheet.vue index 1e26367c..3844a02e 100644 --- a/resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawer.vue +++ b/resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheet.vue @@ -10,10 +10,10 @@ py-0 px-6 h-k-header-height" >
- + - - + +
@@ -60,7 +60,7 @@ v-show="activeTab === 'YouTube'" id="extraPanelYouTube" aria-labelledby="extraTabYouTube" - data-testid="extra-drawer-youtube" + data-testid="side-sheet-youtube" role="tabpanel" tabindex="0" > @@ -81,15 +81,15 @@ import { eventBus, isSong, requireInjection } from '@/utils' import { CurrentPlayableKey } from '@/symbols' import ProfileAvatar from '@/components/ui/ProfileAvatar.vue' -import AboutKoelButton from '@/components/layout/main-wrapper/extra-drawer/AboutKoelButton.vue' -import LogoutButton from '@/components/layout/main-wrapper/extra-drawer/LogoutButton.vue' -import ExtraDrawerButton from '@/components/layout/main-wrapper/extra-drawer/ExtraDrawerButton.vue' +import AboutKoelButton from '@/components/layout/main-wrapper/side-sheet/AboutKoelButton.vue' +import LogoutButton from '@/components/layout/main-wrapper/side-sheet/LogoutButton.vue' +import SideSheetButton from '@/components/layout/main-wrapper/side-sheet/SideSheetButton.vue' const LyricsPane = defineAsyncComponent(() => import('@/components/ui/LyricsPane.vue')) const ArtistInfo = defineAsyncComponent(() => import('@/components/artist/ArtistInfo.vue')) const AlbumInfo = defineAsyncComponent(() => import('@/components/album/AlbumInfo.vue')) const YouTubeVideoList = defineAsyncComponent(() => import('@/components/ui/youtube/YouTubeVideoList.vue')) -const ExtraDrawerTabHeader = defineAsyncComponent(() => import('./ExtraDrawerTabHeader.vue')) +const SideSheetTabHeader = defineAsyncComponent(() => import('./SideSheetTabHeader.vue')) const { useYouTube } = useThirdPartyServices() @@ -152,7 +152,7 @@ aside { } .panes { - @apply no-hover:overflow-y-auto w-k-extra-drawer-width; + @apply no-hover:overflow-y-auto w-k-side-sheet-width; box-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.1); diff --git a/resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawerButton.vue b/resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheetButton.vue similarity index 100% rename from resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawerButton.vue rename to resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheetButton.vue diff --git a/resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawerTabHeader.spec.ts b/resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheetTabHeader.spec.ts similarity index 82% rename from resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawerTabHeader.spec.ts rename to resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheetTabHeader.spec.ts index bcaf859b..4c7e9287 100644 --- a/resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawerTabHeader.spec.ts +++ b/resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheetTabHeader.spec.ts @@ -2,13 +2,13 @@ import { expect, it } from 'vitest' import UnitTestCase from '@/__tests__/UnitTestCase' import { commonStore } from '@/stores' import { screen } from '@testing-library/vue' -import ExtraDrawerTabHeader from './ExtraDrawerTabHeader.vue' +import Component from './SideSheetTabHeader.vue' new class extends UnitTestCase { protected test () { it('renders tab headers', () => { commonStore.state.uses_you_tube = false - this.render(ExtraDrawerTabHeader) + this.render(Component) ;['Lyrics', 'Artist information', 'Album information'].forEach(name => screen.getByRole('button', { name })) expect(screen.queryByRole('button', { name: 'Related YouTube videos' })).toBeNull() @@ -16,13 +16,13 @@ new class extends UnitTestCase { it('has a YouTube tab header if using YouTube', () => { commonStore.state.uses_you_tube = true - this.render(ExtraDrawerTabHeader) + this.render(Component) screen.getByRole('button', { name: 'Related YouTube videos' }) }) it('emits the selected tab value', async () => { - const { emitted } = this.render(ExtraDrawerTabHeader) + const { emitted } = this.render(Component) await this.user.click(screen.getByRole('button', { name: 'Lyrics' })) diff --git a/resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawerTabHeader.vue b/resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheetTabHeader.vue similarity index 85% rename from resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawerTabHeader.vue rename to resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheetTabHeader.vue index c1f24508..8ce6498c 100644 --- a/resources/assets/js/components/layout/main-wrapper/extra-drawer/ExtraDrawerTabHeader.vue +++ b/resources/assets/js/components/layout/main-wrapper/side-sheet/SideSheetTabHeader.vue @@ -1,5 +1,5 @@