Skip to content

Commit f36dc5d

Browse files
ryan-williamsclaude
andcommitted
Bump use-kbd to dist build with SpeedDial + inline add button
Update e2e tests for new \`kbd-add-inline-btn\` UI (hover on kbd to reveal inline + button, replacing the standalone \`kbd-add-btn\`). Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 79f60cf commit f36dc5d

File tree

3 files changed

+44
-17
lines changed

3 files changed

+44
-17
lines changed

www/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@
3737
"react-plotly.js": "^2.6.0",
3838
"recharts": "^3.1.0",
3939
"uplot": "^1.6.32",
40-
"use-kbd": "^0.10.0",
40+
"use-kbd": "https://github.com/runsascoded/use-kbd#34745efff8efdfd2c46e3e39d479a708aba704b2",
4141
"use-prms": "^0.4.1",
4242
"use-session-storage-state": "^19.0.1",
4343
"@rdub/agg-plot": "https://gitlab.com/runsascoded/js/agg-plot/-/archive/e9087eda0724f058d4d2657afd51d0c3f59193e6/agg-plot-e9087eda0724f058d4d2657afd51d0c3f59193e6.tar.gz"

www/pnpm-lock.yaml

Lines changed: 31 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

www/test/e2e/hotkey-editing.spec.ts

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -408,9 +408,10 @@ test.describe('Hotkey Editing', () => {
408408
// Initially should have just 'T'
409409
await expect(leftCell.locator('kbd', { hasText: 'T' })).toBeVisible()
410410

411-
// Add 'q' using the + button (adds, doesn't replace)
412-
const addButton = leftCell.locator('.kbd-add-btn')
413-
await addButton.click()
411+
// Add 'q' using the inline + button on the T key (adds, doesn't replace)
412+
const tKbd = leftCell.locator('kbd', { hasText: 'T' })
413+
await tKbd.hover()
414+
await tKbd.locator('.kbd-add-inline-btn').click()
414415
await page.keyboard.press('q')
415416
await page.keyboard.press('Enter') // Confirm the key (sequenceTimeout is Infinity)
416417
await page.waitForTimeout(300)
@@ -419,8 +420,10 @@ test.describe('Hotkey Editing', () => {
419420
await expect(leftCell.locator('kbd', { hasText: 'T' })).toBeVisible()
420421
await expect(leftCell.locator('kbd', { hasText: 'Q' })).toBeVisible()
421422

422-
// Add 'y' as well using the + button
423-
await addButton.click()
423+
// Add 'y' as well using the inline + button on the Q key
424+
const qKbd = leftCell.locator('kbd', { hasText: 'Q' })
425+
await qKbd.hover()
426+
await qKbd.locator('.kbd-add-inline-btn').click()
424427
await page.keyboard.press('y')
425428
await page.keyboard.press('Enter') // Confirm the key (sequenceTimeout is Infinity)
426429
await page.waitForTimeout(300)
@@ -448,9 +451,10 @@ test.describe('Hotkey Editing', () => {
448451
const tempRow = page.locator('.kbd-table tbody tr').first()
449452
const leftCell = tempRow.locator('td:nth-child(2)')
450453

451-
// Add 'z' binding using + button (adds, doesn't replace)
452-
const addButton = leftCell.locator('.kbd-add-btn')
453-
await addButton.click()
454+
// Add 'z' binding using inline + button on the T key (adds, doesn't replace)
455+
const tKbd2 = leftCell.locator('kbd', { hasText: 'T' })
456+
await tKbd2.hover()
457+
await tKbd2.locator('.kbd-add-inline-btn').click()
454458
await page.keyboard.press('z')
455459
await page.keyboard.press('Enter') // Confirm the key (sequenceTimeout is Infinity)
456460
await page.waitForTimeout(300)

0 commit comments

Comments
 (0)