mi6 / mi6/ic-ui-kit

Side navigation not keeping `expanded` state when moving from `sm` -> `xs`

Open
#1,758 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
53
Forks
63
Avg merge
2d 4h
Merged PRs (30d)
15

Description

## Summary of the bug
When a menu is in either `xs` or `sm` is expanded or closed the state is not passed over.

For example if a side menu is expanded and the window shrunk to `xs` breakpoint the menu will close, if the window is then returned to the `sm` breakpoint, the menu will open again. This happens vice versa also.

## 📸 Screenshots or code
![image](https://github.com/mi6/ic-ui-kit/assets/122624946/21615448-7edb-49ba-91eb-7fb7d705daf3)
![image](https://github.com/mi6/ic-ui-kit/assets/122624946/9a4d4d8d-a110-4667-a603-4169231e5ca1)

## 🧐 Expected behaviour
The expanded state should carry over if a screen size is reduced or expanded.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the side-navigation behavior while resizing between the `xs` and `sm` breakpoints. Inspect the side-navigation responsive state handling and verify the expanded or closed state is preserved in both directions. Done means the state carries over when the viewport changes between these breakpoints.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.