From cad52e01b89f7518aeddbe30a77a853aa636688d Mon Sep 17 00:00:00 2001 From: Kurt Hutten Date: Sun, 6 Dec 2020 11:01:18 +1100 Subject: [PATCH] issue-138 add known issues tooltip and other helper text resolves #138 --- web/src/components/IdeToolbar/IdeToolbar.js | 131 ++++++++++++++++++-- web/src/components/Svg/Svg.js | 45 +++++++ 2 files changed, 164 insertions(+), 12 deletions(-) diff --git a/web/src/components/IdeToolbar/IdeToolbar.js b/web/src/components/IdeToolbar/IdeToolbar.js index 75e0339..4b1fbc1 100644 --- a/web/src/components/IdeToolbar/IdeToolbar.js +++ b/web/src/components/IdeToolbar/IdeToolbar.js @@ -1,22 +1,35 @@ import { useState } from 'react' import Popover from '@material-ui/core/Popover' +import OutBound from 'src/components/OutBound' import { Link, routes, navigate } from '@redwoodjs/router' import Button from 'src/components/Button' import ImageUploader from 'src/components/ImageUploader' +import Svg from '../Svg/Svg' const IdeToolbar = ({ canEdit, isChanges, onSave, onExport, userNamePart }) => { const [anchorEl, setAnchorEl] = useState(null) + const [whichPopup, setWhichPopup] = useState(null) - const handleClick = (event) => { + const handleClick = ({ event, whichPopup }) => { setAnchorEl(event.currentTarget) + setWhichPopup(whichPopup) } const handleClose = () => { setAnchorEl(null) + setWhichPopup(null) + } + + const anchorOrigin = { + vertical: 'bottom', + horizontal: 'center', + } + const transformOrigin = { + vertical: 'top', + horizontal: 'center', } - const open = Boolean(anchorEl) const id = open ? 'simple-popover' : undefined return ( @@ -71,23 +84,17 @@ const IdeToolbar = ({ canEdit, isChanges, onSave, onExport, userNamePart }) => { className="ml-3 shadow-md hover:shadow-lg border-indigo-600 border-2 border-opacity-0 hover:border-opacity-100 bg-indigo-800 text-indigo-200" shouldAnimateHover aria-describedby={id} - onClick={handleClick} + onClick={(event) => handleClick({ event, whichPopup: 'export' })} > Export +
+
+ + +
+ Press F5 to regenerate model +
+
+
+
+ + +
+ If there's a feature you really want or you found a bug, either + make a{' '} + + github issue + {' '} + or swing by the{' '} + + discord server + + . +
+
+
+
+ + +
+
+ Model never generating? +
+ Due to the current integration with CascadeStudio and the order in + which the code initialise sometimes the 3d model never generates +
Work around
+

+ Usually going to the homepage, then refreshing, + waiting a good 10 seconds before navigating back to the part + your interested in should fix the issue. +

+

+ If this problem is frustrating to you, leave a comment on its{' '} + + github issue + {' '} + to help prioritize it. +

+
+
+
+
) } diff --git a/web/src/components/Svg/Svg.js b/web/src/components/Svg/Svg.js index 9ec0833..a655d3a 100644 --- a/web/src/components/Svg/Svg.js +++ b/web/src/components/Svg/Svg.js @@ -60,6 +60,21 @@ const Svg = ({ name, className: className2, strokeWidth = 2 }) => { /> ), + 'exclamation-circle': ( + + + + ), favicon: ( @@ -159,6 +174,21 @@ const Svg = ({ name, className: className2, strokeWidth = 2 }) => { ), + flag: ( + + + + ), fork: ( { /> ), + lightbulb: ( + + + + ), logout: (