Skip to content

fix: preserve page scrolling over popups - #4353

Merged
StekPerepolnen merged 8 commits into
ydb-platform:mainfrom
StekPerepolnen:fix/hover-popup-scroll-container
Sep 14, 2026
Merged

StekPerepolnen merged 8 commits into
ydb-platform:mainfrom
StekPerepolnen:fix/hover-popup-scroll-container

Conversation

@StekPerepolnen

@StekPerepolnen StekPerepolnen commented Sep 14, 2026 •

Copy link
Copy Markdown
Contributor

Wheel scrolling over a popup should continue scrolling the surrounding page. Place the portal in the nearest scrollable ancestor of its anchor so the browser handles wheel scrolling naturally, whether that ancestor contains a table or other page content. Document scrolling retains the default portal; native fullscreen and the app’s active .ydb-fullscreen_fullscreen overlay stay within their boundaries, including when the content has no vertical overflow.

The shared HoverPopup and ContentWithPopup use one small DOM helper. Both popup components use fixed positioning so constrained scroll containers do not clip their content. Explicit ContentWithPopup containers and positioning strategies still take precedence. Popup dimensions and overflow are unchanged. Portals explicitly retain the Gravity body font instead of inheriting the embedded page’s Rubik font; caller-provided floating styles still take precedence. No table context, height calculations, or internal popup scrollbars are introduced.

One new E2E test covers PDisk and VDisk popup scrolling using existing fixtures. A focused Jest file covers document-default and fullscreen container selection, plus ContentWithPopup rendering through the selected or explicitly overridden portal. No new fixture files.

Validation:

  • Typecheck and lint passed (existing warnings only); 218 unit suites / 1930 tests passed.
  • Embedded and package builds passed.
  • Chromium and Safari, retries disabled: disk scrolling, existing paired-popup viewport checks, and a temporary database CPU-pool popup check passed (6 cases). The temporary database test is excluded from this PR.
  • Eight affected expander checks passed in Chromium and Safari with fix: match nodes virtualization height to the pdisks column #4351 and this fix temporarily applied; temporary changes were removed afterward.
  • Downstream package-consumer applications were not run separately.

CI regression follow-up:

  • Existing VDisk and PDisk Linux screenshots plus popup scrolling and viewport checks: 8 passed in Chromium and Safari, retries disabled, without updating snapshots or tolerances.
  • The PaginatedTable middle-scroll test also fails with the popup changes removed: its data wait can complete before the virtualized rows update. This independent test synchronization issue is excluded from this PR.

RetriggerConfidence Score: 4/5

Safe to merge; the remaining test-coverage concern is non-blocking.

Fix All in CodexFindings

  1. P2 Cover portal paths ▶
Fix with agent prompt
### Issue 1
src/components/HoverPopup/getPopupScrollContainer.ts:8-15
The retained test exercises only the scrollable `.ydb-cluster` path through `HoverPopup`. Add regression coverage for the document-default and fullscreen branches here, as well as `ContentWithPopup` passing the selected container to `Popup`. This is a non-blocking concern, but without those tests a later change can silently break popup placement or wheel behavior outside the storage-cluster view.

Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!

---

For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.

Summary

  • Adds shared popup portal-container selection for scrollable ancestors, fullscreen containers, and the document default.
  • Applies the helper to both HoverPopup and ContentWithPopup.
  • Adds storage-page browser coverage for wheel scrolling over disk popups.
  • The document, fullscreen, and ContentWithPopup portal paths have no retained regression coverage.

Reviews (1) · Last reviewed commit: "fix: preserve popup typography inside pa..."

Custom fullscreen follow-up: one production condition recognizes the active app fullscreen boundary even without overflowing content. Test files are unchanged. Typecheck, lint, all 1930 unit tests, and both builds passed. Existing Linux popup checks: 7 passed initially; one timed out waiting for storage/groups before opening the popup and passed in a separate rerun with retries disabled.

@StekPerepolnen StekPerepolnen changed the title fix: keep hover popup scrolling in the anchor scroll container fix: keep table hover popups in their scroll container Sep 14, 2026
@StekPerepolnen StekPerepolnen changed the title fix: keep table hover popups in their scroll container fix: keep popup wheel scrolling in the main table Sep 14, 2026
@StekPerepolnen StekPerepolnen changed the title fix: keep popup wheel scrolling in the main table fix: preserve page scrolling over popups Sep 14, 2026
@StekPerepolnen
StekPerepolnen marked this pull request as ready for review September 14, 2026 12:17
Copilot AI lite review requested due to automatic review settings September 14, 2026 12:17

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.

🟡 Changes recommended

The scroll-container helper needs a fallback for the app’s custom fullscreen boundary.

Get a fresh assessment by requesting another Copilot review.

Pull request overview

Updates popup portals to preserve page scrolling while maintaining popup styling and fullscreen behavior.

Changes:

  • Detects nearest scrollable ancestors for popup portals.
  • Preserves Gravity typography and caller-provided styles.
  • Adds PDisk/VDisk popup scrolling coverage.
File summaries
File Summary
tests/suites/storage/vdiskColoring.test.ts Adds popup scrolling E2E coverage.
src/components/HoverPopup/HoverPopup.tsx Applies scroll-container and font styling.
src/components/HoverPopup/getPopupScrollContainer.ts Finds popup scroll boundaries.
src/components/ContentWithPopup/ContentWithPopup.tsx Reuses shared portal placement and styling.
Review details
  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread src/components/HoverPopup/getPopupScrollContainer.ts
Comment thread src/components/HoverPopup/getPopupScrollContainer.ts

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

App fullscreen overlays may allow popups to escape to document.body; the fullscreen fallback should be addressed.

Review details

Suppressed comments (1)

src/components/HoverPopup/getPopupScrollContainer.ts:11

  • The app's fullscreen mode is not the browser Fullscreen API: Fullscreen moves its portal under the .ydb-fullscreen_fullscreen overlay, so document.fullscreenElement remains unset. If that overlay's .ydb-fullscreen__content is not vertically overflowing, this loop falls through to undefined and portals the popup to document.body, allowing it to escape the app fullscreen boundary. Treat the app fullscreen overlay as a fallback boundary as well as the native fullscreen element.
            parent === doc.fullscreenElement ||
            (/auto|scroll/.test(doc.defaultView?.getComputedStyle(parent).overflowY ?? '') &&
                parent.scrollHeight > parent.clientHeight)
  • Files reviewed: 5/5 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

@Raubzeug Raubzeug 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.

Found one clipping edge case in ContentWithPopup; details inline. The three focused Jest cases and four disk-popup E2E cases passed (Chromium and WebKit, retries disabled).

Comment thread src/components/ContentWithPopup/ContentWithPopup.tsx
@StekPerepolnen
StekPerepolnen added this pull request to the merge queue Sep 14, 2026
Merged via the queue into ydb-platform:main with commit 7071af0 Sep 14, 2026
14 of 15 checks passed
@StekPerepolnen
StekPerepolnen deleted the fix/hover-popup-scroll-container branch September 14, 2026 14:04
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.

3 participants