Skip to content

intropage: fix page wheel-scroll over chart panels and Panel Details overflow - #429

Merged
TheWitness merged 1 commit into
developfrom
fix/page-and-details-scroll
Oct 22, 2026
Merged

TheWitness merged 1 commit into
developfrom
fix/page-and-details-scroll

Conversation

@TheWitness

Copy link
Copy Markdown
Member

Summary

Fixes two scrolling problems on the Intropage dashboard.

1. Page will not scroll with the mouse wheel over chart panels

resizeCharts() sized every chart as .panel_wrapper height − 30, a formula from the pre-card layout. Since the shared card chrome (#423), .panel_wrapper contains the 34px .ccCardHeader plus the padded .ccCardBody, so each chart rendered ~19px taller than its chart_wrapper and overflowed the card body. cards.css gives .ccCardBody overflow-x: auto, which implicitly makes overflow-y auto too, so every chart panel became a tiny nested scroller. A wheel gesture over it latched onto that scroller and the page did not move. The same formula also made pie/treemap charts (no fixed wrapper height) grow ~18px on every window resize.

  • includes/intropage.js: resizeCharts() keeps the chart's server-sized height ($(this).height()) and only adapts the width.
  • css/common.css: #panel_container .ccCardBody { overflow-y: hidden; }. Cards already grow to fit their content, so the body never needs its own vertical scroller.

2. Panel Details content spills into the Close button pane and cannot scroll

Themes such as deepness set .ui-dialog .ui-dialog-content { overflow: visible }, so long details overflowed the dialog under the button pane with no scrollbar.

  • css/common.css: .ui-dialog #overlay.ui-dialog-content { overflow: auto; clear: both; }. The clear: both is needed because, as deepness's own comment warns, overflow: auto creates a BFC that gets squeezed (to ~40px wide) beside the floated .ui-dialog-title, which overhangs the fixed 28px titlebar by 1px.
  • includes/intropage.js: cap the details dialog maxHeight to the viewport (Math.min(650, window height - 40)).

Testing

Reproduced and verified in a throwaway Cacti 1.2.32 install (deepness theme, 1380×768, 28 panels, 90 devices) driven through a real browser:

  • Before: a mouse wheel over Devices by Status / Poller Statistics / Poller Output Items / Boost History / CPU Utilization moved the page 0px (each card body was a 194/203px scroller). After: every panel scrolls the page; no nested vertical scrollers remain.
  • Before: five window resize events grew the Data Sources pie card to 510px. After: it stays at 229px.
  • Before: Analyze Cacti Objects details ran under the CLOSE pane, unscrollable. After: the content stops at the button pane and scrolls with the wheel.
  • Charts still render with their axes and legends intact.

No PHP changes; the CHANGELOG is updated.

…overflow

resizeCharts() sized every chart from .panel_wrapper height - 30, a formula
from the pre-card layout. .panel_wrapper now holds the 34px card header and
padded body, so charts came out ~19px taller than their chart_wrapper and
overflowed .ccCardBody. cards.css gives the body overflow-x: auto, which makes
overflow-y auto as well, so each chart panel became a tiny nested scroller
that captured the mouse wheel and the page would not scroll. Pie/treemap
charts (no fixed wrapper height) also grew ~18px on every window resize.

Keep the server-sized chart height, and stop card bodies from scrolling
vertically (cards already grow to fit their content).

Themes such as deepness force .ui-dialog-content to overflow: visible, so
long Panel Details content spilled under the Close button pane with no
scrollbar. Restore overflow: auto on the details dialog content (with
clear: both so the new BFC is not squeezed beside the floated title that
overhangs the fixed-height titlebar) and cap the dialog to the viewport.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings October 22, 2026 14:56
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Chart-height preservation depends on chart-library sizing behavior that remains unverified across supported Cacti versions and needs human confirmation.

No open issues 🎉

What changed in this PR

Fixes dashboard scrolling and Panel Details overflow following the shared card layout update.

Changes:

  • Preserves chart height during resizing to avoid nested scrolling and repeated chart growth.
  • Disables vertical scrolling within card bodies and restores scrolling inside the details dialog.
  • Caps the details dialog height to the viewport and documents the fixes.
File Description
includes/​intropage.js Preserves chart height and limits details dialog height.
css/​common.css Prevents card-body vertical scrolling and contains dialog overflow.
CHANGELOG.md Records both scrolling fixes.

Review effort: Balanced

@TheWitness
TheWitness merged commit d1ac581 into develop Oct 22, 2026
8 checks passed
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.

4 participants