Skip to content

Conversation

@seveibar
Copy link
Contributor

Summary

  • extend pcb and fabrication note dimension schemas to accept center/edge measurement flags locally
  • broaden JSX intrinsic typings to expose the new measurement mode props
  • move edge measurement tests into dedicated files with offsets and add PCB snapshot coverage

Testing

  • bunx tsc --noEmit
  • BUN_UPDATE_SNAPSHOTS=1 bun test tests/components/primitive-components/pcb-note-dimension-measurement-modes.test.tsx
  • bun test tests/components/primitive-components/pcb-note-dimension-measurement-modes.test.tsx
  • bun test tests/components/normal-components/fabrication-notes-measurement-modes.test.tsx
  • bun test tests/components/primitive-components/pcb-note-dimension-board.test.tsx
  • bun test tests/components/normal-components/fabrication-notes.test.tsx

https://chatgpt.com/codex/tasks/task_b_68fbcdf150ec832e8602bdd2a8c53fe4

@vercel
Copy link

vercel bot commented Oct 24, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
tscircuit-core-benchmarks Ready Ready Preview Comment Oct 24, 2025 9:00pm

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +60 to +64
const numericY =
typeof input.y === "string" ? parseFloat(input.y) : (input.y ?? 0)

return {
point: { x: numericX, y: numericY },

Choose a reason for hiding this comment

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

P1 Badge Apply component transform to literal dimension points

Literal {x,y} coordinates are now returned from resolveNoteDimensionTarget without being transformed into global PCB space. Before this change both note-dimension components multiplied literal points by _computePcbGlobalTransformBeforeLayout, so a dimension defined inside a translated or rotated group would move with its parent. After the refactor the raw numbers from lines 60‑64 are inserted directly into the database, so <pcbnotedimension from={{x:0,y:0}} … /> inside a group with pcbX=50 renders at 0 mm instead of 50 mm. Any dimensions expressed in local coordinates will now draw in the wrong place, yielding incorrect measurements whenever the parent group is positioned or rotated. The literal coordinates should be passed through the component’s PCB transform before being stored.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant