Open kaarelss opened 1 year ago
Hi @kaarelss! Thank you for the detailed reproduction steps. We are able to reproduce the bug, but only the very first time we add the import/link to the index. After that, refreshing the page, removing and and re-adding the code don't seem to cause the same issue. This may be timing issue in development and we will investigate it.
Hi @elanalynn. Thank you for looking into this. I’m not sure I understood correctly what you meant by adding import/link to the index. But testing on our app it seems to work now. Although it's still not working on the template app with the steps above. Did you made any changes?
Any update?
Describe the bug
App bridge does not highlight or activate path in side menu when using in-app navigation with
<NavLink>
from react-router-dom to the path defined in NavigationMenu component. This happens only when side menu is never used. If you use any of the side menu paths and then use in-app navigation, then the highlighting is working.To Reproduce
Steps to reproduce the behaviour:
index.js
add the react-router-dom<NavLink>
to create in-app navigationGo to page name
link.Page name
is not highlighted in the side menu.Home
in the side menu.Go to page name
again and see that the highlighting is correct now in the side menu.See the following video showing how it behaves: https://youtu.be/7pElmaGBNwQ
Expected behaviour
It should always highlight current path in NavigationMenu.
Contextual information
Packages and versions
List the relevant packages you’re using, and their versions. For example:
@shopify/app-bridge
@^3.1.0
@shopify/app-bridge-react
@^3.1.0
@shopify/app-bridge-utils
@^3.1.0
@shopify/polaris
@^9.11.0
react-router-dom
@^6.3.0
Platform
@itissible/matrixify