Skip to content
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

Closed
wants to merge 7 commits into from

Conversation

imrishabh18
Copy link
Member

Screen.Recording.2024-11-02.at.1.29.39.AM.mov

@imrishabh18 imrishabh18 requested a review from seveibar as a code owner November 1, 2024 20:00
Copy link

vercel bot commented Nov 1, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
snippets ⬜️ Ignored (Inspect) Visit Preview Nov 1, 2024 11:27pm

@imrishabh18 imrishabh18 requested a review from seveibar November 1, 2024 21:21
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
Copy link
Contributor

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)

Copy link
Member Author

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

@@ -147,11 +153,11 @@ export const useRunTsx = ({

const primaryKey = componentExportKeys[0]

const UserElm = (props: any) =>
const userElm = (props: any) =>
Copy link
Contributor

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

Suggested change
const userElm = (props: any) =>
const UserElm = (props: any) =>

Copy link
Member Author

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

Copy link
Contributor

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?

Copy link
Member Author

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no worries!

Copy link
Contributor

@seveibar seveibar left a 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

@imrishabh18
Copy link
Member Author

I won't be merging this yet, even I have seen one bug in the pcbViewer edit events. Will look into it @seveibar

@imrishabh18 imrishabh18 force-pushed the feat/handle-manual-edit-props branch from abd81ec to 30ef4d3 Compare November 1, 2024 21:37
@seveibar
Copy link
Contributor

seveibar commented Nov 2, 2024

merged as part of #162!!!

@seveibar seveibar closed this Nov 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants