Skip to content

fix/pin width updates#870

Merged
revolist merged 1 commit into
mainfrom
fix/pin-widths
May 26, 2026
Merged

fix/pin width updates#870
revolist merged 1 commit into
mainfrom
fix/pin-widths

Conversation

@revolist

@revolist revolist commented May 26, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes

    • Improved alignment handling for pinned columns in viewport scrolling to eliminate gaps between pinned and non-pinned column sections.
  • Tests

    • Added end-to-end tests validating pinned column behavior and alignment updates.

Review Change Stack

@revolist revolist self-assigned this May 26, 2026
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: 20f415f4-3049-4101-8da2-59d757400b07

📥 Commits

Reviewing files that changed from the base of the PR and between 1941241 and 34a6c75.

📒 Files selected for processing (2)
  • e2e/pinning.spec.ts
  • src/components/scroll/revogr-viewport-scroll.tsx

Walkthrough

This PR fixes a viewport scroll width calculation bug affecting pinned columns and adds E2E tests to validate the alignment. The viewport scroll component now treats pinned-start and pinned-end columns differently when computing physical content width, and new E2E helpers verify that pinned cells remain horizontally aligned with regular cells after dynamic column updates.

Changes

Pinned column gap alignment

Layer / File(s) Summary
Viewport scroll width calculation for pinned columns
src/components/scroll/revogr-viewport-scroll.tsx
The physicalContentWidth computation now bypasses getContentSize for pinned-start and pinned-end columns, using contentWidth directly; for other columns it computes via getContentSize with safe optional chaining to horizontalScroll?.clientWidth.
E2E validation of pinned column gap alignment
e2e/pinning.spec.ts
Adds E2EPage type import and introduces expectNoPinnedStartGap helper that verifies alignment via polling bounding-box comparison. A new E2E test mounts a grid with two pinned-start columns, removes the first pinned column via page.evaluate, and validates both cell content updates and pinned-start gap alignment before and after the column change.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • revolist/revogrid#864: Both PRs modify e2e/pinning.spec.ts to validate pinned-column start alignment behavior during column pinning changes, with the main PR adding new pinned-start gap/alignment checks directly related to the same pinning regression.
  • revolist/revogrid#832: Both PRs extend pinned-column E2E coverage in e2e/pinning.spec.ts with alignment validation logic and dynamic column-update assertions.

Suggested labels

bug

Suggested reviewers

  • m2a2x

Poem

🐰 A viewport scrolls so neat,
Pinned columns stay aligned and sweet,
No gap shall mar their perfect frame,
The test confirms they're all the same! ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'fix/pin width updates' directly and specifically describes the main change: fixing how pinned column widths are calculated and updated in the viewport scroll component.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/pin-widths

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.

@revolist revolist added the bug Something isn't working label May 26, 2026
@sonarqubecloud

Copy link
Copy Markdown

@revolist revolist merged commit ecd87ca into main May 26, 2026
8 checks passed
@revolist revolist deleted the fix/pin-widths branch May 26, 2026 21:32
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