Skip to content

fix(core): remove layout boxes from closed popovers - #438

Merged
johnyanarella merged 1 commit into
mainfrom
topic/fix-closed-popover-layout
Oct 23, 2026
Merged

johnyanarella merged 1 commit into
mainfrom
topic/fix-closed-popover-layout

Conversation

@johnyanarella

@johnyanarella johnyanarella commented Oct 22, 2026 •

Copy link
Copy Markdown
Collaborator

Summary by CodeRabbit

  • Bug Fixes
    • Closed dropdowns and popovers no longer occupy layout space, even when custom display styling is applied. Menus leave the layout after closing transitions finish.
    • Cascading menus keep the parent visible when a child menu opens or closes. Closing a child removes it from the layout without closing the parent.
    • Hiding a popover restores focus to its trigger.
    • Inline notifications retain their expected layout when using shared popover styles.

@coderabbitai

coderabbitai Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
📥 Commits

Reviewing files that changed from the base of the PR and between e20739c and 588aaf7.

📒 Files selected for processing: 1
  • projects/core/src/dropdown-group/dropdown-group.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 10 remain after this review.

📝 Walkthrough

Closed popover hosts now use display: none !important. Tests cover layout visibility across popover states and dropdown interactions. A Storybook example compares forced-layout timings before and after opening and dismissing 64 dropdowns.

Changes: Popover layout visibility

Layer / File(s) Summary
Closed-state styling and state coverage
projects/core/src/internal/styles/popover.css, projects/core/src/internal/controllers/type-native-popover.controller.test.ts, projects/core/src/notification/notification.test.ts
Closed popover hosts receive display: none !important. Controller tests check layout across open, closed, transition, hydration, and trigger states. The inline notification test checks that it has no popover attribute and has one client rect.
Dropdown interaction coverage
projects/core/src/dropdown/dropdown.test.ts, projects/core/src/dropdown-group/dropdown-group.test.ts
Dropdown tests check layout visibility after outside clicks, trigger activation, focus restoration, and cascading-menu navigation.
Closed-popover layout benchmark
projects/core/src/dropdown/dropdown.examples.ts
The ClosedPopoverLayout example compares forced-layout timings before and after opening and dismissing 64 dropdowns. It disables the run button during measurement and restores it afterward.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Bug fix

Merge Risk: ⚪ Minimal · up to 588aa

The PR is mergeable with normal checks; no concrete regression is identified.

Pre-merge checks: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title "fix(core): remove layout boxes from closed popovers" matches the main change. The CSS rule sets closed popovers to display: none !important, and the tests assert that closed and hidden popo…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title "fix(core): remove layout boxes from closed popovers" matches the main change. The CSS rule sets closed popovers to display: none !important, and the tests assert that closed and hidden popovers have no client rects. The title is specific, concise, and follows the conventional commit style used in the repository.

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

🔧 ESLint

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

projects/core/src/dropdown-group/dropdown-group.test.ts

ESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox.

Comment @coderabbitai help to get the list of available commands.

@cursor

cursor Bot commented Oct 22, 2026

Copy link
Copy Markdown

Rollouts can't watch this change after it deploys: no deployment from NVIDIA/elements has reached Rollouts yet. Connect this repository's deployments, or ask a team admin to.

@johnyanarella
johnyanarella force-pushed the topic/fix-closed-popover-layout branch from a72ef0f to e20739c Compare October 22, 2026 19:49
Signed-off-by: John Yanarella <jyanarella@nvidia.com>
@johnyanarella
johnyanarella force-pushed the topic/fix-closed-popover-layout branch from e20739c to 588aaf7 Compare October 22, 2026 20:39
@github-code-quality

Copy link
Copy Markdown

Code coverage overview

Languages: TypeScript

TypeScript / code-coverage/vitest

main ca5c60a topic/fix-closed-pop... 588aaf7 +/-
99% 99% 0%
View coverage of the 1 most impacted file.
File main ca5c60a topic/fix-closed-pop... 588aaf7 +/-
projects/intern...option.utils.ts 100% 92% -8%

ℹ️ Calculations represent line coverage. Results may change as calculations are updated.

@johnyanarella
johnyanarella merged commit e7e89ac into main Oct 23, 2026
17 checks passed
@johnyanarella
johnyanarella deleted the topic/fix-closed-popover-layout branch October 23, 2026 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants