Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Model Manager UI/UX Tweaks #6779

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,14 @@ export const InstallModels = memo(() => {
}, []);

return (
<Flex layerStyle="first" borderRadius="base" w="full" h="full" flexDir="column" gap={4}>
<Flex layerStyle="body" w="full" h="full" flexDir="column" gap={4}>
<Heading fontSize="xl">{t('modelManager.addModel')}</Heading>
<Tabs variant="collapse" height="50%" display="flex" flexDir="column" index={index} onChange={onChange}>
<Tabs borderRadius="base" bg="base.850" size="lg" isFitted variant="line" height="50%" display="flex" flexDir="column" index={index} onChange={onChange}>
<TabList>
<Tab>{t('modelManager.urlOrLocalPath')}</Tab>
<Tab>{t('modelManager.huggingFace')}</Tab>
<Tab>{t('modelManager.scanFolder')}</Tab>
<Tab>{t('modelManager.starterModels')}</Tab>
<Tab py={2}>{t('modelManager.urlOrLocalPath')}</Tab>
<Tab py={2}>{t('modelManager.huggingFace')}</Tab>
<Tab py={2}>{t('modelManager.scanFolder')}</Tab>
<Tab py={2}>{t('modelManager.starterModels')}</Tab>
</TabList>
<TabPanels p={3} height="100%">
<TabPanel>
Expand All @@ -44,7 +44,7 @@ export const InstallModels = memo(() => {
</TabPanel>
</TabPanels>
</Tabs>
<Box layerStyle="second" borderRadius="base" h="50%">
<Box layerStyle="first" borderRadius="base" h="50%">
<ModelInstallQueue />
</Box>
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@ export const ModelManager = memo(() => {
}, [dispatch]);

return (
<Flex flexDir="column" layerStyle="first" p={4} gap={4} borderRadius="base" w="50%" h="full">
<Flex flexDir="column" layerStyle="body" pt={4} gap={4} borderRadius="base" w="50%" h="full">
<Flex w="full" gap={4} justifyContent="space-between" alignItems="center">
<Heading fontSize="xl">{t('common.modelManager')}</Heading>
<Button size="sm" colorScheme="invokeYellow" leftIcon={<PiPlusBold />} onClick={handleClickAddModel}>
{t('modelManager.addModels')}
</Button>
</Flex>
<Flex flexDir="column" layerStyle="second" p={4} gap={4} borderRadius="base" w="full" h="full">
<Flex flexDir="column" layerStyle="first" p={2} gap={4} borderRadius="base" w="full" h="full">
<ModelListNavigation />
<ModelList />
</Flex>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ const ModelImage = ({ image_url }: Props) => {
<Flex
height={MODEL_IMAGE_THUMBNAIL_SIZE}
minWidth={MODEL_IMAGE_THUMBNAIL_SIZE}
bg="base.650"
bg="transparent"
borderWidth={1}
borderRadius="base"
alignItems="center"
justifyContent="center"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type ModelListItemProps = {
};

const sx: SystemStyleObject = {
_hover: { bg: 'base.700' },
_hover: { bg: 'base.750' },
"&[aria-selected='true']": { bg: 'base.700' },
};

Expand Down Expand Up @@ -78,7 +78,6 @@ const ModelListItem = ({ model }: ModelListItemProps) => {
aria-selected={isSelected}
justifyContent="flex-start"
p={2}
borderRadius="base"
w="full"
alignItems="center"
gap={2}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ type ModelListWrapperProps = {
export const ModelListWrapper = memo((props: ModelListWrapperProps) => {
const { title, modelList } = props;
return (
<StickyScrollable title={title} contentSx={{ gap: 1, p: 2 }}>
<StickyScrollable title={title} contentSx={{ gap: 0, p: 0, bg: "base.800", borderRadius: "base", overflow: "hidden" }} headingSx={{ bg: "base.850" }}>
{modelList.map((model) => (
<ModelListItem key={model.key} model={model} />
))}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { Model } from './ModelPanel/Model';
export const ModelPane = memo(() => {
const selectedModelKey = useAppSelector((s) => s.modelmanagerV2.selectedModelKey);
return (
<Box layerStyle="first" p={4} borderRadius="base" w="50%" h="full">
<Box layerStyle="body" pt={4} borderRadius="base" w="50%" h="full">
{selectedModelKey ? <Model key={selectedModelKey} /> : <InstallModels />}
</Box>
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ type Props = {
export const ModelView = memo(({ modelConfig }: Props) => {
const { t } = useTranslation();
return (
<Flex flexDir="column" gap={4}>
<Flex flexDir="column" gap={4} layerStyle="first" p={2} borderRadius="base">
<ModelHeader modelConfig={modelConfig}>
{modelConfig.format === 'checkpoint' && modelConfig.type === 'main' && (
<ModelConvertButton modelConfig={modelConfig} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { memo } from 'react';

const ModelManagerTab = () => {
return (
<Flex w="full" h="full" gap="2">
<Flex w="full" h="full" gap="4">
<ModelManager />
<ModelPane />
</Flex>
Expand Down
Loading