Hi everyone,
I’m developing an embedded Shopify app using Next.js and @shopify/app-bridge-react v3
. I’ve noticed a visual “flicker” or transition animation whenever I click on links in the Navigation Menu. Inspecting the DOM shows that the parent container (within the Shopify Admin) — specifically a div
with classes like Polaris-Frame_Scrollable
— is being re-rendered or updated with transition CSS classes. This creates a noticeable “page flicker” or brief animation on navigation.
if I don’t click the navigation menu links and instead programmatically dispatch a redirect action, the outer Polaris frame container does not change and there’s no visible transition. That suggests the Navigation Menu might be doing extra work beyond a simple redirect.
Apparently, this is the behavior of Shopify Admin frontend and I have no control over it. BUT I’ve tested some other embedded apps, and they don’t exhibit this transition, I wonder how do they workaround with it?
I’ve taken several screenshots for the DOM update, hoping it would provide necessary context.
This is the nav menu link transition on my app, you can see there is an extra _loading_xxx
css class added, causing the page flickers. At the end of the transition, this div gets updated as well.
However, this is not the case in some other apps, the div simply adds some inline styles and then gets removed when transition ends.