Replies: 4 comments 3 replies
-
Yes, this is a very necessary function for selecting the display of columns with parameters in groups of components, as well as searching and sorting by them. |
Beta Was this translation helpful? Give feedback.
-
Yes, this feature is much needed |
Beta Was this translation helpful? Give feedback.
-
I just ran across this while trying to find caps with a X1,Y1 rating. At least I think this is related. |
Beta Was this translation helpful? Give feedback.
-
I, too, think these features are much needed. I believe there's a couple of considerations to be taken about this: Which columns and filters should be shown?There's two basic principles here: Union: All parameters that are available on any shown parts are shownThis would mean that when looking at the outermost category, all parameters are available for selection. The further in you go, the more parameters are excluded. Intersection: Only parameters that are available on all shown parts are shownThis would mean that in the outermost category only ubiquitous parameters like packaging are shown and more specialized parameters are shown as you get to more specialized categories. Naturally there is a spectrum in between these options where a certain percentage of parts need to have a parameter for it to be shown, but generally it is a tradeoff between showing more, requiring less upfront work and showing less and providing more sophisticated configuration tools. Parameter Configurations / Parameter Types / Parameter TemplatesIt might be useful to have a unified parameter configuration entity. Generally, I believe a certain type of parameter is specific to a category and should be inherited by all child categories. These entities would therefore be owned by categories and could set a number of things related to that parameter like:
This raises the question whether such a parameter configuration should be a direct property of a parameter. As such, a parameter could rely on it for certain calculations and values like the name. I initially thought this would be a good idea, however I realized that if such a parameter configuration is specific to a category, a category contains a subcategory, a subcategory contains parts and a part contains parameters, then any change in that chain could lead to an inconsistent state where a parameter is either not linked to a parameter config that it should be linked to or it is linked to a parameter config that is not relevant to it anymore. Alternatively, parameter configs could be loaded adhoc, just by querying by name and category. That would mean for instance renaming a parameter type would be much harder, but overall it's probably more practical. An option which I don't like is making parameter configs generally global. Such a system would mean the user would have to choose the type from an endless list of options, most of which aren't relevant, and some of which might look very similar. Of course such an entity doesn't need to exist. Parameters can also all just exist on their own and all suggestions and displayed elements are just based on how many parameters of a certain name with certain properties already exist. SortingWhen showing parameters in columns they should be sortable, and by that I mean not show 1 megaohm before 2 kiloohms. That requires calculating a magnitude relative to some base unit at some point in time. In the current system all sorting is done by the database which means every parameter needs some scaling value cached as part of its record. If parameter configs were linked to parameters, this would provide a convenient way to provide a mechanism for providing a base unit and calculating the scale of the specific unit. Knowing the base unit would make such a mechanism both more robust and more flexible. Client vs. Serverside optionsCurrently which columns are shown and the order is saved on the client side. I think with different configurations for each category these settings should be saved globally on the server side, since it is too much effort to redo the setup on every client. Changes should not be autosaved either. Client vs. Serverside filteringClientside filtering has some advantages on small datasets: The initial loading time is a bit slower, but after that filtering and sorting is extremely snappy and filtering, independent of the data structure on the server is quite easy to implement for all columns. Unfortunately it is not scalable for larger datasets and quickly exceeds memory limits. Relation between columns and searchPanesDatatables considers searchPanes something only a column has. I think there is no reason a column must have a searchPane or vice versa. This consideration somewhat affects whether the searchPanes controller should be integrated with the existing datatables controller (e.g. as a subclass) or be separate. What I have got so farI have started implementing some of that functionality to figure things out and got the basics working, but there's no pretty or documented code yet. What this does not do:
The sillier bugs are just there because I didn't bother fixing them for this demonstration. I'll polish that if/when we agree on the basic architecture of the feature. I hope the configuration situation will somehow become easier with the integration of the settings bundle. Here is a screenshot of what this currently looks like: You can try it out here: https://github.com/Treeed/Part-DB-server/tree/serverside_filter What you need to do:
@jbtronics I would be happy to hear what you think I have also made a client side filtering version with some optimization on the datatables cascading calculation before realizing that the poor scaling would mean it can't become a part of the main partdb: |
Beta Was this translation helpful? Give feedback.
-
Hi! I have a small lab, so i want to share my experience with you, may me it will be helpfully. There is 2 very necessary features i think:
1:

I want to suggest to a customize field display, sort and search per category. (not only system)
For example, for capacitors add: Dielectric, Capacitance, Voltage, and case. (Screeen1)
2:

Quick search and filter in present parameters elements in category. (like same voltage, capacitance, dielectric and etc)
Beta Was this translation helpful? Give feedback.
All reactions