Improve event listeners in ic-navigation-button component
- Dominant language
- TypeScript
- Stars
- 53
- Forks
- 63
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 15
Description
## What is the purpose of the work?
To reduce scope of target for listening to icNavigationMenuOpened and icNavigationMenuClosed events.
## Why do we need it?
Currently the ic-navigation-button listens to the icNavigationMenuOpened and icNavigationMenuClosed events at the document level. This means that code in unnecessarily run when there are multiple ic-top-navigation components on a page.
This is relatively unlikely in practice, but does affect the guidance site and storybook stories
## Additional information
This can be resolved by taking an approach similar to ic-navigation-item, where the listener is added on the parent element, rather than using the Stencil Listen decorator
Contributor guide
Research direction
Start by locating the ic-navigation-button component and compare its event handling with ic-navigation-item. Check how ic-top-navigation establishes the parent relationship, then verify the navigation opened and closed events are handled only within that scope without unnecessary document-level work in the guidance site and Storybook stories.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100