tscircuit / snippets

The main website, playground and online development environment for tscircuit (React Electronics)
https://tscircuit.com
MIT License
9 stars 27 forks source link

test footprinter default num_pins, and readonly params #262

Open ShiboSoftwareDev opened 1 week ago

ShiboSoftwareDev commented 1 week ago
seveibar commented 6 days ago

/bounty $15

algora-pbc[bot] commented 6 days ago

💎 $15 bounty • tscircuit

Steps to solve:

  1. Start working: Comment /attempt #262 with your implementation plan
  2. Submit work: Create a pull request including /claim #262 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/snippets!

Add a bounty • Share on socials

Attempt Started (GMT+0) Solution
🟢 @techmannih Nov 26, 2024, 11:49:17 AM WIP
techmannih commented 4 days ago

/attempt #262

techmannih commented 4 days ago

@seveibar @ShiboSoftwareDev I believe you want to remove the "Number of Pins" input field and ensure that readonly parameters, such as "Footprint String," are not displayed as input fields. Similarly, other parameters like "Number of Pins" (num_pins), "Pitch" (p), "Inner Diameter" (id), and "Outer Diameter" (od) should also be made readonly and not have input fields.

Please confirm if my understanding is correct, and feel free to share any suggestions you may have.

Image

ShiboSoftwareDev commented 4 days ago

Remove number of pins because you should be able to change it from the input under 'Parameters'. Now the Parameters are sometimes readonly and sometimes are not, this depends on their zod type created in the footprinter repo, only readonly paramters should not be editable.

techmannih commented 4 days ago

Thanks for responding! Sure, I got your point. I have started work on it.

techmannih commented 3 days ago
ShiboSoftwareDev commented 3 days ago

@techmannih as I said for the input fields under 'Parameters' only some of them are readonly. For example: Image only the num_pins param for this footprint is readonly(z.literal) and all the other params should be editable.

  • also make the num_pins input field behave like the old one which you removed and append the number in the correct position. i.e. it doesn't behave like the other input fields
techmannih commented 3 days ago

@ShiboSoftwareDev pease check, Now the num_pins behaves like the other parameters and it is not editable.

https://github.com/user-attachments/assets/bcb484e7-c892-41a3-bba1-7cbc3e4333e1

ShiboSoftwareDev commented 3 days ago

@ShiboSoftwareDev pease check, Now the num_pins behaves like the other parameters and it is not editable.

20241127125057.mp4

that's not what I said. some paramters are readonly and some are not; you'd know from their type definition. look at the old 'Number of Pins' input field to know how to handle num_pins because it is a special case, regardless of whether it is readonly or not. If you find it difficult to understand the terminology I'm using send my comments to chatgpt, give it some context and ask it to explain in simpler terms.