Skip to content

feat(grid): improve column reorder auto-scroll - #1286

Open
ghiscoding wants to merge 2 commits into
masterfrom
bugfix/improve-auto-scroll
Open

feat(grid): improve column reorder auto-scroll#1286
ghiscoding wants to merge 2 commits into
masterfrom
bugfix/improve-auto-scroll

Conversation

@ghiscoding

Copy link
Copy Markdown
Collaborator

replicate Slickgrid-Universal PR 2772 into SlickGrid. You can see the included ChatGPT summary below.

Summary

Improve and simplify column reorder auto-scroll behavior while preserving existing drag, resize, frozen-column, pointer, and event handling.

Why

Large grids with many columns benefit from responsive horizontal scrolling when columns are dragged outside the viewport. The existing implementation also had opportunities to reduce duplicated state and simplify timer handling without changing supported behavior.

Changes

  • Simplified column reorder and resize auto-scroll state management.
  • Increased column reorder auto-scroll frequency from 100ms to 30ms while retaining the 10px scroll step.
  • Preserved direct direction reversal, safe-zone stopping, frozen-pane behavior, and missing-coordinate handling.
  • Simplified mouse, touch, and pointer interaction handling.
  • Added focused unit coverage for auto-scroll directions, stopping, reversal, frozen panes, resizing, and interaction callbacks.
  • Added Cypress auto-scroll coverage to:
    • Vanilla Example 33
    • Angular Example 44
    • Aurelia Example 44
    • React Example 44
    • Vue Example 44
  • Updated repository guidance to require 100% coverage for changed production code and adherence to the PR template.

Validation

  • Scoped Vitest run: 5,963 tests passed.
  • Changed production code has 100% statement, branch, function, and line coverage.
  • Common package TypeScript --noEmit check passed.
  • Vanilla Example 33 Cypress test passed in the Cypress UI.
  • Prettier checks passed.
  • Oxlint checks passed.
  • git diff --check passed.

Comments

The framework Example 44 Cypress tests were added but were not browser-run in this session.

The standalone Cypress TypeScript project check still reports pre-existing type errors in shared Cypress support files unrelated to this change.

Although the tests span the shared core and framework demos, they cover the single scope of column reorder auto-scroll behavior.

AI / LLM assistance

  • AI / LLM assistance used:
    • No
    • Yes
  • If Yes:
    • which tool/model: OpenAI Codex GPT-5.6 Luna
    • how was it used: Reviewed and simplified the implementation, added unit and Cypress coverage, and performed scoped validation.

Checklist

  • The changes are limited to only one scope (if not please explain why in the comments above).
  • Tests were added or updated where appropriate.
  • Documentation was updated where appropriate.
Screencast_20260827_212013.webm

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