mi6 / mi6/ic-ui-kit

Improve event listeners in ic-footer-link and ic-footer-link-group components

Open
#343 0 comments 0 reactions 0 assignees View on GitHub
footer 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 the scope of target for listening to footerResized event.

## Why do we need it?
Currently the ic-footer-link and ic-footer-link-group components listen to the footerResized event emitted by ic-footer at the document level. This means that code in unnecessarily run when there are multiple ic-footer 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

Open the contributing guide

Research direction

Locate the ic-footer-link, ic-footer-link-group, and ic-navigation-item entry points, then compare how their footerResized listeners are wired. Verify that listening is scoped to the relevant parent ic-footer instead of document-level handling, and that multiple footer components no longer trigger unrelated listeners.

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
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.