Skip to content

Add source_failed_to_create_component_error to skip complete circuit render failure and add only the failed component to db#779

Merged
imrishabh18 merged 9 commits intomainfrom
add-source-failed-to-create-component
May 12, 2025
Merged

Add source_failed_to_create_component_error to skip complete circuit render failure and add only the failed component to db#779
imrishabh18 merged 9 commits intomainfrom
add-source-failed-to-create-component

Conversation

@imrishabh18
Copy link
Copy Markdown
Member

@imrishabh18 imrishabh18 commented May 6, 2025

@vercel
Copy link
Copy Markdown

vercel Bot commented May 6, 2025

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

Name Status Preview Comments Updated (UTC)
tscircuit-core-benchmarks ✅ Ready (Inspect) Visit Preview 💬 Add feedback May 12, 2025 4:28pm

@imrishabh18 imrishabh18 changed the title Add source_failed_to_create_component_error to skip complete circui… Add source_failed_to_create_component_error to skip complete circuit render failure and add only the failed component to db May 6, 2025
Copy link
Copy Markdown
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.

nice

Comment thread lib/fiber/create-instance-from-react-element.ts Outdated
Comment thread lib/fiber/create-instance-from-react-element.ts Outdated
Comment thread lib/fiber/create-instance-from-react-element.ts Outdated
error_type: "source_failed_to_create_component_error",
})
}
return createErrorPlaceholderComponent(type, props, error)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

this is an interesting idea, why not have the placeholder component render the error? We could have it be a Renderable with props, that would allow inspection. It would render the error to circuit json

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 9, 2025

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

Comment thread lib/components/primitive-components/ErrorPlaceholder.ts
@imrishabh18
Copy link
Copy Markdown
Member Author

Most of the tests are failing because of position of the silkscreen text, 🤔

image

@github-actions
Copy link
Copy Markdown

This PR has been automatically marked as stale because it has had no recent activity. It will be closed if no further activity occurs.

component_name: this._parsedProps.component_name,
message: this._parsedProps.message,
pcb_center: this._parsedProps.pcb_center,
schematic_center: this._parsedProps.schematic_center,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

it's ok to do this in the next PR, but you need to translate this by the parent group's position, you can look at schematic and pcb primitives to see how they do it

Copy link
Copy Markdown
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.

@imrishabh18 this is amazing, INCREDIBLE

@imrishabh18 imrishabh18 force-pushed the add-source-failed-to-create-component branch from 9c5098e to bec42ba Compare May 12, 2025 16:23
@imrishabh18 imrishabh18 merged commit 026b00f into main May 12, 2025
10 checks passed
@imrishabh18 imrishabh18 deleted the add-source-failed-to-create-component branch May 12, 2025 16:29
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.

Error: Invalid props for capacitor C1 capacitance Required

3 participants