Fix CascadeStudio integration #99

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

View File

@@ -1,4 +1,5 @@
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.
import { useMutation, useFlash } from '@redwoodjs/web'
import { useAuth } from '@redwoodjs/auth'
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.
import { Link, routes, navigate } from '@redwoodjs/router'
import { initialize } from 'src/cascade/js/MainPage/CascadeMain'
import CascadeController from 'src/helpers/cascadeController'
@@ -16,6 +17,8 @@ const domNode = document.createElement('div').setAttribute('id', 'sickId')
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.
const IdeCascadeStudio = ({ part, saveCode, loading, error }) => {
const [code, setCode] = useState(part.code)
const { currentUser } = useAuth()
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.
const canEdit = currentUser?.sub === part?.user?.id
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.
useEffect(() => {
const onCodeChange = (code) => setCode(code)
CascadeController.initialise(onCodeChange, part.code, domNode)
@@ -25,7 +28,7 @@ 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.
element.setAttribute('style', 'display: none; overflow: hidden; height: calc(100vh - 8rem)') // eslint-disable-line
}
}, [])
const hasChanges = code !== part.code
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.
const isChanges = code !== part.code
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.
const { addMessage } = useFlash()
const [deletePart] = useMutation(DELETE_PART_MUTATION, {
onCompleted: () => {
@@ -44,7 +47,7 @@ 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.
<>
<nav className="rw-button-group hidden">
{loading && 'Loading...'}
{hasChanges && !loading && (
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.
{isChanges && !loading && (
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.
<button
onClick={() => saveCode({ code }, part.id)}
className="rw-button rw-button-blue"
@@ -54,7 +57,12 @@ 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.
)}
</nav>
<div>
<IdeToolbar />
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.
<IdeToolbar
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.
canEdit={canEdit}
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.
isChanges={isChanges && !loading}
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.
onSave={() => {}}
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.
onExport={() => {}}
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 id="topnav" className="topnav hidden">
<a href="https://github.com/zalo/CascadeStudio">
Cascade Studio 0.0.6
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

@@ -12,6 +12,9 @@ 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.
code
mainImage
createdAt
user {
Irev-Dev commented 2020-11-16 11:01:05 +01:00 (Migrated from github.com)
Review

remove commented code.

remove commented code.
id
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.
Irev-Dev commented 2020-11-16 11:01:05 +01:00 (Migrated from github.com)
Review

remove commented code.

remove commented code.