Skip to content
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

Document Attributes type #74

Merged
merged 3 commits into from
Jun 30, 2022
Merged

Conversation

Anaminus
Copy link
Contributor

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
Copy link
Contributor

  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.

- Use Attributes as the example property.
- Replace example property names with actual names (required for
  implicit form).
List ColorSequence, NumberRange, and NumberSequence as supported
attribute types.
Copy link
Contributor

@LPGhatguy LPGhatguy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great, thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants