Skip to content

Fix/reports drag resize#69

Merged
WhiteMuush merged 9 commits into
mainfrom
fix/reports-drag-resize
Jun 19, 2026
Merged

Fix/reports drag resize#69
WhiteMuush merged 9 commits into
mainfrom
fix/reports-drag-resize

Conversation

@WhiteMuush

@WhiteMuush WhiteMuush commented Jun 19, 2026

Copy link
Copy Markdown
Owner

Summary

Type of change

  • feat: new feature
  • fix: bug fix
  • chore: maintenance / dependencies
  • docs: documentation
  • refactor: code refactor

Checklist

  • My code follows the project conventions
  • I have tested my changes
  • Related issue: Closes #

Feed each section's content-fit row count to RGL as minH so the
resize handle stops at the content floor instead of snapping back.
Mirror the height floor for width: record each section's content-fit
column count and feed it to RGL as minW.
Section was h-full, so the measured node always reported the cell
height and the tile could never shrink below DEFAULT_H, leaving dead
space below short content. Measure the section's intrinsic height and
let height auto-fit (grow and shrink).
The ResizeObserver watched the cell-sized node whose height fitHeights
drives, so auto-shrink fed back into an infinite update loop. Observe
the intrinsic section element instead.
Auto-fit toggled the report-root scrollbar, jittering the grid width
and feeding back into a resize loop. Reserve a stable scrollbar gutter
and round/dedupe the measured width.
Auto-fit height fed ResizeObserver loops (cell height and scrollbar
jitter). Back to grow-only height with hard min floors.
The height floor was read from the cell-filling node, so scrollHeight
equalled the cell height and a manual grow raised the floor, locking the
tile at its new size. Measure a natural-height probe inside the section
instead, so the floor tracks the content and the tile can shrink back to
it. Drop the width floor (reflow content has no reliable intrinsic min);
width stays freely resizable down to MIN_W.
Each report section is now a CSS query container, so its content adapts
to the widget width (not the viewport). When a tile is made narrow,
non-essential bits drop out and only the essentials remain:

- StatCard grids (Exposure, Compliance) stack instead of staying 4-wide
- Tables hide secondary columns (Share, Employees, Department, Last
  detected, breach Source) and the email subline / progress bars
- Essentials kept: identifiers, primary counts, risk, exposure rate

Adds the @tailwindcss/container-queries plugin (min-width @ variants).
On load every tile now shrinks to its content height (no dead space),
while still allowing manual resize down to the content floor and up.
Safe from the earlier resize loops: height is measured from the
intrinsic probe (not the cell), and report-root reserves a stable
scrollbar gutter so the shrink cannot jitter the grid width.
@WhiteMuush WhiteMuush merged commit 8797245 into main Jun 19, 2026
10 of 11 checks passed
@WhiteMuush WhiteMuush deleted the fix/reports-drag-resize branch June 19, 2026 12:52
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.

1 participant