mirror of
https://github.com/tiennm99/ccs.git
synced 2026-09-02 16:19:27 +00:00
fix(ui): keep provider names readable
This commit is contained in:
@@ -725,12 +725,17 @@ function CompactPresetCard({
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div className="min-w-0 flex-1 space-y-1">
|
<div className="min-w-0 flex-1 space-y-1">
|
||||||
<div className="flex items-start justify-between gap-2">
|
<div className="space-y-1">
|
||||||
<div className="truncate text-sm font-semibold leading-tight">{preset.name}</div>
|
<div
|
||||||
|
className="text-sm font-semibold leading-tight"
|
||||||
|
style={{ ...CARD_META_CLAMP_STYLE, WebkitLineClamp: 2 }}
|
||||||
|
>
|
||||||
|
{preset.name}
|
||||||
|
</div>
|
||||||
{preset.badge && (
|
{preset.badge && (
|
||||||
<Badge
|
<Badge
|
||||||
variant="secondary"
|
variant="secondary"
|
||||||
className="shrink-0 bg-muted px-1.5 py-0 text-[10px] text-muted-foreground"
|
className="inline-flex bg-muted px-1.5 py-0 text-[10px] text-muted-foreground"
|
||||||
>
|
>
|
||||||
{preset.badge}
|
{preset.badge}
|
||||||
</Badge>
|
</Badge>
|
||||||
|
|||||||
@@ -34,6 +34,7 @@ describe('ProfileCreateDialog', () => {
|
|||||||
);
|
);
|
||||||
|
|
||||||
expect(screen.getByText('Featured Providers')).toBeInTheDocument();
|
expect(screen.getByText('Featured Providers')).toBeInTheDocument();
|
||||||
|
expect(screen.getByText('Alibaba Coding Plan')).not.toHaveClass('truncate');
|
||||||
const morePresetsToggle = screen.getByRole('button', { name: /More Presets/i });
|
const morePresetsToggle = screen.getByRole('button', { name: /More Presets/i });
|
||||||
expect(morePresetsToggle).toHaveAttribute('aria-expanded', 'false');
|
expect(morePresetsToggle).toHaveAttribute('aria-expanded', 'false');
|
||||||
expect(document.body.querySelectorAll('.overflow-x-auto')).toHaveLength(1);
|
expect(document.body.querySelectorAll('.overflow-x-auto')).toHaveLength(1);
|
||||||
|
|||||||
Reference in New Issue
Block a user