-
Notifications
You must be signed in to change notification settings - Fork 25
fix: added z-index to mode help tooltip and z-index system (issue #298) #544
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
base: main
Are you sure you want to change the base?
fix: added z-index to mode help tooltip and z-index system (issue #298) #544
Conversation
Preview is ready. |
|
||
.tooltip { | ||
@include mixins.z-index('forefront'); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add to docs plz too
src/styles/_zindex.scss
Outdated
'img-settings-button': 2, | ||
'table-view-button': 100, | ||
'table-cell-button': 110, | ||
'sticky-toolbar': 990, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- header sticky toolbar+
- header sticky toolbar
- context toolbar+ (popups, hints)
- context toolbar
- suggest popup+ (for hints), (
...
buttons menu) - suggest popup
- block panel popup
context is popup from text selection
suggest is /
, :
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if you need to change z-index in uikit component use style https://github.com/gravity-ui/uikit/blob/main/src/components/types.ts#L4C5-L4C27
like this:
style={{
// ...otherStyles,
zIndex: var(--md-editor-z-index-level-suggest);
}}
…into fix/tooltip-hidden-under-toolbar
…/dpolevodin/markdown-editor into fix/tooltip-hidden-under-toolbar
@dpolevodin could you please outline the steps you believe we should take to solve the task at this stage? |
|
The second part. It is necessary to work out the solution for layers. In general, I see two options:
.tooltip {
@include mixins.z-index('forefront');
}
// Modal.tsx export const Modal: React.FC = ({ children }) => { useEffect(() => { return (
In my opinion, the second option has a complicated logic, in itself can affect the performance due to calling additional hooks on the UI and setting zIndex via style and, possibly, cause additional problems. Although it may look like a more dynamic and flexible solution. Perhaps you will have even better suggestions :) |
Steps to solve the issue:
|
@dpolevodin lets collect test cases with screenshots of many open popups/tooltips to determine zIndex values and identify possible problems with incorrect layer order |
Visual Tests Report is ready. |
@makhnatkin Hi! yes, this is the next step. I will collect it soon |
… to PopoverProps in HelpMark
@makhnatkin I merged main branch to the working branch, upped @gravity-ui/uikit version to latest and added zIndex prop to PopoverProps in HelpMark to fix the error with sticky toolbar overlay over the popover
|
a08425b
to
0e1415c
Compare
fixes #298
z-index for the sticky-toolbar has been lowered from 2000 to 990, since the HelpMark tooltip index is set to 1000 in uikit
Added z-index system and updated readme.
Changed current z-index values in project by z-index mixin