Skip to content

dragtable v4.0.0 release: TypeScript declarations, CHANGELOG, and GitHub Actions CI/publish - #41

Draft
jebaird with Copilot wants to merge 6 commits into
masterfrom
copilot/research-web-component-conversion
Draft

dragtable v4.0.0 release: TypeScript declarations, CHANGELOG, and GitHub Actions CI/publish#41
jebaird with Copilot wants to merge 6 commits into
masterfrom
copilot/research-web-component-conversion

Conversation

Copilot AI commented Mar 17, 2026

Copy link
Copy Markdown

Completes the final step of the jQuery→Web Component conversion by wiring up everything needed to ship v4.0.0 as a proper npm package.

Build: TypeScript declaration generation

  • Added vite-plugin-dts to vite.config.ts — generates dist/dragtable.d.ts on every build, satisfying the existing "types" field in package.json
  • Set exports: 'named' to eliminate the named/default export warning in the UMD output
  • Explicitly declared formats: ['es', 'umd']

CHANGELOG.md

  • New file following Keep a Changelog / SemVer conventions
  • Documents all v4.0.0 additions, changes, and removals relative to v3; includes a v3.0.0 baseline entry

GitHub Actions

.github/workflows/ci.yml — runs on every push/PR to main/master:

  • typechecktestbuild → verifies all three dist artefacts are present (dragtable.js, dragtable.umd.js, dragtable.d.ts)
  • Job scoped to permissions: contents: read

.github/workflows/publish.yml — triggered on GitHub Release published:

  • Runs tests + build, then npm publish --provenance --access public via NPM_TOKEN secret

📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Co-authored-by: jebaird <280778+jebaird@users.noreply.github.com>
Copilot AI changed the title [WIP] Research converting to a web component Research: Web Component conversion analysis for dragtable Mar 17, 2026
Copilot AI requested a review from jebaird March 17, 2026 18:11
@jebaird

jebaird commented Mar 17, 2026

Copy link
Copy Markdown
Owner

@copilot move on to the next step

…ild, and demo page

Co-authored-by: jebaird <280778+jebaird@users.noreply.github.com>

Copilot AI commented Mar 17, 2026

Copy link
Copy Markdown
Author

@copilot move on to the next step

Implemented the Web Component in commit e53583c. The <drag-table> custom element is now fully functional with:

  • TypeScript implementation (~500 lines)
  • Vite build tooling (ES modules + UMD)
  • Demo page with examples
  • Full drag-and-drop column reordering
  • Event system (dragtable-start, dragtable-change, dragtable-stop)
  • order() API for programmatic control

Demo

Copilot AI changed the title Research: Web Component conversion analysis for dragtable Web Component conversion for dragtable Mar 17, 2026
@jebaird

jebaird commented Mar 17, 2026

Copy link
Copy Markdown
Owner

@copilot lets move on to the second step

…e-NodeList bug

Co-authored-by: jebaird <280778+jebaird@users.noreply.github.com>

Copilot AI commented Mar 17, 2026

Copy link
Copy Markdown
Author

@copilot lets move on to the second step

Added comprehensive tests in commit 2b0c99a — 47 Vitest tests covering:

  • Custom element registration & lifecycle (connectedCallback, disconnectedCallback)
  • observedAttributes / attributeChangedCallback for all 6 options
  • order() API (get by data-header / textContent fallback; set with multi-step reordering; chaining; no-ops)
  • Column swap mechanics (left, right, multi-step, boundary blocking)
  • All 4 events (dragtable-start, dragtable-beforechange cancelable, dragtable-change, dragtable-stop)
  • Drag display lifecycle (wrapper created/removed, placeholder class, cursor/userSelect)
  • Style injection (single injection, content checks)
  • Edge cases (no-table, tfoot, notdraggable class, early disconnect)

Tests also uncovered and fixed a real bug: _setOrder was capturing a static querySelectorAll snapshot once, so stale indices after the first swap caused subsequent iterations to reference the wrong columns. Fixed by re-querying the live DOM each iteration.

Co-authored-by: jebaird <280778+jebaird@users.noreply.github.com>
Copilot AI changed the title Web Component conversion for dragtable Web Component conversion for dragtable (v4): implementation, tests, and migration docs Mar 17, 2026
…/publish workflows

Co-authored-by: jebaird <280778+jebaird@users.noreply.github.com>
Copilot AI changed the title Web Component conversion for dragtable (v4): implementation, tests, and migration docs dragtable v4.0.0 release: TypeScript declarations, CHANGELOG, and GitHub Actions CI/publish Mar 17, 2026
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.

2 participants