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

[3578] Fix tooltip and menu visibility in a full screen mode #3867

Merged
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions CHANGELOG.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ This may have some consequences for downstream applications which are embedding
- https://github.com/eclipse-sirius/sirius-web/issues/4366[#4366] [form] Fix a warning in the reference widget
- https://github.com/eclipse-sirius/sirius-web/issues/4343[#4343] [table] Fix an issue where filters were reset on table opening
- https://github.com/eclipse-sirius/sirius-web/issues/4311[#4311] [table] Fix typos in table variables
- https://github.com/eclipse-sirius/sirius-web/issues/3578[#3578] [diagram] Fix tooltip and menu visibility in a full screen mode.
See https://github.com/mui/material-ui/issues/15618[this link] for additional details.

=== New Features

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2024 Obeo.
* Copyright (c) 2023, 2025 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -69,6 +69,10 @@ export const baseTheme: Theme = createTheme({
},
});

const container = () => {
return document.fullscreenElement ?? document.body;
};

export const siriusWebTheme = createTheme(
{
components: {
Expand All @@ -79,7 +83,17 @@ export const siriusWebTheme = createTheme(
},
},
},
MuiMenu: {
defaultProps: {
container,
},
},
MuiTooltip: {
defaultProps: {
PopperProps: {
container,
},
},
styleOverrides: {
tooltip: {
backgroundColor: baseTheme.palette.common.black,
Expand Down
16 changes: 15 additions & 1 deletion vscode-extension/src/view/app/theme/siriusWebTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2023, 2024 Obeo.
* Copyright (c) 2023, 2025 Obeo.
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v2.0
* which accompanies this distribution, and is available at
Expand Down Expand Up @@ -69,6 +69,10 @@ export const baseTheme: Theme = createTheme({
},
});

const container = () => {
return document.fullscreenElement ?? document.body;
};

export const siriusWebTheme = createTheme(
{
components: {
Expand All @@ -79,7 +83,17 @@ export const siriusWebTheme = createTheme(
},
},
},
MuiMenu: {
defaultProps: {
container,
},
},
MuiTooltip: {
defaultProps: {
PopperProps: {
container,
},
},
styleOverrides: {
tooltip: {
backgroundColor: baseTheme.palette.common.black,
Expand Down
Loading