Skip to content

Commit ddac69e

Browse files
authored
feat: swap context menu for dropdown to fix three dots doing nothing (Significant-Gravitas#9091)
<!-- Clearly explain the need for these changes: --> ### Changes 🏗️ swaps context menu for dropdown menu <!-- Concisely describe all of the changes made in this pull request: --> ### Checklist 📋 #### For code changes: - [ ] I have clearly listed my changes in the PR description - [ ] I have made a test plan - [ ] I have tested my changes according to the test plan: <!-- Put your test plan here: --> - [ ] ... <details> <summary>Example test plan</summary> - [ ] Create from scratch and execute an agent with at least 3 blocks - [ ] Import an agent from file upload, and confirm it executes correctly - [ ] Upload agent to marketplace - [ ] Import an agent from marketplace and confirm it executes correctly - [ ] Edit an agent from monitor, and confirm it executes correctly </details> #### For configuration changes: - [ ] `.env.example` is updated or already compatible with my changes - [ ] `docker-compose.yml` is updated or already compatible with my changes - [ ] I have included a list of my configuration changes in the PR description (under **Changes**) <details> <summary>Examples of configuration changes</summary> - Changing ports - Adding new services that need to communicate with each other - Secrets or environment variable changes - New or infrastructure changes such as databases </details>
1 parent 1fb9c8c commit ddac69e

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

autogpt_platform/frontend/src/components/agptui/AgentTableRow.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as React from "react";
44
import Image from "next/image";
55
import { IconStarFilled, IconMore, IconEdit } from "@/components/ui/icons";
66
import { Status, StatusType } from "./Status";
7-
import * as ContextMenu from "@radix-ui/react-context-menu";
7+
import * as DropdownMenu from "@radix-ui/react-dropdown-menu";
88
import { TrashIcon } from "@radix-ui/react-icons";
99
import { StoreSubmissionRequest } from "@/lib/autogpt-server-api/types";
1010

@@ -139,30 +139,30 @@ export const AgentTableRow: React.FC<AgentTableRowProps> = ({
139139

140140
{/* Actions - Three dots menu */}
141141
<div className="flex justify-end">
142-
<ContextMenu.Root>
143-
<ContextMenu.Trigger>
142+
<DropdownMenu.Root>
143+
<DropdownMenu.Trigger>
144144
<button className="rounded-full p-1 hover:bg-neutral-100 dark:hover:bg-neutral-700">
145145
<IconMore className="h-5 w-5 text-neutral-800 dark:text-neutral-200" />
146146
</button>
147-
</ContextMenu.Trigger>
148-
<ContextMenu.Content className="z-10 rounded-xl border bg-white p-1 shadow-md dark:bg-gray-800">
149-
<ContextMenu.Item
147+
</DropdownMenu.Trigger>
148+
<DropdownMenu.Content className="z-10 rounded-xl border bg-white p-1 shadow-md dark:bg-gray-800">
149+
<DropdownMenu.Item
150150
onSelect={handleEdit}
151151
className="flex cursor-pointer items-center rounded-md px-3 py-2 hover:bg-gray-100 dark:hover:bg-gray-700"
152152
>
153153
<IconEdit className="mr-2 h-5 w-5 dark:text-gray-100" />
154154
<span className="dark:text-gray-100">Edit</span>
155-
</ContextMenu.Item>
156-
<ContextMenu.Separator className="my-1 h-px bg-gray-300 dark:bg-gray-600" />
157-
<ContextMenu.Item
155+
</DropdownMenu.Item>
156+
<DropdownMenu.Separator className="my-1 h-px bg-gray-300 dark:bg-gray-600" />
157+
<DropdownMenu.Item
158158
onSelect={handleDelete}
159159
className="flex cursor-pointer items-center rounded-md px-3 py-2 text-red-500 hover:bg-gray-100 dark:hover:bg-gray-700"
160160
>
161161
<TrashIcon className="mr-2 h-5 w-5 text-red-500 dark:text-red-400" />
162162
<span className="dark:text-red-400">Delete</span>
163-
</ContextMenu.Item>
164-
</ContextMenu.Content>
165-
</ContextMenu.Root>
163+
</DropdownMenu.Item>
164+
</DropdownMenu.Content>
165+
</DropdownMenu.Root>
166166
</div>
167167
</div>
168168
</div>

0 commit comments

Comments
 (0)