Skip to content

refactor(ui): array.from instead of spread over node lists - #83

Merged
daggerok merged 1 commit into
mainfrom
refactor/array-from-node-lists
Oct 26, 2026
Merged

daggerok merged 1 commit into
mainfrom
refactor/array-from-node-lists

Conversation

@daggerok

Copy link
Copy Markdown
Owner

What

Replaces the spread over NodeLists and Sets in the shared ui-std blocks with Array.from(...) (7 lines in src/main.tsx):

  • dropdown block: paintActive rows, open active row, the Tab handler's focusable and page lists
  • columns menu: persistHiddenColumns
  • categories dropdown: persistHiddenCategories
  • filter UI: rerenderKeepingFilterFocus

Why

The owner's IntelliJ checks src/main.tsx with TypeScript 5.9 defaults (ES5 lib), where [...document.querySelectorAll(...)] is TS2461 and [...set] is TS2802. Stocks PR 45 already made this change, now the shared blocks in the workspace match it and every repo gets the same lines. Behaviour does not change: Array.from over a NodeList or Set gives the same array in the same order.

How it was checked

  • bun test (exit 0)
  • bun build --target=bun scripts/update-data.ts --outfile=/dev/null and bun build --target=bun src/main.tsx --outfile=/dev/null
  • .claude/tools/etfs/tc/check.sh (esnext + ide modes): 67 -> 64 error lines (TS2461x1 TS2802x2 gone), nothing new
  • bun run build, then the headless Chrome tests of ui-std (--mute-audio) against dist: brand-uitest 43 passed, columns-uitest 19 passed, categories-uitest 19 passed, kbd-check 15 passed, where kbd-check drives the changed lines (ArrowDown, ArrowUp, PageDown, Tab and Shift+Tab out of the Columns panel, saved hidden columns and asset classes, filter focus and caret kept); each run ended 0 failed; console errors: none

@daggerok
daggerok merged commit 178d736 into main Oct 26, 2026
1 check passed
@daggerok
daggerok deleted the refactor/array-from-node-lists branch October 26, 2026 02:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant