Closed ghost closed 2 years ago
This is implemented in v2.0.0, except for the Svelte component (which theoretically should also work but for some reason it keeps reloading the component when the props change). Could you try @zhl49?
@laymonage thanks for your help. I have tried this new feature on my docusaurus site which works pretty well.
However, there is a problem that an iframe reload will be scheduled for the first theme change request, and subsequent theme change requests will not trigger an iframe reload.
I'm wondering whether it is realted to this part of code. Since I know little about lit, I need your help to verify that.
Hey @zhl49, thanks for the report. Turns out that issue was caused by a mistake that happens when you use the URL mapping. Upgrading the package to v2.0.3 should fix it. Could you retry when you have the time?
I upgraded the package to v2.0.3 and now it works well. :thumbsup:
Is your feature request related to a problem? Currently, changing the theme option of the giscus component will lead to a reload of widget frame which downgrade the user experience.
Describe the solution you'd like Creating the widget only once and send configuration change messages to the frame when possible.