Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ic-side-navigation] sideNavExpanded event should use @Event so it appears in docs #1348

Closed
GCHQ-Developer-530 opened this issue Jan 2, 2024 · 0 comments
Assignees

Comments

@GCHQ-Developer-530
Copy link
Contributor

GCHQ-Developer-530 commented Jan 2, 2024

Summary of the bug

At the moment, the sideNavExpanded event is added like this:

const event = new CustomEvent("sideNavExpanded", {
  detail: {
    sideNavExpanded: objDetails.sideNavExpanded,
    sideNavMobile: objDetails.sideNavMobile,
  },
});
this.el.dispatchEvent(event);

But this means it doesn't show up in the docs on our website, and it also isn't consistent with other components.

We should look into rewriting it so that we have @Event() sideNavExpanded and emit the event like we do elsewhere:

this.sideNavExpanded.emit(
  {
    sideNavExpanded: objDetails.sideNavExpanded,
    sideNavMobile: objDetails.sideNavMobile,
  }
)

If a rewrite like this isn't possible, we should look into how to manually get the event in its current state into docs.

The only other component that creates an event like this is top nav for topNavResized. This should be updated too.

🧐 Expected behaviour

sideNavExpanded event should show up in docs.

@GCHQ-Developer-530 GCHQ-Developer-530 self-assigned this Jan 3, 2024
GCHQ-Developer-530 added a commit that referenced this issue Jan 4, 2024
…event decorator

Update sideNavExpanded and topNavResized to use event decorator and appear in docs

. #1348
@GCHQ-Developer-530 GCHQ-Developer-530 moved this from Dev In Progress to In Review in Intelligence Community Design System Jan 5, 2024
GCHQ-Developer-530 added a commit that referenced this issue Jan 8, 2024
…event decorator

Update sideNavExpanded and topNavResized to use event decorator and appear in docs

. #1348
jd239 pushed a commit that referenced this issue Jan 15, 2024
…event decorator

Update sideNavExpanded and topNavResized to use event decorator and appear in docs

. #1348
jd239 pushed a commit that referenced this issue Jan 15, 2024
…event decorator

Update sideNavExpanded and topNavResized to use event decorator and appear in docs

. #1348
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

When branches are created from issues, their pull requests are automatically linked.

1 participant