TagStudio
TagStudio copied to clipboard
[Feature Request]: Numeric field types
Checklist
- [x] I am using an up-to-date version.
- [x] I have read the documentation.
- [x] I have searched existing issues.
Description
There's currently no elegant way of storing numeric data for an entry, aside from using a text field, but that's missing a lot of opportunity and has no way of enforcing the data type.
Solution
It would be really nice to have several new field types focused around numeric data. I'm thinking of three primary ones.
- A simple numeric input, where you just type in the number with nothing fancy.
- A slider, with a configurable minimum, maximum, and step values, configured per field (when custom fields are eventually implemented).
- This could extend the basic numeric field type, adding on the minimum, maximum, and step values.
- A rating field, similar to what was mentioned in #458.
- Again, this could extend the slider field type, but it also has the added ability to configure the icon being displayed. By default, it uses stars, but you can add your own custom icon set for it to use instead.
Having these as explicit field types rather than relying on text fields will not only feel much nicer to use and enforce data types, but it'll also make it much easier to query entries based on numeric fields with comparison operators (think numeric_field = 7, slider_field <= 3.5, or rating_field >= 4). It would also help encourage users to experiment with storing numeric data on their entries when there's explicit field types for storing that type of data, when otherwise they may not have thought about storing that data.
(also it's kinda neat I think)
Alternatives
As mentioned above, you could store numeric data in a text field, but for the reasons listed above, that can prove unsatisfactory.