Additional Attribute Data Formats #107

Open
opened 2026-06-13 22:18:51 +00:00 by Oliver · 0 comments
Owner

Currently Attribute items only support numeric values. There has been some discussion of having different data types supported for attributes, they could be expanded to have a subtype property in the data model that allows changing a "data" property in the system model.

This would require a:

  • TypedSchemaField to store the unique data per-subtype
  • type data property on the system model to distinguish which subtype is being used in the sub-data
  • data model migration to move the current numeric attribute values into the sub-data
  • way to set the attribute's subtype (maybe make it read-only after setting it initially?)
  • A unique way to display each attribute type's data:
    • above the fold
    • below the fold
    • on the attribute item sheet

Bonus points:

  • providing a way for modules to make attribute subtypes (would require a type ID, as well as a template for each of the unique display locations provided)

Possible subtypes are:

  • String:
    • Single string field to represent whatever they want
  • Checkbox:
    • Single boolean field to represent true/false
  • Number:
    • Single numeric field
  • Range: (required, as this would be what everything gets migrated to unless it has a subtype already)
    • Same as Number subtype
    • Adds a Min/Max value
    • Displays as an "X / Y" inputs
Currently Attribute items only support numeric values. There has been some discussion of having different data types supported for attributes, they could be expanded to have a subtype property in the data model that allows changing a "data" property in the system model. This would require a: - TypedSchemaField to store the unique data per-subtype - `type` data property on the system model to distinguish which subtype is being used in the sub-data - data model migration to move the current numeric attribute values into the sub-data - way to set the attribute's subtype (maybe make it read-only after setting it initially?) - A unique way to display each attribute type's data: - above the fold - below the fold - on the attribute item sheet Bonus points: - providing a way for modules to make attribute subtypes (would require a type ID, as well as a template for each of the unique display locations provided) --- Possible subtypes are: - String: - Single string field to represent whatever they want - Checkbox: - Single boolean field to represent true/false - Number: - Single numeric field - Range: (required, as this would be what everything gets migrated to unless it has a subtype already) - Same as Number subtype - Adds a Min/Max value - Displays as an "X / Y" inputs
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Foundry/taf#107
No description provided.