Fix CascadeStudio integration #99

Merged
Irev-Dev merged 11 commits from kurt/issue-95 into main 2020-11-16 19:33:35 +01:00
4 changed files with 50 additions and 1 deletions
Showing only changes of commit a5fddd95cb - Show all commits

View File

@@ -43,6 +43,11 @@ const IdeCascadeStudio = ({ part, saveCode, loading, error }) => {
Irev-Dev commented 2020-11-16 10:57:13 +01:00 (Migrated from github.com)
Review

clean up

clean up
Irev-Dev commented 2020-11-16 10:57:13 +01:00 (Migrated from github.com)
Review

clean up

clean up
Irev-Dev commented 2020-11-16 11:00:25 +01:00 (Migrated from github.com)
Review

delete this nav element. I added hidden class but intended to remove it entirely.

delete this nav element. I added hidden class but intended to remove it entirely.
Irev-Dev commented 2020-11-16 11:00:25 +01:00 (Migrated from github.com)
Review

delete this nav element. I added hidden class but intended to remove it entirely.

delete this nav element. I added hidden class but intended to remove it entirely.
Irev-Dev commented 2020-11-16 11:00:47 +01:00 (Migrated from github.com)
Review

Likewise has a hidden class. This div should be removed.

Likewise has a hidden class. This div should be removed.
Irev-Dev commented 2020-11-16 11:00:47 +01:00 (Migrated from github.com)
Review

Likewise has a hidden class. This div should be removed.

Likewise has a hidden class. This div should be removed.
})
}}
onExport={(type) => threejsViewport[`saveShape${type}`]()}
userNamePart={{
Irev-Dev commented 2020-11-16 10:57:13 +01:00 (Migrated from github.com)
Review

clean up

clean up
Irev-Dev commented 2020-11-16 11:00:25 +01:00 (Migrated from github.com)
Review

delete this nav element. I added hidden class but intended to remove it entirely.

delete this nav element. I added hidden class but intended to remove it entirely.
Irev-Dev commented 2020-11-16 11:00:47 +01:00 (Migrated from github.com)
Review

Likewise has a hidden class. This div should be removed.

Likewise has a hidden class. This div should be removed.
userName: part.user.userName,
Irev-Dev commented 2020-11-16 10:57:13 +01:00 (Migrated from github.com)
Review

clean up

clean up
Irev-Dev commented 2020-11-16 11:00:25 +01:00 (Migrated from github.com)
Review

delete this nav element. I added hidden class but intended to remove it entirely.

delete this nav element. I added hidden class but intended to remove it entirely.
Irev-Dev commented 2020-11-16 11:00:47 +01:00 (Migrated from github.com)
Review

Likewise has a hidden class. This div should be removed.

Likewise has a hidden class. This div should be removed.
partTitle: part.title,
Irev-Dev commented 2020-11-16 10:57:13 +01:00 (Migrated from github.com)
Review

clean up

clean up
Irev-Dev commented 2020-11-16 11:00:25 +01:00 (Migrated from github.com)
Review

delete this nav element. I added hidden class but intended to remove it entirely.

delete this nav element. I added hidden class but intended to remove it entirely.
Irev-Dev commented 2020-11-16 11:00:47 +01:00 (Migrated from github.com)
Review

Likewise has a hidden class. This div should be removed.

Likewise has a hidden class. This div should be removed.
image: part?.user?.image,
Irev-Dev commented 2020-11-16 10:57:13 +01:00 (Migrated from github.com)
Review

clean up

clean up
Irev-Dev commented 2020-11-16 11:00:25 +01:00 (Migrated from github.com)
Review

delete this nav element. I added hidden class but intended to remove it entirely.

delete this nav element. I added hidden class but intended to remove it entirely.
Irev-Dev commented 2020-11-16 11:00:47 +01:00 (Migrated from github.com)
Review

Likewise has a hidden class. This div should be removed.

Likewise has a hidden class. This div should be removed.
}}
Irev-Dev commented 2020-11-16 10:57:13 +01:00 (Migrated from github.com)
Review

clean up

clean up
Irev-Dev commented 2020-11-16 11:00:25 +01:00 (Migrated from github.com)
Review

delete this nav element. I added hidden class but intended to remove it entirely.

delete this nav element. I added hidden class but intended to remove it entirely.
Irev-Dev commented 2020-11-16 11:00:47 +01:00 (Migrated from github.com)
Review

Likewise has a hidden class. This div should be removed.

Likewise has a hidden class. This div should be removed.
/>
</div>
</>
Irev-Dev commented 2020-11-16 10:57:13 +01:00 (Migrated from github.com)
Review

clean up

clean up
Irev-Dev commented 2020-11-16 10:57:13 +01:00 (Migrated from github.com)
Review

clean up

clean up
Irev-Dev commented 2020-11-16 11:00:25 +01:00 (Migrated from github.com)
Review

delete this nav element. I added hidden class but intended to remove it entirely.

delete this nav element. I added hidden class but intended to remove it entirely.
Irev-Dev commented 2020-11-16 11:00:25 +01:00 (Migrated from github.com)
Review

delete this nav element. I added hidden class but intended to remove it entirely.

delete this nav element. I added hidden class but intended to remove it entirely.
Irev-Dev commented 2020-11-16 11:00:47 +01:00 (Migrated from github.com)
Review

Likewise has a hidden class. This div should be removed.

Likewise has a hidden class. This div should be removed.
Irev-Dev commented 2020-11-16 11:00:47 +01:00 (Migrated from github.com)
Review

Likewise has a hidden class. This div should be removed.

Likewise has a hidden class. This div should be removed.

View File

@@ -13,6 +13,7 @@ export const QUERY = gql`
Irev-Dev commented 2020-11-16 11:01:05 +01:00 (Migrated from github.com)
Review

remove commented code.

remove commented code.
Irev-Dev commented 2020-11-16 11:01:05 +01:00 (Migrated from github.com)
Review

remove commented code.

remove commented code.
createdAt
user {
id
userName
Irev-Dev commented 2020-11-16 11:01:05 +01:00 (Migrated from github.com)
Review

remove commented code.

remove commented code.
}
}
}
Irev-Dev commented 2020-11-16 11:01:05 +01:00 (Migrated from github.com)
Review

remove commented code.

remove commented code.
Irev-Dev commented 2020-11-16 11:01:05 +01:00 (Migrated from github.com)
Review

remove commented code.

remove commented code.

View File

@@ -1,9 +1,11 @@
import { useState } from 'react'
import Popover from '@material-ui/core/Popover'
import { Link, routes, navigate } from '@redwoodjs/router'
import Button from 'src/components/Button'
import ImageUploader from 'src/components/ImageUploader'
const IdeToolbar = ({ canEdit, isChanges, onSave, onExport }) => {
const IdeToolbar = ({ canEdit, isChanges, onSave, onExport, userNamePart }) => {
const [anchorEl, setAnchorEl] = useState(null)
const handleClick = (event) => {
@@ -22,6 +24,32 @@ const IdeToolbar = ({ canEdit, isChanges, onSave, onExport }) => {
id="cadhub-ide-toolbar"
className="flex bg-gradient-to-r from-gray-900 to-indigo-900 pt-1"
>
<div className="flex items-center">
<div className="h-8 w-8 ml-4">
<ImageUploader
className="rounded-full object-cover"
onImageUpload={() => {}}
aspectRatio={1}
imageUrl={userNamePart?.image}
width={80}
/>
</div>
<div className="text-indigo-400 ml-2 mr-8">
<Link to={routes.user2({ userName: userNamePart?.userName })}>
{userNamePart?.userName}
</Link>
</div>
</div>
<Button
iconName="arrow-left"
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
onClick={() => {
navigate(routes.part2(userNamePart))
}}
>
Part Profile
</Button>
<Button
iconName={canEdit ? 'save' : 'fork'}
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"

View File

@@ -1,5 +1,20 @@
const Svg = ({ name, className: className2, strokeWidth = 2 }) => {
const svgs = {
'arrow-left': (
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
stroke="currentColor"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
strokeWidth={strokeWidth}
d="M10 19l-7-7m0 0l7-7m-7 7h18"
/>
</svg>
),
'chevron-down': (
<svg
xmlns="http://www.w3.org/2000/svg"