Jisu-Woniu / giscus-blazor

A giscus wrapper for Blazor
MIT License
8 stars 1 forks source link

Support Enhanced Navigation #6

Open NielsPilgaard opened 6 months ago

NielsPilgaard commented 6 months ago

Hi 👋

At the moment, Giscus Blazor does not update which discussion it's showing, when the current page is changed using client-side navigation, or server-side enhanced navigation.

Using forceLoad works:

NavigationManager.NavigateTo("/new-url", forceLoad: true)

but that's not as smooth of a user experience as the alternatives, since it's a full page reload and takes longer to execute.

I've tried using BlazorPageScript to run Giscus Blazor on page change, but I couldn't get it to work since I don't know which javascript to actually use.

Do you have any ideas as to what I could do to make it work? :)

Jisu-Woniu commented 6 months ago

Have you checked out this link? I found this from giscus-components' repo, but I did not dive in, since I am a little busy recently.

If you work it out, I would be glad to merge it into this repo.

NielsPilgaard commented 6 months ago

This could potentially work: https://github.com/giscus/giscus/blob/main/ADVANCED-USAGE.md#parent-to-giscus-message-events

I'll try it out once I find some free time 😄