From 24bf1ea65aced337b13a5c8f3fbc28d7ca9f9d4d Mon Sep 17 00:00:00 2001
From: psychedelicious <4822129+psychedelicious@users.noreply.github.com>
Date: Mon, 15 Jul 2024 11:52:40 +1000
Subject: [PATCH] fix(ui): boards cut off when search open
---
.../Boards/BoardsList/BoardsList.tsx | 86 ++++++++++---------
.../components/ImageGalleryContent.tsx | 25 +++---
2 files changed, 60 insertions(+), 51 deletions(-)
diff --git a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/BoardsList.tsx b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/BoardsList.tsx
index bd4c42e8d1..4325281e0f 100644
--- a/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/BoardsList.tsx
+++ b/invokeai/frontend/web/src/features/gallery/components/Boards/BoardsList/BoardsList.tsx
@@ -1,4 +1,4 @@
-import { Flex, Text } from '@invoke-ai/ui-library';
+import { Box, Flex, Text } from '@invoke-ai/ui-library';
import { EMPTY_ARRAY } from 'app/store/constants';
import { useAppSelector } from 'app/store/storeHooks';
import { overlayScrollbarsParams } from 'common/components/OverlayScrollbars/constants';
@@ -40,9 +40,41 @@ const BoardsList = () => {
return (
<>
-
-
- {allowPrivateBoards && (
+
+
+
+ {allowPrivateBoards && (
+
+
+
+ {t('boards.private')}
+
+
+
+
+
+ {filteredPrivateBoards.map((board) => (
+
+ ))}
+
+
+ )}
{
justifyContent="space-between"
alignItems="center"
ps={2}
- py={1}
+ pb={1}
+ pt={2}
zIndex={1}
top={0}
bg="base.900"
>
- {t('boards.private')}
+ {allowPrivateBoards ? t('boards.shared') : t('boards.boards')}
-
+
-
- {filteredPrivateBoards.map((board) => (
+ {!allowPrivateBoards && }
+ {filteredSharedBoards.map((board) => (
{
))}
- )}
-
-
-
- {allowPrivateBoards ? t('boards.shared') : t('boards.boards')}
-
-
-
-
- {!allowPrivateBoards && }
- {filteredSharedBoards.map((board) => (
-
- ))}
-
-
-
-
+
+
+
>
);
diff --git a/invokeai/frontend/web/src/features/gallery/components/ImageGalleryContent.tsx b/invokeai/frontend/web/src/features/gallery/components/ImageGalleryContent.tsx
index 7c992c65d6..5a096f5cef 100644
--- a/invokeai/frontend/web/src/features/gallery/components/ImageGalleryContent.tsx
+++ b/invokeai/frontend/web/src/features/gallery/components/ImageGalleryContent.tsx
@@ -16,6 +16,7 @@ import { GalleryHeader } from 'features/gallery/components/GalleryHeader';
import { galleryViewChanged } from 'features/gallery/store/gallerySlice';
import ResizeHandle from 'features/ui/components/tabs/ResizeHandle';
import { usePanel, type UsePanelOptions } from 'features/ui/hooks/usePanel';
+import type { CSSProperties } from 'react';
import { memo, useCallback, useMemo, useRef } from 'react';
import { useTranslation } from 'react-i18next';
import { PiMagnifyingGlassBold } from 'react-icons/pi';
@@ -29,13 +30,15 @@ import GalleryImageGrid from './ImageGrid/GalleryImageGrid';
import { GalleryPagination } from './ImageGrid/GalleryPagination';
import { GallerySearch } from './ImageGrid/GallerySearch';
-const baseStyles: ChakraProps['sx'] = {
+const COLLAPSE_STYLES: CSSProperties = { flexShrink: 0, minHeight: 0 };
+
+const BASE_STYLES: ChakraProps['sx'] = {
fontWeight: 'semibold',
fontSize: 'sm',
color: 'base.300',
};
-const selectedStyles: ChakraProps['sx'] = {
+const SELECTED_STYLES: ChakraProps['sx'] = {
borderColor: 'base.800',
borderBottomColor: 'base.900',
color: 'invokeBlue.300',
@@ -110,11 +113,13 @@ const ImageGalleryContent = () => {
onExpand={boardsListPanel.onExpand}
collapsible
>
-
-
-
-
-
+
+
+
+
+
+
+
{
-
+
{t('parameters.images')}
-
+
{t('gallery.assets')}
@@ -157,7 +162,7 @@ const ImageGalleryContent = () => {
-
+