-
-
Notifications
You must be signed in to change notification settings - Fork 110
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
Idea: add component count selector in "component search" section #483
Comments
I see your point and you are absolutely rigth (as others have been before) but wx is a bitch ... You say you search for 100nF 0402 but your screenshot does not use the package field at all. When I search 100nF and use the package field with 0402 I get quite sane results: The first hit is even a basic part which is desirable in my opinion. I have not looked into highlighting in wx listviews but its not easyly possible to hightlight a substring. maybe there's a rich text way but that means a lot of work .... About the price thing, I kind of like your idea of having a way to define a quantity which the filters the price column and only shows the range that matches the quantity. Smart! Bonus answer: It is, absolutely but there is now way you can install 3rd party python packages that work on all plattforms ... I thought about building a webserverbase backend (flask, fastapi, ...) and use vuejs as a frontend, but spawning a browser window dows not work on all platfroms I guess. wx webviews a kind of stoneage, all state of the art UI frameworks need a modern JS engine. |
I'll try to respond
I'd add another submenu in the view seen on the screenshot, with amount of boards you're ordering, and toggle between all and filtered prices. In the main view, estimated total component price can be added as a bonus.
I'd explore a possibility of simply spawning a flask (or whatever) server, and opening the interface in browser. This would open a shitton of new possibilities! One can dream :) |
Nuff said - Price column is a mess :) #382
I messed a bit with code, and wrote a simple PoC. I hardcoded element count to "30" for now:
Instead of hardcoding element count, an additional field could be added to the menu at the top, with target component count. Near it, a simple switch for toggling this feature should be present too.
As mentioned in linked issue, JLC API is not stable, so this feature should handle all parsing faults as gracefully as possible, and fallback to the default view on any error.
Another annoying issue I tried to deal here is "description" field, which is arguably even messier. I tried to highlight the searched phrase, to improve glance value when selecting component.
The scenario i'm trying to deal with: looking for "100n" component with "0402" package - when I'm obviously looking for a capacitor, I get "100nH 0402" choke listed.
This challenge however defeated me - I don't know if it's even possible to print bold text using wx component used here (and how portable such feature would be). For now i wrap keyword in ||double pipes||, but this doesn't really look useful at all.
Here's the snippet I made - obviously requiring a lot more sanitation before being prod-ready:
Please tell me if it's something worth being merged-in, I could finish this and make an PR sometime in the future.
Bonus question - is it even remotely possible for kicad addon to utilize some other GUI-rendering framework? :)
The text was updated successfully, but these errors were encountered: