Finally got the #ONI web components work nicely with loading #ActivityPub objects based on their URL.
Previously I had to pass the whole JSON payload to the component for it to render properly, which wasn’t possible in all cases.
After the improvements I’ve done I can now do something simple like:
<oni-actor it="https://actor.example.com"></oni-actor>
Additionally, I added the option to load the payload from a child <script>
tag containing the raw object. This needs some more improvements, but it’s better than stuffing the payload in an HTML attribute, as it was done until now.
Probably I can also improve the UX of how we pass the URL of the object using an attribute closer to the standard HTML (using src=
) or closer to the ActivityPub spec (using id=
), but for now it’s enough.