T
tscircuit11mo ago
shibo

Configure Chip Dropdown

wip
No description
19 Replies
Seve
Seve11mo ago
@shibo this looks amazing!!!! A couple notes: make sure to use a shadcn dialog, itll look better and be more responsive The sidebar is amazing, i love it Footprinter should have a way to import available parameters- did @Anas work on this? Make sure to use searchable dropdowns for the chip type input so people can see whats available The footprinter string field should look “read only” with slight graying and have a “copy to clipboard” icon next to it Looks great!!!! I absolutely love it!!!!!!!! Also: the box containing the pcb viewer should not have a border or padding, give it a border radius and set the overflow to hidden and youll get a nice rounded black box without those extra lines. Cant wait for this feature looks incredible!!!!
shibo
shiboOP11mo ago
Thanks for the feedback I really appreciate it
Seve
Seve11mo ago
no thank you!!! very excited for the feature!!!
shibo
shiboOP11mo ago
update
shibo
shiboOP11mo ago
There is still a lot to do
shibo
shiboOP11mo ago
https://github.com/tscircuit/footprinter/issues/75 I require this refactor for quality of life and to make footprint creation more straight forward
GitHub
Any footprint should have a default number of pins; I shouldn't hav...
footprints with a set number of pins like sot235 should not have a num_pins param as it is not configurable, while footprints like soic should have num_pins as optional with a default number of pin...
shibo
shiboOP11mo ago
@Seve I just realised this feature is very convinient for testing footprints, easily change params and immediately see their effect
shibo
shiboOP11mo ago
update 2
shibo
shiboOP11mo ago
Seve
Seve11mo ago
Yes thats fine on the refactor! Nice looks great, lets change the dialog to insert chip since it now inserts a chip not just a footprint string I would say that if we’re doing chip insertion customizing the schematic would be a good next feature. Eg labeling the pins
shibo
shiboOP11mo ago
tbf let's implement the pcb and test it first so it doesn't get too complicated
Seve
Seve11mo ago
Agree!
Anas
Anas11mo ago
I’ll refactor all footprints which of them can we pass num_pins. Also we need to add default value of num_pins
shibo
shiboOP11mo ago
thanks
Seve
Seve11mo ago
oof discord didn't send this message this morning: Instead of refactoring out num_pins which is useful as an output parameter- we can add it as a z.literal(5) for those chips I guess shibo would still want to know if it's optional or not- actually the best way to do this is maybe via zod shape inspection, this would also allow us to use dropdowns for enums and other fancy things you can inspect a zod shape like this:
const zodObj = z.object({ myEnum: z.enum(["a","b", "c"]) })

zodObj.shape.myEnum._def.values // ["a","b", "c"]
const zodObj = z.object({ myEnum: z.enum(["a","b", "c"]) })

zodObj.shape.myEnum._def.values // ["a","b", "c"]
people have used this technique to create zod forms- should work well for us!
shibo
shiboOP11mo ago
Good to know @Seve I merged the feature, but the footprinter repo still needs some work. - footprints should have default number of pins - there should be readonly params so that in snippets you know what you can and can't modify
Seve
Seve11mo ago
yes please create an issue i can bounty it
shibo
shiboOP11mo ago
https://github.com/tscircuit/footprinter/issues/75 I'll create another one for readonly params
GitHub
Any footprint should have a default number of pins; I shouldn't hav...
footprints with a set number of pins like sot235 should not have a num_pins param as it is not configurable, while footprints like soic should have num_pins as optional with a default number of pin...
shibo
shiboOP11mo ago
GitHub
some params should be readonly like the fixed number of pins in sot...
I want to know from the type received by .json() what params I can and can't change

Did you find this page helpful?