matrix-org / matrix-org/matrix-viewer
The Hydrogen SDK is hard to use and requires a lot of boilerplate
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 84
- Forks
- 10
- PR merge metrics
- No merged PRs in 30d
Description
The Hydrogen SDK is hard to use and requires a lot of obtuse boilerplate just to render something. The bare minimum we need to do is turn a static list of events into timeline HTML.
But ideally, we could use Hydrogen as-is out of the box to get the full room view and styles without some of the interactions for sending messages and updating things. And in general, we still need Hydrogen component JavaScript (and more than just the timeline) for the fancy nice features like lightbox, context menu options including dialog/modals like "View source", "Copy Permalink", stick to bottom/top, room header info, member list and inspecting a single member, probably some spaces hierarchy exploration, threading.
@bwindels and I have paired on this problem a couple times and have iterated/progressed to [mocking the HTTP layer](https://github.com/MadLittleMods/hydrogen-static-archives-prototype/pull/2) so far which seems to make things simpler and better than fighting current abstractions. One wobbly part of this is that Hydrogen can call the Matrix HTTP API's differently than how you expect later down the line. And above it all, I think the current abstractions can be better to avoid having to do this.
To get a better feel of the discussion, context, counter-points, see https://github.com/vector-im/hydrogen-web/pull/864#issuecomment-1284601760
I'm just creating this issue to track this point and collect various discussions around this because re-finding a discussion a random closed PR is cumbersome, etc.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the Hydrogen SDK usage and the mocked HTTP-layer work in hydrogen-static-archives-prototype/pull/2, then read the discussion in hydrogen-web/pull/864. Define the required static timeline and room-view behavior, including which Hydrogen interactions and components remain needed; done requires an agreed abstraction and a working implementation rather than another discussion thread.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100