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

If an option is enabled shouldDrawErrors draw trace_errors #52

Closed
seveibar opened this issue Sep 9, 2024 · 10 comments
Closed

If an option is enabled shouldDrawErrors draw trace_errors #52

seveibar opened this issue Sep 9, 2024 · 10 comments

Comments

@seveibar
Copy link
Contributor

seveibar commented Sep 9, 2024

tscircuit/soup zod export for trace_error

import { point } from "src/common"
import { z } from "zod"

export const pcb_trace_error = z
  .object({
    pcb_error_id: z.string(),
    type: z.literal("pcb_error"),
    error_type: z.literal("pcb_trace_error"),
    message: z.string(),
    center: point.optional(),
    pcb_trace_id: z.string(),
    source_trace_id: z.string(),
    pcb_component_ids: z.array(z.string()),
    pcb_port_ids: z.array(z.string()),
  })
  .describe("Defines a trace error on the PCB")

export type PCBTraceErrorInput = z.input<typeof pcb_trace_error>
export type PCBTraceError = z.infer<typeof pcb_trace_error>
@seveibar
Copy link
Contributor Author

seveibar commented Sep 9, 2024

Needed to fix this issue easily in tests: tscircuit/tscircuit#330 (comment)

Copy link

homie-gg bot commented Sep 9, 2024

This might be a duplicate of: Option to render trace_error (e.g. option showErrors: true).

Copy link

homie-gg bot commented Sep 9, 2024

Copy link

homie-gg bot commented Sep 24, 2024

This might have already been done via: updated to circuit-json and added pcb_trace_id to via.

@seveibar
Copy link
Contributor Author

seveibar commented Nov 8, 2024

/bounty $40

A pcb error should be shown as a dotted red line with text indicating the error. The PCB Viewer has an example of this being here: https://pcb-viewer.vercel.app/?path=/story/traceerror--trace-error-circuit-4

However in circuit-to-svg the red text should always be visible, not just on hover

Copy link

algora-pbc bot commented Nov 8, 2024

## 💎 $40 bounty • tscircuit

### Steps to solve:
1. Start working: Comment /attempt #52 with your implementation plan
2. Submit work: Create a pull request including /claim #52 in the PR body to claim the bounty
3. Receive payment: 100% of the bounty is received 2-5 days post-reward. Make sure you are eligible for payouts

Thank you for contributing to tscircuit/circuit-to-svg!

Add a bountyShare on socials

Attempt Started (GMT+0) Solution
🟢 @ShiboSoftwareDev Nov 9, 2024, 5:50:48 AM #114

@ShiboSoftwareDev
Copy link
Contributor

ShiboSoftwareDev commented Nov 9, 2024

/attempt #52
Image
now need to make this optional

@seveibar an error should only be shown when the pcb_trace_error has an array of two ports in pcb_port_ids so that it has two points to connect am I right?

Algora profile Completed bounties Tech Active attempts Options
@ShiboSoftwareDev 2 tscircuit bounties
TypeScript, JavaScript,
HTML
Cancel attempt

Copy link

algora-pbc bot commented Nov 9, 2024

💡 @ShiboSoftwareDev submitted a pull request that claims the bounty. You can visit your bounty board to reward.

Copy link

algora-pbc bot commented Nov 9, 2024

🎉🎈 @ShiboSoftwareDev has been awarded $40! 🎈🎊

@ShiboSoftwareDev
Copy link
Contributor

closed in #114

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants