🎨 style: Address Minor UI Refresh Issues (#6552)

* 🎨 style: Adjust isSelected svg layout of ModelSpecItem

* style: fix modelSpec URL image beeing off-center; style: selected svg centered vertically

* style: Update CustomMenu component to use rounded-lg and enhance focus styles

* style: SidePanel top padding same as NewChat

* fix: prevent unnecessary space rendering in SplitText component

* style: Fix class names and enhance layout in Badge components

* feat: disable temporary chat when in chat

* style: handle > 1 lines in title Landing

* feat: enhance dynamic margin calculation based on line count and content height in Landing component
This commit is contained in:
Marco Beretta 2025-03-26 23:57:29 +01:00 committed by GitHub
parent 6b58547c63
commit 3ba7c4eb19
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 147 additions and 40 deletions

View file

@ -77,8 +77,9 @@ export const CustomMenu = React.forwardRef<HTMLDivElement, CustomMenuProps>(func
autoSelect
render={combobox}
className={cn(
'h-10 w-full rounded border-none bg-transparent px-2 text-base',
'h-10 w-full rounded-lg border-none bg-transparent px-2 text-base',
'sm:h-8 sm:text-sm',
'focus:outline-none focus:ring-0 focus-visible:ring-2 focus-visible:ring-white',
)}
/>
</div>

View file

@ -18,8 +18,7 @@ export function ModelSpecItem({ spec, isSelected }: ModelSpecItemProps) {
key={spec.name}
onClick={() => handleSelectSpec(spec)}
className={cn(
'flex w-full cursor-pointer justify-between rounded-lg px-2 text-sm',
spec.description ? 'items-start' : 'items-center',
'flex w-full cursor-pointer items-center justify-between rounded-lg px-2 text-sm',
)}
>
<div
@ -41,7 +40,7 @@ export function ModelSpecItem({ spec, isSelected }: ModelSpecItemProps) {
</div>
</div>
{isSelected && (
<div className={cn('flex-shrink-0', spec.description ? 'pt-1' : '')}>
<div className="flex-shrink-0 self-center">
<svg
width="16"
height="16"

View file

@ -22,7 +22,15 @@ const SpecIcon: React.FC<SpecIconProps> = ({ currentSpec, endpointsConfig }) =>
if (!iconURL.includes('http')) {
Icon = (icons[iconKey] ?? icons.unknown) as IconType;
} else if (iconURL) {
return <URLIcon iconURL={iconURL} altName={currentSpec.name} />;
return (
<URLIcon
iconURL={iconURL}
altName={currentSpec.name}
containerStyle={{ width: 20, height: 20 }}
className="icon-md shrink-0 overflow-hidden rounded-full"
endpoint={endpoint || undefined}
/>
);
} else {
Icon = (icons[endpoint ?? ''] ?? icons.unknown) as IconType;
}