mirror of
https://github.com/anomalyco/opencode.git
synced 2026-08-24 06:33:01 -04:00
fix(desktop): align file and directory text
This commit is contained in:
@@ -37,6 +37,22 @@ test("labels single-file patches by operation", async ({ page }) => {
|
||||
await expect(removed.locator('[data-slot="diff-changes-deletions"]')).toHaveCount(0)
|
||||
await expect(modified.locator('[data-slot="diff-changes-additions"]')).toHaveText("+4")
|
||||
await expect(modified.locator('[data-slot="diff-changes-deletions"]')).toHaveText("-3")
|
||||
|
||||
const alignment = await page.locator('[data-timeline-part-id="prt_created_patch"]').evaluate((element) => {
|
||||
const bounds = (selector: string) => {
|
||||
const target = element.querySelector(selector)
|
||||
if (!target) throw new Error(`Missing ${selector}`)
|
||||
const range = document.createRange()
|
||||
range.selectNodeContents(target)
|
||||
const rect = range.getBoundingClientRect()
|
||||
return { top: rect.top, bottom: rect.bottom }
|
||||
}
|
||||
return {
|
||||
filename: bounds('[data-slot="message-part-title-filename"]'),
|
||||
directory: bounds('[data-slot="message-part-directory"]'),
|
||||
}
|
||||
})
|
||||
expect(alignment.directory).toEqual(alignment.filename)
|
||||
})
|
||||
|
||||
test("preserves nested patch file state through outer collapse and reopen", async ({ page }) => {
|
||||
|
||||
@@ -438,6 +438,11 @@
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
font-family: var(--font-family-sans);
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
line-height: var(--line-height-large);
|
||||
letter-spacing: var(--letter-spacing-normal);
|
||||
}
|
||||
|
||||
[data-slot="message-part-title"] {
|
||||
@@ -446,12 +451,7 @@
|
||||
align-items: baseline;
|
||||
gap: 8px;
|
||||
min-width: 0;
|
||||
font-family: var(--font-family-sans);
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
font-weight: var(--font-weight-medium);
|
||||
line-height: var(--line-height-large);
|
||||
letter-spacing: var(--letter-spacing-normal);
|
||||
color: var(--v2-text-text-muted);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user