Skip to content

Simplify BOM table rendering#3187

Merged
rushabhcodes merged 3 commits intotscircuit:mainfrom
rushabhcodes:feat/add-all-bom-table-columns
Apr 24, 2026
Merged

Simplify BOM table rendering#3187
rushabhcodes merged 3 commits intotscircuit:mainfrom
rushabhcodes:feat/add-all-bom-table-columns

Conversation

@rushabhcodes
Copy link
Copy Markdown
Contributor

@rushabhcodes rushabhcodes commented Apr 21, 2026

This PR rewrites BomTable to render directly from the structured BOM rows returned by circuit-json-to-bom-csv instead of deriving the table from source_component elements.

What changed:
  - switched BOM table data flow to convertCircuitJsonToBomRows
  - removed the old supplier-column derivation from source_component
  - added lightweight metadata helpers for optional columns
  - kept JLCPCB part-number linking
  - preserved support for manufacturer/MPN pairs and extra BOM columns
  - aligned the table header and body through a shared descriptor source of truth

Verification:
  - bunx biome check lib/components/BomTable.tsx
  - bunx tsc -p tsconfig.json --noEmit

Before

image

After

image

Copilot AI review requested due to automatic review settings April 21, 2026 21:48
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 21, 2026

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

Project Deployment Actions Updated (UTC)
runframe Ready Ready Preview, Comment Apr 23, 2026 4:08pm

Request Review

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR refactors BomTable to render directly from structured BOM rows produced by convertCircuitJsonToBomRows, replacing the previous approach of deriving table columns/rows from source_component elements.

Changes:

  • Switched BOM table rendering to use convertCircuitJsonToBomRows(circuitJson) output.
  • Added metadata/descriptor helpers to drive header + body from a shared column descriptor list.
  • Preserved JLCPCB part-number linking and support for manufacturer/MPN plus extra columns.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread lib/components/BomTable.tsx Outdated
@rushabhcodes rushabhcodes requested review from a team, Abse2001, imrishabh18 and seveibar April 22, 2026 18:52
Copy link
Copy Markdown
Member

@imrishabh18 imrishabh18 left a comment

Choose a reason for hiding this comment

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

Split the code in separate files

@rushabhcodes rushabhcodes merged commit b93fb68 into tscircuit:main Apr 24, 2026
6 checks passed
@tscircuitbot
Copy link
Copy Markdown
Collaborator


Thank you for your contribution! 🎉

PR Rating: ⭐⭐⭐
Impact: Major

Track your contributions and see the leaderboard at: tscircuit Contribution Tracker


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.

5 participants