Skip to content

hotfix/on resize issue#873

Merged
revolist merged 1 commit into
mainfrom
hotfix/resize-issue
May 27, 2026
Merged

hotfix/on resize issue#873
revolist merged 1 commit into
mainfrom
hotfix/resize-issue

Conversation

@revolist

@revolist revolist commented May 27, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes

    • Improved grid responsiveness during viewport resize operations
    • Enhanced scroll parameter handling for better viewport management
  • Tests

    • Added comprehensive end-to-end test coverage for grid virtualization and horizontal overflow scenarios
  • Chores

    • Updated framework packages and format submodules to latest versions

Review Change Stack

@revolist

Copy link
Copy Markdown
Owner Author

@codex review

@revolist revolist added the bug Something isn't working label May 27, 2026
@coderabbitai

coderabbitai Bot commented May 27, 2026

Copy link
Copy Markdown

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 50110fb7-9cd6-43b5-b538-0e620ae57996

📥 Commits

Reviewing files that changed from the base of the PR and between 8b98a9e and f5f3297.

📒 Files selected for processing (12)
  • docs
  • e2e/virtualization.spec.ts
  • formats/date
  • formats/number
  • formats/select
  • packages/angular
  • packages/react
  • packages/svelte
  • packages/vue2
  • packages/vue3
  • src/components/revoGrid/viewport.resize.service.ts
  • src/components/scroll/revogr-viewport-scroll.tsx

Walkthrough

This PR fixes viewport resize behavior by ensuring scroll service parameters are synchronized when viewport dimensions change, while preventing memory leaks from pending throttled resize callbacks. An e2e test validates the grid remains properly scrolled after resize operations.

Changes

Viewport Resize and Scroll Synchronization

Layer / File(s) Summary
Resize service throttle cleanup
src/components/revoGrid/viewport.resize.service.ts
GridResizeService.destroy() now cancels pending throttled apply callbacks before disconnecting ResizeObserver, preventing dangling async operations during teardown.
Scroll parameter synchronization during resize and render
src/components/scroll/revogr-viewport-scroll.tsx
RevogrViewportScroll updates LocalScrollService scroll parameters with calculated rgRow/rgCol sizes during resize callbacks and componentDidRender, ensuring scroll visibility calculations use current viewport measurements instead of stale values.
E2E virtualization resize test
e2e/virtualization.spec.ts
New Playwright test validates grid behavior when resized: mounts overflow grid, scrolls to last row, resizes viewport, and asserts the last row cell remains visible in the viewport after resize.

Submodule Updates

Layer / File(s) Summary
Submodule pointer updates
docs, formats/date, formats/number, formats/select, packages/angular, packages/react, packages/svelte, packages/vue2, packages/vue3
Routine submodule reference updates to pull latest commits from framework packages and documentation subprojects.

Sequence Diagram

sequenceDiagram
  participant GridResizeService
  participant RevogrViewportScroll
  participant LocalScrollService
  GridResizeService->>RevogrViewportScroll: emit resize update with new sizes
  RevogrViewportScroll->>RevogrViewportScroll: calculate rgRow/rgCol from viewport
  RevogrViewportScroll->>LocalScrollService: setScrollParams with new client sizes
  RevogrViewportScroll->>RevogrViewportScroll: recalculate scroll visibility
  RevogrViewportScroll->>RevogrViewportScroll: emit per-dimension resize events
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Possibly related PRs

  • revolist/revogrid#871: Modifies the same revogr-viewport-scroll.tsx file to adjust how viewport/scroll parameters are derived during render lifecycle.
  • revolist/revogrid#722: Changes the same resize service throttling/teardown behavior and viewport scroll-parameter updates in the scrolling component.
  • revolist/revogrid#870: Updates revogr-viewport-scroll.tsx viewport sizing logic and scroll parameter computation for pinned columns.

Suggested labels

bug

Suggested reviewers

  • m2a2x

Poem

🐰 When grids resize and scroll goes wild,
We throttle clean and params aligned—
The viewport stays, the tests run true,
A fuzzy fix for me and you! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch hotfix/resize-issue

Warning

There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

ESLint skipped: no ESLint configuration detected in root package.json. To enable, add eslint to devDependencies.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@sonarqubecloud

Copy link
Copy Markdown

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@revolist revolist merged commit ef4d503 into main May 27, 2026
7 of 8 checks passed
@revolist revolist deleted the hotfix/resize-issue branch May 27, 2026 12:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants