rojo-rbx / rojo.space

Rojo website
https://rojo.space
MIT License
35 stars 39 forks source link

Document Attributes type #74

Closed Anaminus closed 2 years ago

Anaminus commented 2 years ago

This changes adds documentation for Rojo's "Attributes" type.

Some considerations:

  1. Should the example property be Instance.AttributesSerialized or Instance.Attributes? As I understand, Rojo expects Attributes to be used as the property when specifying implicitly, but I'm not sure whether the example is meant to refer to the actual serialized property, or Rojo's representation.
  2. Should the "Attributes" property be mentioned here? It appears to be defined by Rojo, but it isn't a real property as far as the Roblox API/serialization is concerned.
  3. Want to make sure I got all the supported attribute types correct.
LPGhatguy commented 2 years ago
  1. Should the example property be Instance.AttributesSerialized or Instance.Attributes?

I think we should use Instance.Attributes for the example property. Even though we technically made it up and the serialized property exists, no one should have to interact with the special serialized name for the property.

It's easy to imagine that Roblox probably has an internal property called Attributes. We would've done the same thing for Tags had they done the weird serialize-only property descriptor dance.

  1. Should the "Attributes" property be mentioned here?

Yeah! This is the property that users should see and think about. It might not be immediately obvious to every user that this is where we store Attributes.

  1. Want to make sure I got all the supported attribute types correct.

In addition to these types, NumberRange, NumberSequence, and ColorSequence are supported.