Skip to content

Commit

Permalink
Show Tooltips only when drawer is minimized (#140)
Browse files Browse the repository at this point in the history
* Show Tooltips only when drawer is minimized

Signed-off-by: Snehil Shah <[email protected]>

* Fix Failing ESLint `Audit` Workflow

Signed-off-by: Snehil Shah <[email protected]>

---------

Signed-off-by: Snehil Shah <[email protected]>
  • Loading branch information
Snehil-Shah authored Feb 16, 2024
1 parent 3119264 commit f036023
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 17 deletions.
4 changes: 2 additions & 2 deletions src/components/Sidebar/Sidebar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export default function Sidebar({ open, version }) {
<Divider />
<List>
<ListItem key={'Console'} disablePadding sx={{ display: 'block' }}>
<Tooltip title={'Console'} placement={'right'} arrow={true}>
<Tooltip title={'Console'} placement={'right'} arrow={true} disableHoverListener={open}>
<ListItemButton
sx={{
minHeight: 48,
Expand All @@ -88,7 +88,7 @@ export default function Sidebar({ open, version }) {
</Tooltip>
</ListItem>
<ListItem key={'Collections'} disablePadding sx={{ display: 'block' }}>
<Tooltip title={'Collections'} placement={'right'} arrow={true}>
<Tooltip title={'Collections'} placement={'right'} arrow={true} disableHoverListener={open}>
<ListItemButton
sx={{
minHeight: 48,
Expand Down
28 changes: 13 additions & 15 deletions src/components/Sidebar/SidebarTutorialSection.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,18 @@ const TutorialsList = tutorialSubPages.map((page) => {
const [slug, pageObject] = page;
return (
<ListItem key={slug} disablePadding sx={{ display: 'block' }}>
<Tooltip title={pageObject.title} placement={'right'} arrow={true}>
<ListItemButton
sx={{
minHeight: 48,
justifyContent: 'initial',
pr: 2.5,
pl: 5,
}}
component={Link}
to={`/tutorial/${slug}`}
>
<ListItemText primary={pageObject.title} />
</ListItemButton>
</Tooltip>
<ListItemButton
sx={{
minHeight: 48,
justifyContent: 'initial',
pr: 2.5,
pl: 5,
}}
component={Link}
to={`/tutorial/${slug}`}
>
<ListItemText primary={pageObject.title} />
</ListItemButton>
</ListItem>
);
});
Expand All @@ -43,7 +41,7 @@ export const SidebarTutorialSection = ({ isSidebarOpen }) => {

return (
<>
<Tooltip title={'Tutorial'} placement={'right'} arrow={true}>
<Tooltip title={'Tutorial'} placement={'right'} arrow={true} disableHoverListener={isSidebarOpen}>
<ListItemButton
sx={{
minHeight: 48,
Expand Down

0 comments on commit f036023

Please sign in to comment.