GeezerVison is showing github.com — tui: remove close button from project hover popover (#16403) · Luminger/opencode@641e178
File tree
Expand file treeCollapse file tree
Open diff view settings
Expand file treeCollapse file tree
Open diff view settings
Collapse file
Copy file name to clipboardExpand all lines: packages/app/e2e/projects/projects-close.spec.ts +1-29Lines changed: 1 addition & 29 deletions | Original file line number | Diff line number | Diff line change |
|---|
|
1 | 1 | import { test, expect } from "../fixtures" |
2 | 2 | import { createTestProject, cleanupTestProject, openSidebar, clickMenuItem, openProjectMenu } from "../actions" |
3 | | -import { projectCloseHoverSelector, projectSwitchSelector } from "../selectors" |
| 3 | +import { projectSwitchSelector } from "../selectors" |
4 | 4 | import { dirSlug } from "../utils" |
5 | 5 |
|
6 | | -test("can close a project via hover card close button", async ({ page, withProject }) => { |
7 | | - await page.setViewportSize({ width: 1400, height: 800 }) |
8 | | - |
9 | | - const other = await createTestProject() |
10 | | - const otherSlug = dirSlug(other) |
11 | | - |
12 | | - try { |
13 | | - await withProject( |
14 | | - async () => { |
15 | | - await openSidebar(page) |
16 | | - |
17 | | - const otherButton = page.locator(projectSwitchSelector(otherSlug)).first() |
18 | | - await expect(otherButton).toBeVisible() |
19 | | - await otherButton.hover() |
20 | | - |
21 | | - const close = page.locator(projectCloseHoverSelector(otherSlug)).first() |
22 | | - await expect(close).toBeVisible() |
23 | | - await close.click() |
24 | | - |
25 | | - await expect(otherButton).toHaveCount(0) |
26 | | - }, |
27 | | - { extra: [other] }, |
28 | | - ) |
29 | | - } finally { |
30 | | - await cleanupTestProject(other) |
31 | | - } |
32 | | -}) |
33 | | - |
34 | 6 | test("closing active project navigates to another open project", async ({ page, withProject }) => { |
35 | 7 | await page.setViewportSize({ width: 1400, height: 800 }) |
36 | 8 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: packages/app/e2e/selectors.ts -2Lines changed: 0 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -30,8 +30,6 @@ export const sidebarNavSelector = '[data-component="sidebar-nav-desktop"]' |
30 | 30 | export const projectSwitchSelector = (slug: string) => |
31 | 31 | `${sidebarNavSelector} [data-action="project-switch"][data-project="${slug}"]` |
32 | 32 |
|
33 | | -export const projectCloseHoverSelector = (slug: string) => `[data-action="project-close-hover"][data-project="${slug}"]` |
34 | | - |
35 | 33 | export const projectMenuTriggerSelector = (slug: string) => |
36 | 34 | `${sidebarNavSelector} [data-action="project-menu"][data-project="${slug}"]` |
37 | 35 |
|
|
Collapse file
Copy file name to clipboardExpand all lines: packages/app/src/pages/layout/sidebar-project.tsx -17Lines changed: 0 additions & 17 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -5,8 +5,6 @@ import { Button } from "@opencode-ai/ui/button" |
5 | 5 | import { ContextMenu } from "@opencode-ai/ui/context-menu" |
6 | 6 | import { HoverCard } from "@opencode-ai/ui/hover-card" |
7 | 7 | import { Icon } from "@opencode-ai/ui/icon" |
8 | | -import { IconButton } from "@opencode-ai/ui/icon-button" |
9 | | -import { Tooltip } from "@opencode-ai/ui/tooltip" |
10 | 8 | import { createSortable } from "@thisbeyond/solid-dnd" |
11 | 9 | import { useLayout, type LocalProject } from "@/context/layout" |
12 | 10 | import { useGlobalSync } from "@/context/global-sync" |
@@ -194,21 +192,6 @@ const ProjectPreviewPanel = (props: { |
194 | 192 | <div class="-m-3 p-2 flex flex-col w-72"> |
195 | 193 | <div class="px-4 pt-2 pb-1 flex items-center gap-2"> |
196 | 194 | <div class="text-14-medium text-text-strong truncate grow">{displayName(props.project)}</div> |
197 | | - <Tooltip value={props.language.t("common.close")} placement="top" gutter={6}> |
198 | | - <IconButton |
199 | | - icon="circle-x" |
200 | | - variant="ghost" |
201 | | - class="shrink-0" |
202 | | - data-action="project-close-hover" |
203 | | - data-project={base64Encode(props.project.worktree)} |
204 | | - aria-label={props.language.t("common.close")} |
205 | | - onClick={(event) => { |
206 | | - event.stopPropagation() |
207 | | - props.setOpen(false) |
208 | | - props.ctx.closeProject(props.project.worktree) |
209 | | - }} |
210 | | - /> |
211 | | - </Tooltip> |
212 | 195 | </div> |
213 | 196 | <div class="px-4 pb-2 text-12-medium text-text-weak">{props.language.t("sidebar.project.recentSessions")}</div> |
214 | 197 | <div class="px-2 pb-2 flex flex-col gap-2"> |
|