diff --git a/apps/official/components/CovMapFeatureInfo.tsx b/apps/official/components/CovMapFeatureInfo.tsx index 0c799c29..fc404ae2 100644 --- a/apps/official/components/CovMapFeatureInfo.tsx +++ b/apps/official/components/CovMapFeatureInfo.tsx @@ -57,6 +57,8 @@ const useStyles = makeStyles((theme) => ({ drawerPaper: { width: (props) => (props.fullScreen ? "100%" : "450px"), + maxHeight: "100%", + overflow: "hidden", }, drawerRoot: { display: "flex", @@ -66,6 +68,11 @@ const useStyles = makeStyles((theme) => ({ left: "auto", right: "auto", }, + drawerScrollContainer: { + height: "100%", + width: "100%", + overflow: "auto", + }, recommendationsLink: { "textAlign": "center", "& p": { @@ -106,6 +113,7 @@ export const CovMapFeatureInfo = ({ rawData }: FeatureInfoProps) => { drawerPaper, drawerRoot, drawerPaperAnchorBottom, + drawerScrollContainer, centerIcon, chipTop, } = useStyles({ @@ -261,8 +269,10 @@ export const CovMapFeatureInfo = ({ rawData }: FeatureInfoProps) => { onClose={() => pushQueryChange({ expanded: undefined })} classes={{ paper: drawerPaper, root: drawerRoot, paperAnchorBottom: drawerPaperAnchorBottom }} > - {cardHeader} - {cardContent} +
+ {cardHeader} + {cardContent} +
); diff --git a/src/App.tsx b/src/App.tsx index 26ef3e6d..a397c338 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -49,8 +49,21 @@ export const App = () => { path={page.route} key={page.id} component={() => ( -
- +
+
+ +
)} style={{ flex: "1 1 auto", position: "absolute" }} diff --git a/src/app.css b/src/app.css index 7fed1b20..d65dd907 100644 --- a/src/app.css +++ b/src/app.css @@ -125,6 +125,11 @@ table { border-spacing: 0; } +html, +body { + overflow: hidden; +} + /* Variables */ body { font-family: "Dosis, sans-serif"; diff --git a/src/components/NavBar.tsx b/src/components/NavBar.tsx index 698ccaca..e184d42b 100644 --- a/src/components/NavBar.tsx +++ b/src/components/NavBar.tsx @@ -6,7 +6,7 @@ import MenuIcon from "@material-ui/icons/Menu"; import ShareIcon from "@material-ui/icons/Share"; import MenuItem from "@material-ui/core/MenuItem"; import Divider from "@material-ui/core/Divider"; -import { Link } from "react-router-dom"; +import { Link, useParams } from "react-router-dom"; import { makeStyles } from "@material-ui/core/styles"; import { AppApi } from "src/state/app"; import { useThunkDispatch } from "src/useThunkDispatch"; @@ -21,27 +21,23 @@ import { Drawer, useMediaQuery } from "@material-ui/core"; import { CloseRounded } from "@material-ui/icons"; import { VERSION, HASH_LONG, HASH_SHORT } from "src/version"; import FixedSearch from "./FixedSearch"; -import { useParams } from "react-router-dom"; import { welcomeStepsConfig } from "./WelcomeStepsModal/welcomeStepsConfig"; const Logo = config.ui?.Logo; const useStyles = makeStyles((theme) => ({ appBar: { - position: "sticky", + position: "fixed", [theme.breakpoints.down("xs")]: { // on mobile devices backgroundColor: "transparent", - pointerEvents: "none", boxShadow: "none", - position: "fixed", }, }, title: { flexShrink: 1, }, menuItem: { - touchAction: "none", paddingLeft: theme.spacing(4), paddingRight: theme.spacing(1), }, @@ -51,12 +47,16 @@ const useStyles = makeStyles((theme) => ({ margin: theme.spacing(0, 1), }, - menu: { - touchAction: "none", - }, + menuContent: { - marginBottom: theme.spacing(4), marginTop: "auto", + paddingBottom: theme.spacing(4), + }, + drawerScrollContainer: { + display: "flex", + flexDirection: "column", + flex: 1, + overflow: "auto", }, logo: { height: "32px", @@ -70,14 +70,17 @@ const useStyles = makeStyles((theme) => ({ marginTop: 0, }, drawer: { - touchAction: "none", pointerEvents: "auto", + height: "100%", }, drawerPaper: { + height: "100%", width: "20rem", maxWidth: "70vw", display: "flex", + overflow: "hidden", }, + fullHeightToolbar: { minHeight: "64px", }, @@ -201,17 +204,19 @@ export const NavBar = () => { {/* only here for the gutter feel free create your own gutter styles and remove this */} - - {(Logo && ( -
- +
+ + {(Logo && ( +
+ +
+ )) || } +
+ {"v" + VERSION} -{" "} + + {HASH_SHORT} +
- )) || } -
- {"v" + VERSION} -{" "} - - {HASH_SHORT} -
diff --git a/src/components/WelcomeStepsModal/WelcomeStepsModal.tsx b/src/components/WelcomeStepsModal/WelcomeStepsModal.tsx index db45069a..abd70a09 100644 --- a/src/components/WelcomeStepsModal/WelcomeStepsModal.tsx +++ b/src/components/WelcomeStepsModal/WelcomeStepsModal.tsx @@ -61,8 +61,21 @@ export const WelcomeStepsModal: React.FC<{ subPage?: string }> = (props) => { return (
- -
+ +