265 Send logs, put temp code in local storage and let panels handle scrolling #266

Merged
Irev-Dev merged 3 commits from kurt/265 into main 2021-03-21 05:34:02 +01:00
Irev-Dev commented 2021-03-21 05:31:52 +01:00 (Migrated from github.com)

resolves #265

resolves #265
franknoirot (Migrated from github.com) reviewed 2021-03-21 05:31:52 +01:00
Irev-Dev (Migrated from github.com) reviewed 2021-03-21 05:33:25 +01:00
@@ -53,1 +50,4 @@
result,
tempFile,
}),
}
Irev-Dev (Migrated from github.com) commented 2021-03-21 05:33:24 +01:00

Instead of sending down a binary type that's an image, I'm just using json with base64 image in the json, otherwise I can't really send down the log text

Instead of sending down a binary type that's an image, I'm just using json with base64 image in the json, otherwise I can't really send down the log text
Irev-Dev (Migrated from github.com) reviewed 2021-03-21 05:41:33 +01:00
@@ -9,3 +9,3 @@
{state.consoleMessages?.map(({ type, message }, index) => (
<div
<pre
className={'font-mono ' + (type === 'error' ? 'text-red-500' : '')}
Irev-Dev (Migrated from github.com) commented 2021-03-21 05:41:33 +01:00

div doesn't respect now lines it seems, making logs hard to read.

div doesn't respect now lines it seems, making logs hard to read.
Irev-Dev (Migrated from github.com) reviewed 2021-03-21 05:41:56 +01:00
@@ -70,3 +70,3 @@
console.log(`stdout: ${stdout}`)
resolve(`stdout: ${stdout}`)
resolve(stdout)
})
Irev-Dev (Migrated from github.com) commented 2021-03-21 05:41:56 +01:00

"stdout:" was in the logs and was very silly.

"stdout:" was in the logs and was very silly.
Irev-Dev (Migrated from github.com) reviewed 2021-03-21 05:43:08 +01:00
Irev-Dev (Migrated from github.com) commented 2021-03-21 05:43:08 +01:00

I figured renders was a good time to "save" the code. I could do this in the reducer, but I don't like having side-effects in the reducer, plus didn't want it to save code when resizing a panel, which also triggers a render, I've also added this to the render button.

I'm not sure what will happen to this local storage long term when the ability to save openscad projects is there, but its likely to stick around, because loosing work sucks.

I figured renders was a good time to "save" the code. I could do this in the reducer, but I don't like having side-effects in the reducer, plus didn't want it to save code when resizing a panel, which also triggers a render, I've also added this to the render button. I'm not sure what will happen to this local storage long term when the ability to save openscad projects is there, but its likely to stick around, because loosing work sucks.
Irev-Dev (Migrated from github.com) reviewed 2021-03-21 05:45:00 +01:00
Irev-Dev (Migrated from github.com) commented 2021-03-21 05:44:59 +01:00

Related to getting the ide container to take up the remaining space after the header has taken up it's chunk.

Related to getting the ide container to take up the remaining space after the header has taken up it's chunk.
Irev-Dev (Migrated from github.com) reviewed 2021-03-21 05:45:29 +01:00
Irev-Dev (Migrated from github.com) commented 2021-03-21 05:45:29 +01:00

Don't know if this date on the logs is a good idea or not 🤷

Don't know if this date on the logs is a good idea or not 🤷
Irev-Dev (Migrated from github.com) reviewed 2021-03-21 05:49:56 +01:00
@@ -128,3 +127,3 @@
window.URL.createObjectURL(state.objectData?.data)
'data:image/png;base64,' + state.objectData?.data
)
setIsDragging(false)
Irev-Dev (Migrated from github.com) commented 2021-03-21 05:49:56 +01:00

The base64 image can just about be thrown directly into src, makes this a little simpler.

The base64 image can just about be thrown directly into `src`, makes this a little simpler.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: h3n3/cadhub#266