Skip to content

Commit

Permalink
Fixed sidebar and navigation tabs visibility on mobile devices
Browse files Browse the repository at this point in the history
Signed-off-by: Mariusz Winnik <[email protected]>
  • Loading branch information
tazo90 committed Feb 15, 2024
1 parent 5cf3f0d commit 63c60b4
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 1 deletion.
5 changes: 4 additions & 1 deletion frontend/src/components/Sidebar/NavigationTabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,12 @@ import Tabs from '../common/Tabs';
import { SidebarItemProps } from '../Sidebar';
import prepareRoutes from './prepareRoutes';

const useStyle = makeStyles(() => ({
const useStyle = makeStyles(theme => ({
tabs: {
maxWidth: '85vw',
[theme.breakpoints.down('sm')]: {
paddingTop: '10px',
},
},
}));

Expand Down
4 changes: 4 additions & 0 deletions frontend/src/components/Sidebar/Sidebar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import VersionButton from './VersionButton';
export const drawerWidth = 240;
export const mobileDrawerWidth = 320;
export const drawerWidthClosed = 64;
export const topBarHeight = 64;

// exported for backwards compatibility for plugins
export { DefaultSidebars };
Expand All @@ -48,6 +49,9 @@ const useStyle = makeStyles(theme => ({
duration: theme.transitions.duration.enteringScreen,
}),
background: theme.palette.sidebarBg,
[theme.breakpoints.down('sm')]: {
paddingTop: `${topBarHeight}px`,
},
},
drawerClose: {
transition: theme.transitions.create('width', {
Expand Down
3 changes: 3 additions & 0 deletions frontend/src/lib/themes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@ const commonRules = {
},
MuiAppBar: {
styleOverrides: {
root: {
height: '64px',
},
colorPrimary: {
backgroundColor: '#f5f5f5',
},
Expand Down

0 comments on commit 63c60b4

Please sign in to comment.