From 28992c5e43aefb494284e8467de45daecfbe6e30 Mon Sep 17 00:00:00 2001 From: Dane Everitt Date: Sun, 5 Jul 2020 13:56:04 -0700 Subject: [PATCH] Speed up animations throughout the panel --- resources/scripts/TransitionRouter.tsx | 2 +- resources/scripts/components/dashboard/search/SearchModal.tsx | 3 +-- resources/scripts/components/elements/DropdownMenu.tsx | 2 +- resources/scripts/components/elements/InputSpinner.tsx | 2 +- resources/scripts/components/elements/Modal.tsx | 4 ++-- resources/scripts/components/elements/PageContentBlock.tsx | 2 +- resources/scripts/components/elements/ProgressBar.tsx | 2 +- resources/scripts/components/server/WebsocketHandler.tsx | 2 +- .../components/server/databases/DatabasesContainer.tsx | 2 +- .../scripts/components/server/files/FileDropdownMenu.tsx | 2 +- .../scripts/components/server/files/FileManagerContainer.tsx | 2 +- resources/scripts/routers/ServerRouter.tsx | 2 +- 12 files changed, 13 insertions(+), 14 deletions(-) diff --git a/resources/scripts/TransitionRouter.tsx b/resources/scripts/TransitionRouter.tsx index 19c06d43a..227f7dcdc 100644 --- a/resources/scripts/TransitionRouter.tsx +++ b/resources/scripts/TransitionRouter.tsx @@ -17,7 +17,7 @@ const TransitionRouter: React.FC = ({ children }) => ( ( - +
{children}
diff --git a/resources/scripts/components/dashboard/search/SearchModal.tsx b/resources/scripts/components/dashboard/search/SearchModal.tsx index e58900694..8cdfb1b7f 100644 --- a/resources/scripts/components/dashboard/search/SearchModal.tsx +++ b/resources/scripts/components/dashboard/search/SearchModal.tsx @@ -22,8 +22,7 @@ interface Values { } const ServerResult = styled(Link)` - ${tw`flex items-center bg-neutral-900 p-4 rounded border-l-4 border-neutral-900 no-underline`}; - transition: all 250ms linear; + ${tw`flex items-center bg-neutral-900 p-4 rounded border-l-4 border-neutral-900 no-underline transition-all duration-150`}; &:hover { ${tw`shadow border-cyan-500`}; diff --git a/resources/scripts/components/elements/DropdownMenu.tsx b/resources/scripts/components/elements/DropdownMenu.tsx index 8637fa8ec..05b3d3c7c 100644 --- a/resources/scripts/components/elements/DropdownMenu.tsx +++ b/resources/scripts/components/elements/DropdownMenu.tsx @@ -61,7 +61,7 @@ const DropdownMenu = ({ renderToggle, children }: Props) => { return (
{renderToggle(onClickHandler)} - +
{ diff --git a/resources/scripts/components/elements/InputSpinner.tsx b/resources/scripts/components/elements/InputSpinner.tsx index d1273435f..ce4843dff 100644 --- a/resources/scripts/components/elements/InputSpinner.tsx +++ b/resources/scripts/components/elements/InputSpinner.tsx @@ -9,7 +9,7 @@ const InputSpinner = ({ visible, children }: { visible: boolean, children: React appear unmountOnExit in={visible} - timeout={250} + timeout={150} >
diff --git a/resources/scripts/components/elements/Modal.tsx b/resources/scripts/components/elements/Modal.tsx index 672333ecf..f242fbacc 100644 --- a/resources/scripts/components/elements/Modal.tsx +++ b/resources/scripts/components/elements/Modal.tsx @@ -62,7 +62,7 @@ const Modal: React.FC = ({ visible, appear, dismissable, showSpinnerOverl }, [ render ]); return ( - + { if (isDismissable && closeOnBackground) { @@ -87,7 +87,7 @@ const Modal: React.FC = ({ visible, appear, dismissable, showSpinnerOverl
} -
+
{children}
diff --git a/resources/scripts/components/elements/PageContentBlock.tsx b/resources/scripts/components/elements/PageContentBlock.tsx index 6613b6e51..9503839ff 100644 --- a/resources/scripts/components/elements/PageContentBlock.tsx +++ b/resources/scripts/components/elements/PageContentBlock.tsx @@ -4,7 +4,7 @@ import { CSSTransition } from 'react-transition-group'; import tw from 'twin.macro'; const PageContentBlock: React.FC<{ className?: string }> = ({ children, className }) => ( - + <> {children} diff --git a/resources/scripts/components/elements/ProgressBar.tsx b/resources/scripts/components/elements/ProgressBar.tsx index a40b92705..64ee732b7 100644 --- a/resources/scripts/components/elements/ProgressBar.tsx +++ b/resources/scripts/components/elements/ProgressBar.tsx @@ -61,7 +61,7 @@ export default () => { return (
{ return ( error ? - +
diff --git a/resources/scripts/components/server/databases/DatabasesContainer.tsx b/resources/scripts/components/server/databases/DatabasesContainer.tsx index 164f2edef..486072598 100644 --- a/resources/scripts/components/server/databases/DatabasesContainer.tsx +++ b/resources/scripts/components/server/databases/DatabasesContainer.tsx @@ -40,7 +40,7 @@ export default () => { {(!databases.length && loading) ? : - + <> {databases.length > 0 ? databases.map((database, index) => ( diff --git a/resources/scripts/components/server/files/FileDropdownMenu.tsx b/resources/scripts/components/server/files/FileDropdownMenu.tsx index 53b817d0e..a1953470b 100644 --- a/resources/scripts/components/server/files/FileDropdownMenu.tsx +++ b/resources/scripts/components/server/files/FileDropdownMenu.tsx @@ -138,7 +138,7 @@ export default ({ uuid }: { uuid: string }) => { />
- +
{ diff --git a/resources/scripts/components/server/files/FileManagerContainer.tsx b/resources/scripts/components/server/files/FileManagerContainer.tsx index ea5b16573..e97bb37f0 100644 --- a/resources/scripts/components/server/files/FileManagerContainer.tsx +++ b/resources/scripts/components/server/files/FileManagerContainer.tsx @@ -70,7 +70,7 @@ export default () => { This directory seems to be empty.

: - +
{files.length > 250 ? diff --git a/resources/scripts/routers/ServerRouter.tsx b/resources/scripts/routers/ServerRouter.tsx index cf4cbec8a..baa9723a4 100644 --- a/resources/scripts/routers/ServerRouter.tsx +++ b/resources/scripts/routers/ServerRouter.tsx @@ -69,7 +69,7 @@ const ServerRouter = ({ match, location }: RouteComponentProps<{ id: string }>) : <> - +
Console