matrix-org / matrix-spec

The Matrix protocol specification
Apache License 2.0
171 stars 91 forks source link

Fix property type resolution in render-object-table #1789

Closed zecakeh closed 2 months ago

zecakeh commented 2 months ago

The split was not clear between property-type and type-or-title, so it was not obvious which partial should be called for recursion. That resulted in an error where type-or-title was only called for objects and array items, even if it also resolves arrays of types.

This makes the split clearer. property-type must be called for any schema, and object-type-or-title is only called for object schemas.

This fixes some rendering in the CS API, for example the displayname of m.room.member:

Before:

image

After:

image

Also the value of a PushCondition:

Before:

image

After:

image

Preview: https://pr1789--matrix-spec-previews.netlify.app