Repository navigation
limit data viewer horizontal overscroll - #17616
Conversation
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
Automated review summaryReviewed by three specialized agents (general code review, silent-failure / error-handling, comment accuracy). Overall: the change is small, well-scoped, and correct. A handful of low-priority observations below — none blocking. Correctness (verified)
Comments — minor precision (non-blocking)
Defensive-programming suggestions (intentionally not raised)The silent-failure scan flagged adding try/catch around the new VerdictLGTM. Suggested follow-ups are presentation-level and optional. |
Reserve room for the rightmost column when computing the table's horizontal overscroll padding so it stays visible at maximum scroll; previously the user could scroll every unpinned column off-screen. Also sync paddingRight and the custom scrollbar thumb at the end of a column resize drag (applyResizeDelta intentionally skips these on every mousemove to avoid jank). Addresses #17612.
Drop the totalTableWidth > viewport.clientWidth gate so the overscroll padding is computed even when all columns fit in the viewport. This keeps horizontal scrolling consistently available regardless of how wide the table is relative to the viewport.
When every column is pinned (or no columns exist) there is no column to scroll into view, so the overscroll formula would add viewport.clientWidth - pinned.totalWidth of right padding for nothing, producing a phantom horizontal scrollbar and shrinking the body. getColumnOrder() places pinned columns before unpinned, so the last columnOrder entry being unpinned is sufficient to confirm an unpinned column exists. Gate the overscroll computation on that check; otherwise leave overscroll = 0.
5a24291 to
cfd16b7
Compare
* update BUILDTYPE to Release for Golden Wattle * archive NEWS for golden wattle (#17623) * trim "What's New" section for Golden Wattle release (#17629) * limit data viewer horizontal overscroll (#17616) * limit data viewer horizontal overscroll Reserve room for the rightmost column when computing the table's horizontal overscroll padding so it stays visible at maximum scroll; previously the user could scroll every unpinned column off-screen. Also sync paddingRight and the custom scrollbar thumb at the end of a column resize drag (applyResizeDelta intentionally skips these on every mousemove to avoid jank). Addresses #17612. * always allow horizontal overscroll in data viewer Drop the totalTableWidth > viewport.clientWidth gate so the overscroll padding is computed even when all columns fit in the viewport. This keeps horizontal scrolling consistently available regardless of how wide the table is relative to the viewport. * skip data viewer overscroll padding when no unpinned columns When every column is pinned (or no columns exist) there is no column to scroll into view, so the overscroll formula would add viewport.clientWidth - pinned.totalWidth of right padding for nothing, producing a phantom horizontal scrollbar and shrinking the body. getColumnOrder() places pinned columns before unpinned, so the last columnOrder entry being unpinned is sufficient to confirm an unpinned column exists. Gate the overscroll computation on that check; otherwise leave overscroll = 0. * add NEWS entry * data viewer: restore column count in status bar (#17617) * data viewer: restore column count in status bar Addresses #17613. The vanilla-JS data viewer rewrite dropped the column count from the info bar. Reword the info text to include it, and use "rows" instead of "entries" so it pairs cleanly with "columns". * data viewer: keep 'entries' wording in info bar * data viewer: restore 'total' qualifier in info bar text Reverts an unintended wording change that dropped 'total' from the column count, which broke the Playwright assertions in pagination-sorting.test.ts. Also adds 'entries' to the filtered suffix for clarity. * add NEWS entry * preserve top alignment of help argument names with r-devel (#17622) Broaden the <h3>Arguments</h3> match so it also handles the id attribute emitted by R >= 4.6.0 when the dynamic help server includes a table of contents (the default in r-devel). Without this, the r-arguments-title class is never added and the CSS rule that top-aligns argument names never applies. Addresses #17621. * add scripts/merge-release-branch.sh Wraps `git merge --no-ff -X no-renames <branch>` plus the post-merge fixups needed for a rel-* -> main merge: - Auto-resolve NEWS.md modify/delete by keeping main's version. - Auto-resolve version/news/os/NEWS-<ver>-<codename>.md add/add by taking the rel branch's content (which has any bug-fix entries added after the rotation). - Reset version/BUILDTYPE, version/RELEASE, version/CALENDAR_VERSION to HEAD's values to undo git's trivial-merge fast-take in cases where main has not modified the file (most notably BUILDTYPE, which silently flips Daily -> Release without intervention). Stages the merge but does not commit it -- the user reviews with `git diff --staged` and then runs `git commit`. The earlier attempt to handle BUILDTYPE via a `merge=ours` driver in .gitattributes does not work for this scenario: git only consults merge drivers for true three-way merges (where both sides modified the file), not for the one-sided trivial merge that BUILDTYPE actually hits. * restore main's full whats-new/golden-wattle/index.html The merge of rel-golden-wattle into main applied the trim from #17629, which curated the What's New content for the release announcement. Revert that on main so main retains the full pre-trim content; the trimmed version remains on the rel branch where it ships. --------- Co-authored-by: Skye Turriff <[email protected]> Co-authored-by: Gary Ritchie <[email protected]>
Intent
Addresses #17612.
Summary
paddingRightand the custom scrollbar thumb at the end of a column-resize drag.applyResizeDeltaintentionally skips this on every mousemove to avoid jank (200+ DOM writes plus several layout reads per frame); doing it once at end of drag is enough to keep the overscroll padding and scrollbar matched to the new column widths.Test plan
View(data.frame(matrix(1:1000000, nrow = 100000, ncol = 500))), scroll horizontally to the right edge, confirm the last column (X500) remains visible adjacent to the rownames column instead of scrolling out of sight.