From 2c09bfc3d97218dd3a1395eb86bb003a2c8fe201 Mon Sep 17 00:00:00 2001 From: nikec <43032218+niikeec@users.noreply.github.com> Date: Sat, 26 Aug 2023 11:30:41 +0200 Subject: [PATCH] [ENG-1003] fix search bar position (#1252) fix search bar position --- .../app/$libraryId/TopBar/TopBarOptions.tsx | 2 +- interface/app/$libraryId/TopBar/index.tsx | 19 +++++++++++-------- interface/app/$libraryId/location/$id.tsx | 14 ++++++-------- interface/app/$libraryId/node/$id.tsx | 13 ++++--------- 4 files changed, 22 insertions(+), 26 deletions(-) diff --git a/interface/app/$libraryId/TopBar/TopBarOptions.tsx b/interface/app/$libraryId/TopBar/TopBarOptions.tsx index 87bae08eb..7ed1ebf66 100644 --- a/interface/app/$libraryId/TopBar/TopBarOptions.tsx +++ b/interface/app/$libraryId/TopBar/TopBarOptions.tsx @@ -37,7 +37,7 @@ export default ({ options }: TopBarChildrenProps) => { }, []); return ( -
+
{options?.map((group, groupIndex) => { return group.map( diff --git a/interface/app/$libraryId/TopBar/index.tsx b/interface/app/$libraryId/TopBar/index.tsx index 94142ec57..8285d69d4 100644 --- a/interface/app/$libraryId/TopBar/index.tsx +++ b/interface/app/$libraryId/TopBar/index.tsx @@ -20,19 +20,22 @@ const TopBar = (props: Props) => { data-tauri-drag-region style={{ height: TOP_BAR_HEIGHT }} className={clsx( - 'duration-250 top-bar-blur absolute left-0 top-0 z-50 flex', - 'w-full flex-row items-center justify-between overflow-hidden', - 'border-b border-sidebar-divider bg-app/90 px-3.5', - 'transition-[background-color,border-color] ease-out', + 'top-bar-blur absolute inset-x-0 z-50 flex items-center gap-3.5 overflow-hidden border-b !border-sidebar-divider bg-app/90 px-3.5', + 'duration-250 transition-[background-color,border-color] ease-out', isDragging && 'pointer-events-none' )} > -
+
-
+
- {props.noSearch || } -
+ + {!props.noSearch && } + +
); }; diff --git a/interface/app/$libraryId/location/$id.tsx b/interface/app/$libraryId/location/$id.tsx index 62d7d7d87..3516bfbcb 100644 --- a/interface/app/$libraryId/location/$id.tsx +++ b/interface/app/$libraryId/location/$id.tsx @@ -122,14 +122,12 @@ export const Component = () => { - - - - {path && path?.length > 1 - ? getLastSectionOfPath(path) - : location.data?.name} - +
+ + + {path && path?.length > 1 + ? getLastSectionOfPath(path) + : location.data?.name} {location.data && ( diff --git a/interface/app/$libraryId/node/$id.tsx b/interface/app/$libraryId/node/$id.tsx index 7f0113c13..da5cc5414 100644 --- a/interface/app/$libraryId/node/$id.tsx +++ b/interface/app/$libraryId/node/$id.tsx @@ -43,15 +43,10 @@ export const Component = () => { - - - - {nodeState.data?.name || 'Node'} - +
+ + + {nodeState.data?.name || 'Node'}
}