Skip to content

UI: Fix z-index problem with popovers and modals nesting#33757

Merged
ndelangen merged 2 commits intonextfrom
norbert/fix-modal-in-popover
Feb 3, 2026
Merged

UI: Fix z-index problem with popovers and modals nesting#33757
ndelangen merged 2 commits intonextfrom
norbert/fix-modal-in-popover

Conversation

@ndelangen
Copy link
Copy Markdown
Member

@ndelangen ndelangen commented Feb 3, 2026

What I did

I fixed a z-index issue relating to the Popover and Modal components; when opening a modal from a popover, due to the hard-coded x-indexs, the popover would appear over the underlay, and not be blurred.

This PR is a follow up to this commit: 72d2c2f, which did the brunt of the work but was pushed to next directly by accident.

Checklist for Contributors

Testing

The changes in this PR are covered in the following automated tests:

  • stories
  • unit tests
  • integration tests
  • end-to-end tests

Manual testing

Caution

This section is mandatory for all contributions. If you believe no manual test is necessary, please state so explicitly. Thanks!

Documentation

  • Add or update documentation reflecting your changes
  • If you are deprecating/removing a feature, make sure to update
    MIGRATION.MD

Checklist for Maintainers

  • When this PR is ready for testing, make sure to add ci:normal, ci:merged or ci:daily GH label to it to run a specific set of sandboxes. The particular set of sandboxes can be found in code/lib/cli-storybook/src/sandbox-templates.ts

  • Make sure this PR contains one of the labels below:

    Available labels
    • bug: Internal changes that fixes incorrect behavior.
    • maintenance: User-facing maintenance tasks.
    • dependencies: Upgrading (sometimes downgrading) dependencies.
    • build: Internal-facing build tooling & test updates. Will not show up in release changelog.
    • cleanup: Minor cleanup style change. Will not show up in release changelog.
    • documentation: Documentation only changes. Will not show up in release changelog.
    • feature request: Introducing a new feature.
    • BREAKING CHANGE: Changes that break compatibility in some way with current major version.
    • other: Changes that don't fit in the above categories.

🦋 Canary release

This PR does not have a canary release associated. You can request a canary release of this pull request by mentioning the @storybookjs/core team here.

core team members can create a canary release here or locally with gh workflow run --repo storybookjs/storybook publish.yml --field pr=<PR_NUMBER>

Summary by CodeRabbit

  • Refactor
    • Restructured internal component examples in Popover documentation to improve code organization and clarity.

@ndelangen ndelangen changed the title fix a minor zindex problem with popovers and modals nesting UI: Fix z-index problem with popovers and modals nesting Feb 3, 2026
@ndelangen ndelangen self-assigned this Feb 3, 2026
@ndelangen ndelangen marked this pull request as ready for review February 3, 2026 09:06
@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Feb 3, 2026

View your CI Pipeline Execution ↗ for commit e8d62a2

Command Status Duration Result
nx run-many -t compile,check,knip,test,pretty-d... ✅ Succeeded 6m 12s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-03 09:14:29 UTC

@nx-cloud
Copy link
Copy Markdown

nx-cloud bot commented Feb 3, 2026

View your CI Pipeline Execution ↗ for commit e8d62a2

Command Status Duration Result
nx run-many -t compile,check,knip,test,pretty-d... ✅ Succeeded 6m 12s View ↗

☁️ Nx Cloud last updated this comment at 2026-02-03 09:14:26 UTC

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Feb 3, 2026

📝 Walkthrough

Walkthrough

Refactored the WithModal story in the Popover component by removing an internal PopoverWithModal component and inlining its modal-triggering UI directly within the popover content. Updated the associated state management and test behavior to match the new structure.

Changes

Cohort / File(s) Summary
Popover Story Refactoring
code/core/src/components/components/Popover/Popover.stories.tsx
Removed internal PopoverWithModal component. Inlined modal-triggering UI in WithModal story's popover content. Changed isPopoverOpen to a constant; added isModalOpen state for modal control. Updated test/play behavior to click the new inline "Open modal" button.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

✨ Finishing touches
  • 📝 Generate docstrings

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

@ndelangen ndelangen merged commit 202ad18 into next Feb 3, 2026
124 checks passed
@ndelangen ndelangen deleted the norbert/fix-modal-in-popover branch February 3, 2026 11:16
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