Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(js): Increase inbox z index #7941

Open
wants to merge 1 commit into
base: next
Choose a base branch
from
Open

fix(js): Increase inbox z index #7941

wants to merge 1 commit into from

Conversation

desiprisg
Copy link
Contributor

What changed? Why was the change needed?

Screenshots

Expand for optional sections

Related enterprise PR

Special notes for your reviewer

Copy link

netlify bot commented Mar 18, 2025

Deploy Preview for dashboard-v2-novu-staging canceled.

Name Link
🔨 Latest commit 050fedf
🔍 Latest deploy log https://app.netlify.com/sites/dashboard-v2-novu-staging/deploys/67d8b9c93aed8f00083019e6

@@ -9,7 +9,7 @@ import { usePopover } from './PopoverRoot';
export const popoverContentVariants = () =>
cn(
'nt-w-[400px] nt-h-[600px] nt-rounded-xl nt-bg-background',
'nt-shadow-popover nt-animate-in nt-slide-in-from-top-2 nt-fade-in nt-z-10 nt-cursor-default nt-flex nt-flex-col nt-overflow-hidden nt-border nt-border-border'
'nt-shadow-popover nt-animate-in nt-slide-in-from-top-2 nt-fade-in nt-z-[9999] nt-cursor-default nt-flex nt-flex-col nt-overflow-hidden nt-border nt-border-border'
Copy link
Contributor

Choose a reason for hiding this comment

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

@desiprisg isn't that a bit too much, meaning the Inbox will go over a modal?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This would be our custom popover. If it's open, i don't see why a modal would be open at the same time. However, we need to have a value that will surely be above any headers/sidebars an app might have.

Copy link
Contributor

Choose a reason for hiding this comment

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

Any guess is arbitrary cause the z-index is arbitrary. I wonder if we can find a heuristic to detect the header container and always do z-index of that container + 10.

Copy link
Contributor

Choose a reason for hiding this comment

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

why do we have to increase z-index? shouldn't it be always on the top of everything rn?
like the way it's rendered in the dom tree is that it's always rendered at the bottom of the body element

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Devs might have a z-index set on their elements. it doesn't work this way.

Copy link
Contributor

@LetItRock LetItRock Mar 25, 2025

Choose a reason for hiding this comment

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

If we can create an independent stacking context from the root then we won't need to bother about it. But I wasn't able to do that quickly, it always falls under the parent. Played here: https://codepen.io/LetItRock/pen/emYjRWX

@SokratisVidros
Copy link
Contributor

@desiprisg Are we keeping this afterall?

@desiprisg
Copy link
Contributor Author

@desiprisg Are we keeping this afterall?

imo yes

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