[ic-navigation-group] update expanded prop to work on top navigation
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 63
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 15
Description
### Summary
Currently the expanded prop only works on side navigation and defaults to true. But when navigation groups are added to top navigation (and viewed in mobile mode), it's not possible to control whether they're expanded by default or not.
### 💬 Description
I don't think we need a different prop as the `expandable` prop works for side nav and top nav on small screens. So `expanded` should work the same.
The main issue is that by default at the moment, the `dropdownOpen` state that controls the expanded state of top nav navigation groups on small screens, defaults to false. So we want `expanded` to be true by default for side nav navigation groups, but false by default for top nav navigation groups.
### 💰 Use value
Keeps consistency.
### 🚨 Urgency (low, medium or high)
Low urgency - no one has asked for it specifically, it was [requested for side nav](https://github.com/mi6/ic-design-system/issues/1510) but not top nav
Contributor guide
Research direction
Start by locating the ic-navigation-group component and the top-navigation mobile behavior described by the expanded, expandable, and dropdownOpen props or state. Compare how expanded defaults for side navigation groups versus top navigation groups, then verify that top navigation groups can be controlled consistently while preserving the existing side-navigation default.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100