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

Fixed text overflow for long node names #2632

Merged
merged 1 commit into from
Feb 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/renderer/components/NodeDocumentation/NodesList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,9 @@ export const NodesList = memo(
<Text
cursor="pointer"
key={node.schemaId}
overflow="hidden"
textOverflow="ellipsis"
whiteSpace="nowrap"
>
{node.name}
</Text>
Expand Down
24 changes: 12 additions & 12 deletions src/renderer/hooks/usePaneNodeSearchMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ import {
InputLeftElement,
InputRightElement,
MenuList,
Spacer,
Text,
} from '@chakra-ui/react';
import { memo, useCallback, useEffect, useMemo, useRef, useState } from 'react';
Expand Down Expand Up @@ -104,23 +103,24 @@ const SchemaItem = memo(
icon={schema.icon}
/>
<Text
flex={1}
h="full"
overflow="hidden"
textOverflow="ellipsis"
verticalAlign="middle"
whiteSpace="nowrap"
>
{schema.name}
</Text>
{isFavorite && (
<>
<Spacer />
<StarIcon
aria-label="Favorites"
boxSize={2.5}
color="gray.500"
overflow="hidden"
stroke="gray.500"
verticalAlign="middle"
/>
</>
<StarIcon
aria-label="Favorites"
boxSize={2.5}
color="gray.500"
overflow="hidden"
stroke="gray.500"
verticalAlign="middle"
/>
)}
</HStack>
);
Expand Down