From c27a9a8ffb06726f9887779c01d9eb964046d3e1 Mon Sep 17 00:00:00 2001 From: jeffvli Date: Sun, 16 Jul 2023 23:25:00 -0700 Subject: [PATCH] Remove base animation of smart playlist query builder display --- .../playlist-detail-song-list-route.tsx | 109 ++++++------------ 1 file changed, 38 insertions(+), 71 deletions(-) diff --git a/src/renderer/features/playlists/routes/playlist-detail-song-list-route.tsx b/src/renderer/features/playlists/routes/playlist-detail-song-list-route.tsx index 50d15404..322eb1e2 100644 --- a/src/renderer/features/playlists/routes/playlist-detail-song-list-route.tsx +++ b/src/renderer/features/playlists/routes/playlist-detail-song-list-route.tsx @@ -1,8 +1,7 @@ import { useRef, useState } from 'react'; import type { AgGridReact as AgGridReactType } from '@ag-grid-community/react/lib/agGridReact'; -import { Group } from '@mantine/core'; +import { Box, Group } from '@mantine/core'; import { closeAllModals, openModal } from '@mantine/modals'; -import { AnimatePresence, motion, Variants } from 'framer-motion'; import { RiArrowDownSLine, RiArrowUpSLine } from 'react-icons/ri'; import { generatePath, useNavigate, useParams } from 'react-router'; import { PlaylistDetailSongListContent } from '../components/playlist-detail-song-list-content'; @@ -119,28 +118,6 @@ const PlaylistDetailSongListRoute = () => { }); }; - const smartPlaylistVariants: Variants = { - animate: (custom: { isQueryBuilderExpanded: boolean }) => { - return { - maxHeight: custom.isQueryBuilderExpanded ? '35vh' : '3.5em', - opacity: 1, - transition: { - duration: 0.3, - ease: 'easeInOut', - }, - y: 0, - }; - }, - exit: { - opacity: 0, - y: -25, - }, - initial: { - opacity: 0, - y: -25, - }, - }; - const isSmartPlaylist = !detailQuery?.isLoading && detailQuery?.data?.rules && @@ -190,55 +167,45 @@ const PlaylistDetailSongListRoute = () => { itemCount={itemCount} tableRef={tableRef} /> - - {(isSmartPlaylist || showQueryBuilder) && ( - + - - + - Query Editor - - - - - )} - + {isQueryBuilderExpanded ? ( + + ) : ( + + )} + + Query Editor + + + {isQueryBuilderExpanded && ( + + )} + + + + )} );