From 7d9644ab55d6a8459473e223c6fc4707ec307bf9 Mon Sep 17 00:00:00 2001 From: Chris Amow Date: Thu, 13 Aug 2026 20:30:07 -0500 Subject: [PATCH] color select alignment --- static/index.html | 16 ++++++++-------- tests/e2e/comments.test.mjs | 4 ++++ tests/e2e/drawings.test.mjs | 3 +++ 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/static/index.html b/static/index.html index 69d13be..ffe03c0 100644 --- a/static/index.html +++ b/static/index.html @@ -210,6 +210,10 @@ #{{ item.number }} · {{ item.line.tf }} · {{ item.line.side === 'support' ? '↑' : '↓' }}
+
-
+
- diff --git a/tests/e2e/comments.test.mjs b/tests/e2e/comments.test.mjs index fcf9b3a..cc9b4ad 100644 --- a/tests/e2e/comments.test.mjs +++ b/tests/e2e/comments.test.mjs @@ -83,6 +83,10 @@ test('clicking a comment collapses it', { timeout: 180000 }, async () => { assert.equal((await commentNode(page)).collapsed, false); await page.fill('input[aria-label="Filter drawings by text"]', TEXT); const row = page.locator('.trendline-row'); + const controls = await row.locator('.drawing-controls>*').evaluateAll(nodes => + nodes.map(node => node.classList.contains('color-picker') ? 'color' : node.className)); + assert.deepEqual(controls, ['collapse-toggle', 'color'], + 'the comment color picker is not the rightmost control'); await row.locator('.drawing-secondary>span').click(); assert.equal(await page.locator(`.chart-comment[title="${TEXT}"]`).evaluate(node => node.classList.contains('focus')), true, 'selecting the comment row did not point out the comment on the chart'); diff --git a/tests/e2e/drawings.test.mjs b/tests/e2e/drawings.test.mjs index 26b4c99..afc5033 100644 --- a/tests/e2e/drawings.test.mjs +++ b/tests/e2e/drawings.test.mjs @@ -47,6 +47,9 @@ test('editing a drawing name with Backspace or Delete cannot delete the drawing' const row = page.locator('.trendline-row'); assert.deepEqual(await row.locator('select[aria-label="Drawing width"] option').allTextContents(), ['1', '2', '3', '4', '5', '6', '7', '8', '9']); + const controls = await row.locator('.drawing-controls>*').evaluateAll(nodes => + nodes.map(node => node.classList.contains('color-picker') ? 'color' : node.tagName.toLowerCase())); + assert.deepEqual(controls, ['select', 'color'], 'the color picker is not the rightmost control'); const rowBox = await row.boundingBox(); assert.ok(rowBox.height <= 48, `drawing row is still ${rowBox.height}px tall`); assert.equal(await row.locator('.drawing-state .fa-bell').count(), 1,