Skip to content

refactor: give the frozen right header band its own width slack - #2718

Merged
ghiscoding merged 1 commit into
masterfrom
refactor/frozen-header-band-width
Aug 10, 2026
Merged

refactor: give the frozen right header band its own width slack#2718
ghiscoding merged 1 commit into
masterfrom
refactor/frozen-header-band-width

Conversation

@ghiscoding

@ghiscoding ghiscoding commented Aug 10, 2026

Copy link
Copy Markdown
Owner

verified by Copilot using GPT-5.3-Codex

Port bug fix from 6pac/SlickGrid PR 6pac/SlickGrid#1275 into slickgrid-universal

Warning

Stacked on 6pac/SlickGrid#1274 (this PR's base branch is refactor/headers-width-slack) — it uses the HEADER_WIDTH_SLACK constant and the scroll-sync pin spec introduced there. Please merge 6pac/SlickGrid#1274 first; GitHub will retarget this PR to master when that branch is deleted.

Resolves Q15 from the quirks triage (discussion 6pac/SlickGrid#1247): under a left freeze, the right header band's width was cumulativeheadersWidthR = max(sumR, viewportW) + headersWidthL — sizing the right band to include the entire left band's width for no stated reason.

Why it survived until now (the load-bearing part)

Every header band is built with left: -1000px on the columns container plus an injected .slick-header-column { left: 1000px; } rule, so each band's width must include 1000px of shift compensation or its columns overflow it. In the frozen path, the right band's compensation was delivered through headersWidthL (= sumL + slack) — which is why the triage classified Q15 as unknown-business-path and why a naive "drop the + headersWidthL" would genuinely break the right band (clipped header columns, scroll clamping short at full right scroll — the pin spec fails exactly there on the naive version).

The borrowed sumL on top of that compensation was the phantom part.

The change

One line: the right band now carries its own compensation —

this.headersWidthR = Math.max(this.headersWidthR, this.viewportW) + HEADER_WIDTH_SLACK;

The right header container gets sumL narrower (inert — it is clipped), and its post-offset extent becomes max(sumR + gutter, viewportW): exactly the regime the unfrozen band has always run in (its +1000 was likewise consumed by the -1000px offset all along). The frozen right band now matches that long-standing contract instead of exceeding it by an arbitrary, frozen-band-width-dependent margin.

This supersedes the triage's "defer normalization to the branch rework" position — the deferral existed because there was no safety net, and 6pac/SlickGrid#1274 pin spec is that net.

Validation

(With this and 6pac/SlickGrid#1274, every actionable width-arithmetic item from discussion 6pac/SlickGrid#1247 is resolved; Q14's shift-compensation slack is now named and documented, and the Q15 entry in the tracking notes moves from keep-as-is to normalized.)

🤖 Generated with Claude Code

@codecov

codecov Bot commented Aug 10, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 100.0%. Comparing base (8f19df5) to head (4802689).
⚠️ Report is 1 commits behind head on master.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #2718   +/-   ##
=======================================
  Coverage   100.0%   100.0%           
=======================================
  Files         200      200           
  Lines       25507    25507           
  Branches     9012     9012           
=======================================
  Hits        25507    25507           
Flag Coverage Δ
angular 100.0% <ø> (ø)
universal 100.0% <100.0%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pkg-pr-new

pkg-pr-new Bot commented Aug 10, 2026

Copy link
Copy Markdown
angular-slickgrid

npm i https://pkg.pr.new/angular-slickgrid@2718

aurelia-slickgrid

npm i https://pkg.pr.new/aurelia-slickgrid@2718

slickgrid-react

npm i https://pkg.pr.new/slickgrid-react@2718

slickgrid-vue

npm i https://pkg.pr.new/slickgrid-vue@2718

@slickgrid-universal/angular-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/angular-row-detail-plugin@2718

@slickgrid-universal/aurelia-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/aurelia-row-detail-plugin@2718

@slickgrid-universal/react-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/react-row-detail-plugin@2718

@slickgrid-universal/vue-row-detail-plugin

npm i https://pkg.pr.new/@slickgrid-universal/vue-row-detail-plugin@2718

@slickgrid-universal/binding

npm i https://pkg.pr.new/@slickgrid-universal/binding@2718

@slickgrid-universal/common

npm i https://pkg.pr.new/@slickgrid-universal/common@2718

@slickgrid-universal/composite-editor-component

npm i https://pkg.pr.new/@slickgrid-universal/composite-editor-component@2718

@slickgrid-universal/custom-footer-component

npm i https://pkg.pr.new/@slickgrid-universal/custom-footer-component@2718

@slickgrid-universal/custom-tooltip-plugin

npm i https://pkg.pr.new/@slickgrid-universal/custom-tooltip-plugin@2718

@slickgrid-universal/empty-warning-component

npm i https://pkg.pr.new/@slickgrid-universal/empty-warning-component@2718

@slickgrid-universal/event-pub-sub

npm i https://pkg.pr.new/@slickgrid-universal/event-pub-sub@2718

@slickgrid-universal/excel-export

npm i https://pkg.pr.new/@slickgrid-universal/excel-export@2718

@slickgrid-universal/graphql

npm i https://pkg.pr.new/@slickgrid-universal/graphql@2718

@slickgrid-universal/odata

npm i https://pkg.pr.new/@slickgrid-universal/odata@2718

@slickgrid-universal/pagination-component

npm i https://pkg.pr.new/@slickgrid-universal/pagination-component@2718

@slickgrid-universal/pdf-export

npm i https://pkg.pr.new/@slickgrid-universal/pdf-export@2718

@slickgrid-universal/row-detail-view-plugin

npm i https://pkg.pr.new/@slickgrid-universal/row-detail-view-plugin@2718

@slickgrid-universal/rxjs-observable

npm i https://pkg.pr.new/@slickgrid-universal/rxjs-observable@2718

@slickgrid-universal/sql

npm i https://pkg.pr.new/@slickgrid-universal/sql@2718

@slickgrid-universal/text-export

npm i https://pkg.pr.new/@slickgrid-universal/text-export@2718

@slickgrid-universal/utils

npm i https://pkg.pr.new/@slickgrid-universal/utils@2718

@slickgrid-universal/vanilla-bundle

npm i https://pkg.pr.new/@slickgrid-universal/vanilla-bundle@2718

@slickgrid-universal/vanilla-force-bundle

npm i https://pkg.pr.new/@slickgrid-universal/vanilla-force-bundle@2718

@slickgrid-universal/web-mcp

npm i https://pkg.pr.new/@slickgrid-universal/web-mcp@2718

commit: 4802689

@ghiscoding ghiscoding added the AI label Aug 10, 2026
@ghiscoding
ghiscoding merged commit b72f4c9 into master Aug 10, 2026
14 checks passed
@ghiscoding
ghiscoding deleted the refactor/frozen-header-band-width branch August 10, 2026 15:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant