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

[front] - chore(sidebarmenu): polish #8920

Merged
merged 7 commits into from
Nov 27, 2024
27 changes: 11 additions & 16 deletions front/components/assistant/conversation/SidebarMenu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import {
PlusIcon,
RobotIcon,
ScrollArea,
Separator,
TrashIcon,
XMarkIcon,
} from "@dust-tt/sparkle";
Expand Down Expand Up @@ -201,29 +200,26 @@ export function AssistantSidebarMenu({ owner }: AssistantSidebarMenuProps) {
)}
>
<div className="flex h-0 min-h-full w-full overflow-y-auto">
<div className="flex w-full flex-col pl-2">
<div className="flex w-full flex-col">
{isMultiSelect ? (
<div className="flex w-full items-center justify-end py-2 pr-2">
<div className="z-50 flex justify-between gap-2 p-2 shadow-tale">
<Button
size="xs"
variant="outline"
icon={XMarkIcon}
onClick={toggleMultiSelect}
className="mr-2"
/>
<Button
icon={TrashIcon}
size="xs"
variant={
selectedConversations.length === 0 ? "outline" : "warning"
}
tooltip="Delete conversations"
label="Delete"
disabled={selectedConversations.length === 0}
onClick={() => setShowDeleteDialog("selection")}
/>
<Button
variant="ghost"
icon={XMarkIcon}
onClick={toggleMultiSelect}
className="mr-2"
/>
</div>
) : (
<div className={classNames("flex justify-end gap-2 py-2 pr-2")}>
<div className="z-50 flex justify-end gap-2 p-2 shadow-tale">
<Button
href={`/w/${owner.sId}/assistant/new`}
label="New"
Expand Down Expand Up @@ -283,8 +279,7 @@ export function AssistantSidebarMenu({ owner }: AssistantSidebarMenuProps) {
Error loading conversations
</Label>
)}
<Separator />
<ScrollArea className="w-full">
<ScrollArea className="w-full px-2">
{conversationsByDate &&
Object.keys(conversationsByDate).map((dateLabel) => (
<RenderConversations
Expand Down
1 change: 1 addition & 0 deletions front/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ module.exports = {
lg: "0 10px 20px rgba(15, 23, 42, 0.12)",
xl: "0 20px 25px rgba(15, 23, 42, 0.12)",
"2xl": "0 25px 50px rgba(15, 23, 42, 0.12)",
tale: "0px 0px 12px 12px #F6F8FB",
},
zIndex: {
60: "60",
Expand Down
Loading