mi6 / mi6/ic-ui-kit

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

Open
#1,555 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

## 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

Contributor guide

Open the contributing guide

Research direction

Reproduce the issue in a nextJS application by adding IcSideNavigation to app.tsx, both directly and inside a SessionProvider. Check the initial render after a page refresh and compare it with the state after opening and closing the navigation. Done means navigation icons are visible on the first load without extra clicks.

Written by the indexing model from the issue text.

Assessment

Tech stack
nextjs, react, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.