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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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

);

const PopoverContentBody = (props: PopoverContentProps) => {
Expand Down
Loading