If I remove the polaris.js the admin navigation an the left side works well. Each click on Home or Second creates a request on my server. After adding polaris.js no requests happen anymore, only the URL in the browser gets updated.
Also the <s-link> with target auto or _self do nothing with polaris.js loaded.
Hi Jordan, I’m not doing anything more than what you can see in my template for the moment. I was just curious following the App home docs.
The <s-app-nav> is working as expected if I don’t load the polaris.js script. I can click an both menu points and i get an ?embedded=1 request to my server. But as soon as I add the polaris lib, it’s not working anymore and I don’t understand why this has an influence. Maybe it’s the same problem as in New Polaris web component `s-link` doesn't redirect
I can confirm that s-app-nav doesn’t seem to work with server-side rendered apps (no client-side routing). Haven’t tested witouth the polaris library included.
Navigation for server-side rendered apps has always been troublesome with AppBridge. I hope they can sort it out for good now.
@sspross this should work in your case even with polaris.js:
@sspross ah cool, didn’t know that s-app-nav was working with anchor tags.
Anyway, looks like a bug for sure. We would need someone from AppBridge or Polaris team to confirm. Side nav for server-side rendered multi-page apps has always been troublesome with some nasty production bugs in the past.
Hi @sspross - thanks for pointing this out! We recently shipped a change that should have addressed this. We try to handle navigation in single page apps with some of our Remix / React Router wrappers, but were incorrectly handling it with plain html as a result.
We shipped a change that should allow those links to work - let me know if it works for you!
@Beverly_Tang - can you paste in your s-app-nav code? The fix for this was in the polaris.js file that is loaded from our cdn, so it should’ve been shipped out to you automatically via that link. Can you elaborate on the specific issues you’re having?