mi6 / ic-ui-kit

Intelligence Community UI Kit (based on StencilJS)
MIT License
19 stars 23 forks source link

[ic-side-navigation] Icons only appear after expanding and collapsing again #1555

Open GCHQ-Developer-530 opened 4 months ago

GCHQ-Developer-530 commented 4 months ago

Summary of the bug

When creating a nextJS application and adding an IcSideNavigation, the icons for navigation items only appear after opening and closing the side nav once. This occurs every time you refresh the page.

🪜 How to reproduce

Tell us the steps to reproduce the problem:

  1. Create a nextJS app
  2. Add an IcSideNavigation to a file
  3. Bring the exported side nav into the app.tsx file inside of a SessionProvider
  4. Run your app
  5. See the error

📸 Screenshots or code

https://github.com/mi6/ic-ui-kit/assets/111882034/60a20ab0-a5a1-4f18-a489-a8702a8c2dc0

🧐 Expected behaviour

Icons should load first time and shouldn't require extra clicks to be visible.

Additional info

I can provide code for this internally if you can't recreate it. It also happens if side nav is just put directly into the app.tsx file, it's not specific to being in a separate file

MI6-255 commented 2 months ago

Consider if this can be replicated in Next.js Storybook, if not, why?