-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Manual edit props getting passed to index.tsx #161
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 1 Skipped Deployment
|
src/hooks/use-run-tsx/index.tsx
Outdated
if (!preSuppliedImports[name]) { | ||
throw new Error( | ||
`Import "${name}" not found (imports available: ${Object.keys(preSuppliedImports).join(",")})`, | ||
) | ||
} | ||
return preSuppliedImports[name] | ||
} | ||
;(globalThis as any).__tscircuit_require = __tscircuit_require | ||
;(globalThis as any).__tscircuit_require = tscircuitRequire |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should revert this, variable transparency (generally changing the name of a variable that represents the same thing should be avoided)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think biome did this, will update
src/hooks/use-run-tsx/index.tsx
Outdated
@@ -147,11 +153,11 @@ export const useRunTsx = ({ | |||
|
|||
const primaryKey = componentExportKeys[0] | |||
|
|||
const UserElm = (props: any) => | |||
const userElm = (props: any) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should revert this by React convention- components should be PascalCase
const userElm = (props: any) => | |
const UserElm = (props: any) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think these changes needs to be added to biome, else on save we will get this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
just // @biome-ignore
, but idk how this file passed in the past if biome doesn't accept it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad, my vscode workspace setting had some weird configuration onSaveFormat. Was not using biome
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no worries!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i have a feeling there's a bug when dragging based on the flashing in the screenshot. We need to make sure we're only using edit events that are "complete", otherwise we might be re-rendering the circuit every 10ms, the larger boards take 1-4s to render so starting hundreds of renders will cause the browser to crash or become unresponsive. I'm not 100% sure but i think we need to check that editEvent.is_complete
before incorporating the edit event into the file. Just a hunch
I won't be merging this yet, even I have seen one bug in the pcbViewer edit events. Will look into it @seveibar |
abd81ec
to
30ef4d3
Compare
merged as part of #162!!! |
Screen.Recording.2024-11-02.at.1.29.39.AM.mov