Repository navigation
Replies: 2 comments
|
I'll look into it shortly, I'm doing frontend rework at the moment. But I am thinking against NPM altogether, we had api package which had zero adoption since 2022 and I will drop now. In this AI age I think crystal clear API documentation should be enough to build their own frontend as they want, if they want to, and as far as I recall we never broke API compatibility. |
|
Having now looked at this properly, I am going to decline it, and the reason is more specific than my earlier note suggested. The blocker is authentication rather than packaging. The widget runs inside an iframe served from the Remark42 origin, and OAuth login depends on that: the login link opens a popup at Import the widget into your own bundle and it renders in your page's origin instead. The auth cookie is then a third-party cookie for every request the widget makes, which Safari blocks outright today and Chrome is moving away from. Login would fail for a large share of visitors, and it would fail silently, since that flow polls for a user that never arrives rather than surfacing an error. The iframe is not an implementation detail we have not got around to removing; it is what makes login work. The underlying want, control over when and how the widget loads, is already available without a package. For a genuinely custom frontend the supported path is the REST API, which is documented and has not broken compatibility. Closing #240, which asked for the same thing in 2019, alongside this. |
Uh oh!
There was an error while loading. Please reload this page.
Instead of downloading
embed.jsand other widgets, they could be a part of an npm package.We then could install it, require/import it, and have much more control over how widgets load and when.
It would also make comments appear faster and smoother.
All reactions