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

Update HTML templates to link to object definitions #1724

Merged
merged 9 commits into from Feb 28, 2024

Conversation

richvdh
Copy link
Member

@richvdh richvdh commented Feb 14, 2024

This PR is a series of commits which add hyperlinks to the definitions of subschemas. I'm hoping this might help with navigation for complex data structures like that returned by /sync.

Each of the commits, with the exception of "Link to HTML anchors, where they exist" has been tested to have no effect n the output. The "Link..." commit just adds <href a="..."> links where possible.

Before:

image

After:

image

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

There is no need for full `{{/* ... */}}` comment markers here: simple `/*
... */` ones work fine.
@richvdh richvdh requested a review from a team as a code owner February 14, 2024 09:47
@richvdh richvdh marked this pull request as draft February 14, 2024 09:51
@richvdh richvdh marked this pull request as ready for review February 14, 2024 10:03
Comment on lines -145 to -147
{{/*
As far as I know we don't have something like Array.concat(), so add them one at a time
*/}}
Copy link
Member Author

Choose a reason for hiding this comment

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

I removed this comment, since I found it misleading. We do have something like Array.concat -- it's called append, which does concatenate arrays if you pass an array as its parameter. However, it's not very useful here, because we want to call clean-object on each item before adding it to $all_objects.

Copy link
Member

@uhoreg uhoreg left a comment

Choose a reason for hiding this comment

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

Seems to do what it says it does

@richvdh richvdh merged commit 976ebdc into main Feb 28, 2024
12 checks passed
@richvdh richvdh deleted the rav/links_for_object_defs_2 branch February 28, 2024 10:39
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.

None yet

2 participants